diff --git a/assets/AboutView-DhQgT-Pg.js b/assets/AboutView-DhQgT-Pg.js new file mode 100644 index 00000000..ab004975 --- /dev/null +++ b/assets/AboutView-DhQgT-Pg.js @@ -0,0 +1 @@ +import{n as t}from"./index-CTQU9LwT.js";const _={name:"AboutView"};var a=function(){var e=this;return e._self._c,e._m(0)},s=[function(){var n=this,e=n._self._c;return e("div",{staticClass:"page__inner page__container"},[e("h1",{staticClass:"page__title"},[n._v(" This is an about page ")])])}],r=t(_,a,s,!1,null,null);const o=r.exports;export{o as default}; diff --git a/assets/EditorsView-CfbKsDLC.js b/assets/EditorsView-CfbKsDLC.js new file mode 100644 index 00000000..26fcdcd7 --- /dev/null +++ b/assets/EditorsView-CfbKsDLC.js @@ -0,0 +1,3813 @@ +import{_ as h3,V as f3,d as p3,g as m3,r as Bf,w as g3,c as Iw,o as v3,a as US,b as Ff,u as b3,h as y3,n as VS,e as w3}from"./index-CTQU9LwT.js";function Cr(t){return Array.isArray(t)}function Nr(t){return t!==null&&typeof t=="object"&&(t.constructor===void 0||t.constructor.name==="Object")}function HS(t){return t&&typeof t=="object"?t.op==="add":!1}function WS(t){return t&&typeof t=="object"?t.op==="remove":!1}function Zb(t){return t&&typeof t=="object"?t.op==="replace":!1}function Wv(t){return t&&typeof t=="object"?t.op==="copy":!1}function $c(t){return t&&typeof t=="object"?t.op==="move":!1}function x3(t,e){return JSON.stringify(t)===JSON.stringify(e)}function j3(t,e){return t===e}function KS(t){return t.slice(0,t.length-1)}function k3(t){return t[t.length-1]}function S3(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:j3;if(t.length{e[n]=t[n]}),e}else if(Nr(t)){const e={...t};return Object.getOwnPropertySymbols(t).forEach(n=>{e[n]=t[n]}),e}else return t}function t1(t,e,n){if(t[e]===n)return t;{const r=e1(t);return r[e]=n,r}}function Ze(t,e){let n=t,r=0;for(;r3&&arguments[3]!==void 0?arguments[3]:!1;if(e.length===0)return n;const o=e[0],i=Go(t?t[o]:void 0,e.slice(1),n,r);if(Nr(t)||Cr(t))return t1(t,o,i);if(r){const s=C3.test(o)?[]:{};return s[o]=i,s}else throw new Error("Path does not exist")}const C3=/^\d+$/;function n1(t,e,n){if(e.length===0)return n(t);if(!JS(t))throw new Error("Path doesn't exist");const r=e[0],o=n1(t[r],e.slice(1),n);return t1(t,r,o)}function _m(t,e){if(e.length===0)return t;if(!JS(t))throw new Error("Path does not exist");if(e.length===1){const o=e[0];if(o in t){const i=e1(t);return Cr(i)&&i.splice(parseInt(o),1),Nr(i)&&delete i[o],i}else return t}const n=e[0],r=_m(t[n],e.slice(1));return t1(t,n,r)}function r1(t,e,n){const r=e.slice(0,e.length-1),o=e[e.length-1];return n1(t,r,i=>{if(!Array.isArray(i))throw new TypeError("Array expected at path "+JSON.stringify(r));const s=e1(i);return s.splice(parseInt(o),0,n),s})}function yi(t,e){return t===void 0?!1:e.length===0?!0:t===null?!1:yi(t[e[0]],e.slice(1))}function ji(t){const e=t.split("/");return e.shift(),e.map(n=>n.replace(/~1/g,"/").replace(/~0/g,"~"))}function yt(t){return t.map(GS).join("")}function GS(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function zw(t,e){return t+GS(e)}function Ki(t,e,n){let r=t;for(let o=0;o{let a;const l=Ji(i,s.path);if(s.op==="add")a=ZS(i,l);else if(s.op==="remove")a=XS(i,l);else if(s.op==="replace")a=YS(i,l);else if(s.op==="copy")a=R3(i,l);else if(s.op==="move")a=N3(i,l,Kv(s.from));else if(s.op==="test")a=[];else throw new Error("Unknown JSONPatch operation "+JSON.stringify(s));let u;if(n&&n.before){const d=n.before(i,s,a);if(d&&d.revertOperations&&(a=d.revertOperations),d&&d.document&&(u=d.document),d&&d.json)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"')}if(r=a.concat(r),u!==void 0)return{document:u}}}),r}function YS(t,e){return[{op:"replace",path:yt(e),value:Ze(t,e)}]}function XS(t,e){return[{op:"add",path:yt(e),value:Ze(t,e)}]}function ZS(t,e){return uh(t,e)||!yi(t,e)?[{op:"remove",path:yt(e)}]:YS(t,e)}function R3(t,e){return ZS(t,e)}function N3(t,e,n){if(e.length=0?G=h():_()}return k(E,"valueEnd"),u(),z&&sNumber.MAX_SAFE_INTEGER||G="a"&&G<="f"?z+=G.charCodeAt()-I3+10:G>="0"&&G<="9"?z+=+G:A()}return String.fromCharCode(z)}function y(){for(var E="";t[s]>="0"&&t[s]<="9";)E+=b();if(E.length)return E;D(),_()}function k(E,z){S(E,z,w())}function S(E,z,G){r[E]=r[E]||{},r[E][z]=G}function w(){return{line:o,column:i,pos:s}}function _(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function A(){v(),_()}function D(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}};gp.stringify=function(t,e,n){if(!zh(t))return;var r=0,o,i,s=typeof n=="object"?n.space:n;switch(typeof s){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&S(a," "),o=a,i=a;break;case"string":s=s.slice(0,10),o=0,i=0;for(var l=0;l=0}var L3=/"|\\/g,B3=/[\b]/g,F3=/\f/g,q3=/\n/g,U3=/\r/g,V3=/\t/g;function Lh(t){return t=t.replace(L3,"\\$&").replace(F3,"\\f").replace(B3,"\\b").replace(q3,"\\n").replace(U3,"\\r").replace(V3,"\\t"),'"'+t+'"'}var H3=/~/g,W3=/\//g;function Jv(t){return t.replace(H3,"~0").replace(W3,"~1")}class oc extends Error{constructor(e,n){super(`${e} at position ${n}`),this.position=n}}const Bh=92,Ng=47,K3=42,Bw=123,Fh=125,Fw=91,qh=93,J3=41,G3=32,o1=10,eC=9,tC=13,Q3=8,Y3=12,vp=34,qw=43,Uw=45,nC=39,rC=48,oC=57,sl=44,Uh=46,Vh=58,X3=59,Z3=65,eM=97,tM=69,nM=101,rM=70,oM=102,iM=160,sM=8192,aM=8202,lM=8239,cM=8287,uM=12288,dM=8220,hM=8221,fM=8216,pM=8217,mM=96,gM=180;function vM(t){return t>=rC&&t<=oC||t>=Z3&&t<=rM||t>=eM&&t<=oM}function al(t){return t>=rC&&t<=oC}function bM(t){return t>=32&&t<=1114111}function Hh(t){return yM.test(t)}const yM=/^[,:[\]/{}()\n+]$/,wM=/^[,[\]/{}\n+]$/,xM=/^[a-zA-Z_$]$/,jM=/^[a-zA-Z_$0-9]$/,Vw=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,Hw=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function Ww(t){return wM.test(t)}function Kw(t){return kM.test(t)||t&&qf(t.charCodeAt(0))}const kM=/^[[{\w-]$/;function SM(t){return t===o1||t===tC||t===eC||t===Q3||t===Y3}function dl(t){return t===G3||t===o1||t===eC||t===tC}function CM(t){return t===iM||t>=sM&&t<=aM||t===lM||t===cM||t===uM}function qf(t){return iC(t)||Gv(t)}function iC(t){return t===vp||t===dM||t===hM}function Jw(t){return t===vp}function Gv(t){return t===nC||t===fM||t===pM||t===mM||t===gM}function Gw(t){return t===nC}function Nu(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const r=t.lastIndexOf(e);return r!==-1?t.substring(0,r)+(n?"":t.substring(r+1)):t}function Ni(t,e){let n=t.length;if(!dl(t.charCodeAt(n-1)))return t+e;for(;dl(t.charCodeAt(n-1));)n--;return t.substring(0,n)+e+t.substring(n)}function OM(t,e,n){return t.substring(0,e)+t.substring(e+n)}function _M(t){return/[,\n][ \t\r]*$/.test(t)}const EM={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},AM={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` +`,r:"\r",t:" "};function Ss(t){let e=0,n="";i()||F();const o=u(sl);for(o&&s(),Kw(t[e])&&_M(n)?(o||(n=Ni(n,",")),b()):o&&(n=Nu(n,","));t.charCodeAt(e)===Fh||t.charCodeAt(e)===qh;)e++,s();if(e>=t.length)return n;G();function i(){s();const Z=p()||m()||v()||y()||k()||w(!1)||_();return s(),Z}function s(){const Z=e;let he=a();do he=l(),he&&(he=a());while(he);return e>Z}function a(){let Z="",he;for(;(he=dl(t.charCodeAt(e)))||CM(t.charCodeAt(e));)he?Z+=t[e]:Z+=" ",e++;return Z.length>0?(n+=Z,!0):!1}function l(){if(t.charCodeAt(e)===Ng&&t.charCodeAt(e+1)===K3){for(;e=t.length;fe||(Kw(t[e])||J?n=Ni(n,":"):pe()),i()||(fe||J?n+="null":pe())}return t.charCodeAt(e)===Fh?(n+="}",e++):n=Ni(n,"}"),!0}return!1}function m(){if(t.charCodeAt(e)===Fw){n+="[",e++,s(),d(sl)&&s();let Z=!0;for(;e0&&arguments[0]!==void 0?arguments[0]:!1,he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,be=t.charCodeAt(e)===Bh;if(be&&(e++,be=!0),qf(t.charCodeAt(e))){const fe=Jw(t.charCodeAt(e))?Jw:Gw(t.charCodeAt(e))?Gw:Gv(t.charCodeAt(e))?Gv:iC,J=e,I=n.length;let Q='"';for(e++;;){if(e>=t.length){const M=A(e-1);return!Z&&Hh(t.charAt(M))?(e=J,n=n.substring(0,I),v(!0)):(Q=Ni(Q,'"'),n+=Q,!0)}else{if(e===he)return Q=Ni(Q,'"'),n+=Q,!0;if(fe(t.charCodeAt(e))){const M=e,C=Q.length;if(Q+='"',e++,n+=Q,s(),Z||e>=t.length||Hh(t.charAt(e))||qf(t.charCodeAt(e))||al(t.charCodeAt(e)))return g(),!0;const $=A(M-1),oe=t.charAt($);if(oe===",")return e=J,n=n.substring(0,I),v(!1,$);if(Hh(oe))return e=J,n=n.substring(0,I),v(!0);n=n.substring(0,I),e=M+1,Q=`${Q.substring(0,C)}\\${Q.substring(C)}`}else if(Z&&Ww(t[e])){if(t.charCodeAt(e-1)===Vh&&Vw.test(t.substring(J+1,e+2)))for(;e=t.length?e=t.length:re()}else Q+=M,e+=2}else{const M=t.charAt(e),C=t.charCodeAt(e);C===vp&&t.charCodeAt(e-1)!==Bh?(Q+=`\\${M}`,e++):SM(C)?(Q+=EM[M],e++):(bM(C)||z(M),Q+=M,e++)}}be&&h()}}return!1}function g(){let Z=!1;for(s();t.charCodeAt(e)===qw;){Z=!0,e++,s(),n=Nu(n,'"',!0);const he=n.length;v()?n=OM(n,he,1):n=Ni(n,'"')}return Z}function y(){const Z=e;if(t.charCodeAt(e)===Uw){if(e++,D())return E(Z),!0;if(!al(t.charCodeAt(e)))return e=Z,!1}for(;al(t.charCodeAt(e));)e++;if(t.charCodeAt(e)===Uh){if(e++,D())return E(Z),!0;if(!al(t.charCodeAt(e)))return e=Z,!1;for(;al(t.charCodeAt(e));)e++}if(t.charCodeAt(e)===nM||t.charCodeAt(e)===tM){if(e++,(t.charCodeAt(e)===Uw||t.charCodeAt(e)===qw)&&e++,D())return E(Z),!0;if(!al(t.charCodeAt(e)))return e=Z,!1;for(;al(t.charCodeAt(e));)e++}if(!D())return e=Z,!1;if(e>Z){const he=t.slice(Z,e),be=/^0\d/.test(he);return n+=be?`"${he}"`:he,!0}return!1}function k(){return S("true","true")||S("false","false")||S("null","null")||S("True","true")||S("False","false")||S("None","null")}function S(Z,he){return t.slice(e,e+Z.length)===Z?(n+=he,e+=Z.length,!0):!1}function w(Z){const he=e;if(xM.test(t[e])){for(;ehe){for(;dl(t.charCodeAt(e-1))&&e>0;)e--;const be=t.slice(he,e);return n+=be==="undefined"?"null":JSON.stringify(be),t.charCodeAt(e)===vp&&e++,!0}}function _(){if(t[e]==="/"){const Z=e;for(e++;e0&&dl(t.charCodeAt(he));)he--;return he}function D(){return e>=t.length||Hh(t[e])||dl(t.charCodeAt(e))}function E(Z){n+=`${t.slice(Z,e)}0`}function z(Z){throw new oc(`Invalid character ${JSON.stringify(Z)}`,e)}function G(){throw new oc(`Unexpected character ${JSON.stringify(t[e])}`,e)}function F(){throw new oc("Unexpected end of json string",t.length)}function se(){throw new oc("Object key expected",e)}function pe(){throw new oc("Colon expected",e)}function re(){const Z=t.slice(e,e+6);throw new oc(`Invalid unicode character "${Z}"`,e)}}function $M(t,e){return t[e]==="*"&&t[e+1]==="/"}var sC=typeof global=="object"&&global&&global.Object===Object&&global,MM=typeof self=="object"&&self&&self.Object===Object&&self,as=sC||MM||Function("return this")(),Ci=as.Symbol,aC=Object.prototype,TM=aC.hasOwnProperty,PM=aC.toString,Du=Ci?Ci.toStringTag:void 0;function RM(t){var e=TM.call(t,Du),n=t[Du];try{t[Du]=void 0;var r=!0}catch{}var o=PM.call(t);return r&&(e?t[Du]=n:delete t[Du]),o}var NM=Object.prototype,DM=NM.toString;function IM(t){return DM.call(t)}var zM="[object Null]",LM="[object Undefined]",Qw=Ci?Ci.toStringTag:void 0;function gu(t){return t==null?t===void 0?LM:zM:Qw&&Qw in Object(t)?RM(t):IM(t)}function Fa(t){return t!=null&&typeof t=="object"}var BM="[object Symbol]";function $l(t){return typeof t=="symbol"||Fa(t)&&gu(t)==BM}function ad(t,e){for(var n=-1,r=t==null?0:t.length,o=Array(r);++n0){if(++e>=vT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function xT(t){return function(){return t}}var bp=function(){try{var t=Jl(Object,"defineProperty");return t({},"",{}),t}catch{}}(),jT=bp?function(t,e){return bp(t,"toString",{configurable:!0,enumerable:!1,value:xT(e),writable:!0})}:dh,kT=wT(jT);function ST(t,e){for(var n=-1,r=t==null?0:t.length;++n-1&&t%1==0&&t-1&&t%1==0&&t<=MT}function vu(t){return t!=null&&s1(t.length)&&!cC(t)}function Xv(t,e,n){if(!$s(n))return!1;var r=typeof e;return(r=="number"?vu(n)&&i1(e,n.length):r=="string"&&e in n)?Am(n[e],t):!1}var TT=Object.prototype;function Mm(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||TT;return t===n}function dC(t,e){for(var n=-1,r=Array(t);++n-1}function LP(t,e){var n=this.__data__,r=Rm(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function la(t){var e=-1,n=t==null?0:t.length;for(this.clear();++eo?0:o+e),n=n>o?o:n,n<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++ra))return!1;var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var h=-1,f=!0,p=n&V8?new wp:void 0;for(i.set(t,e),i.set(e,t);++h=e||A<0||h&&D>=i}function g(){var _=Lg();if(v(_))return y(_);a=setTimeout(g,b(_))}function y(_){return a=void 0,f&&r?p(_):(r=o=void 0,s)}function k(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function S(){return a===void 0?s:y(Lg())}function w(){var _=Lg(),A=v(_);if(r=arguments,o=this,l=_,A){if(a===void 0)return m(l);if(h)return clearTimeout(a),a=setTimeout(g,e),p(l)}return a===void 0&&(a=setTimeout(g,e)),s}return w.cancel=k,w.flush=S,w}function dn(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function DC(t){return typeof t=="function"?t:dh}function R6(t,e){for(var n=t==null?0:t.length;n--&&e(t[n],n,t)!==!1;);return t}var N6=MC(!0);function D6(t,e){return t&&N6(t,e,bu)}var I6=PC(D6,!0);function z6(t,e){var n=Ro(t)?R6:I6;return n(t,DC(e))}function Ws(t){return t&&t.length?t[0]:void 0}function IC(t,e){var n=-1,r=vu(t)?Array(t.length):[];return RC(t,function(o,i,s){r[++n]=e(o,i,s)}),r}function L6(t,e){var n=Ro(t)?ad:IC;return n(t,hh(e))}var B6=Object.prototype,F6=B6.hasOwnProperty,q6=NC(function(t,e,n){F6.call(t,n)?t[n].push(e):Em(t,n,[e])});function jn(t){var e=t==null?0:t.length;return e?n5(t,0,-1):[]}var U6="[object Map]",V6="[object Set]",H6=Object.prototype,W6=H6.hasOwnProperty;function Jn(t){if(t==null)return!0;if(vu(t)&&(Ro(t)||typeof t=="string"||typeof t.splice=="function"||jd(t)||a1(t)||Tm(t)))return!t.length;var e=gi(t);if(e==U6||e==V6)return!t.size;if(Mm(t))return!vC(t).length;for(var n in t)if(W6.call(t,n))return!1;return!0}function gn(t,e){return Im(t,e)}function K6(t,e){return te||i&&s&&l&&!a&&!u||r&&s&&l||!n&&l||!o)return 1;if(!r&&!i&&!u&&t=a)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return t.index-e.index}function Z6(t,e,n){e.length?e=ad(e,function(i){return Ro(i)?function(s){return d1(s,i.length===1?i[0]:i)}:i}):e=[dh];var r=-1;e=ad(e,Pm(hh));var o=IC(t,function(i,s,a){var l=ad(e,function(u){return u(i)});return{criteria:l,index:++r,value:i}});return Q6(o,function(i,s){return X6(i,s,n)})}var eR=NC(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),tR=Math.ceil,nR=Math.max;function rR(t,e,n,r){for(var o=-1,i=nR(tR((e-t)/(n||1)),0),s=Array(i);i--;)s[++o]=t,t+=n;return s}function oR(t){return function(e,n,r){return r&&typeof r!="number"&&Xv(e,n,r)&&(n=r=void 0),e=Uf(e),n===void 0?(n=e,e=0):n=Uf(n),r=r===void 0?e1&&Xv(t,e[0],e[1])?e=[]:n>2&&Xv(e[0],e[1],e[2])&&(e=[e[0]]),Z6(t,t5(e),[])}),sR=9007199254740991,Bg=4294967295,aR=Math.min;function lR(t,e){if(t=YM(t),t<1||t>sR)return[];var n=Bg,r=aR(t,Bg);e=DC(e),t-=Bg;for(var o=dC(r,e);++nArray.isArray(t),uR=t=>t&&typeof t=="object"&&!zm(t),dR=t=>typeof t=="string";function Wr(t){return(...e)=>{const n=e.map(i=>ao(i)),r=n[0],o=n[1];return n.length===1?i=>t(r(i)):n.length===2?i=>t(r(i),o(i)):i=>t(...n.map(s=>s(i)))}}const hl={pipe:(...t)=>{const e=t.map(n=>ao(n));return n=>e.reduce((r,o)=>o(r),n)},object:t=>{const e=Object.keys(t).map(n=>[n,ao(t[n])]);return n=>{const r={};for(const[o,i]of e)r[o]=i(n);return r}},array:(...t)=>{const e=t.map(n=>ao(n));return n=>e.map(r=>r(n))},get:(...t)=>{if(t.length===0)return e=>e??null;if(t.length===1){const e=t[0];return n=>(n==null?void 0:n[e])??null}return e=>{let n=e;for(const r of t)n=n==null?void 0:n[r];return n??null}},map:t=>{const e=ao(t);return n=>n.map(e)},mapObject:t=>{const e=ao(t);return n=>{const r={};for(const o of Object.keys(n)){const i=e({key:o,value:n[o]});r[i.key]=i.value}return r}},mapKeys:t=>{const e=ao(t);return n=>{const r={};for(const o of Object.keys(n)){const i=e(o);r[i]=n[o]}return r}},mapValues:t=>{const e=ao(t);return n=>{const r={};for(const o of Object.keys(n))r[o]=e(n[o]);return r}},filter:t=>{const e=ao(t);return n=>n.filter(r=>Ox(e(r)))},sort:(t=["get"],e)=>{const n=ao(t),r=e==="desc"?-1:1;function o(i,s){const a=n(i),l=n(s);return a>l?r:ai.slice().sort(o)},reverse:()=>t=>t.toReversed(),pick:(...t)=>{const e=t.map(([r,...o])=>[o[o.length-1],hl.get(...o)]),n=(r,o)=>{const i={};for(const[s,a]of o)i[s]=a(r);return i};return r=>zm(r)?r.map(o=>n(o,e)):n(r,e)},groupBy:t=>{const e=ao(t);return n=>{const r={};for(const o of n){const i=e(o);r[i]?r[i].push(o):r[i]=[o]}return r}},keyBy:t=>{const e=ao(t);return n=>{const r={};for(const o of n){const i=e(o);i in r||(r[i]=o)}return r}},flatten:()=>t=>t.flat(),join:(t="")=>e=>e.join(t),split:Wr((t,e)=>e!==void 0?t.split(e):t.trim().split(/\s+/)),substring:Wr((t,e,n)=>t.slice(Math.max(e,0),n)),uniq:()=>t=>[...new Set(t)],uniqBy:t=>e=>Object.values(hl.keyBy(t)(e)),limit:t=>e=>e.slice(0,Math.max(t,0)),size:()=>t=>t.length,keys:()=>Object.keys,values:()=>Object.values,prod:()=>t=>t.reduce((e,n)=>e*n),sum:()=>t=>t.reduce((e,n)=>e+n),average:()=>t=>hl.sum()(t)/t.length,min:()=>t=>Math.min(...t),max:()=>t=>Math.max(...t),and:Wr((t,e)=>!!(t&&e)),or:Wr((t,e)=>!!(t||e)),not:Wr(t=>!t),exists:t=>{const e=t.slice(1),n=e.pop(),r=hl.get(...e);return o=>{const i=r(o);return!!i&&Object.hasOwnProperty.call(i,n)}},if:(t,e,n)=>{const r=ao(t),o=ao(e),i=ao(n);return s=>Ox(r(s))?o(s):i(s)},in:(t,e)=>{const n=ao(t),r=ao(e);return o=>r(o).includes(n(o))},"not in":(t,e)=>{const n=hl.in(t,e);return r=>!n(r)},regex:(t,e,n)=>{const r=new RegExp(e,n),o=ao(t);return i=>r.test(o(i))},eq:Wr((t,e)=>t===e),gt:Wr((t,e)=>t>e),gte:Wr((t,e)=>t>=e),lt:Wr((t,e)=>tt<=e),ne:Wr((t,e)=>t!==e),add:Wr((t,e)=>t+e),subtract:Wr((t,e)=>t-e),multiply:Wr((t,e)=>t*e),divide:Wr((t,e)=>t/e),pow:Wr((t,e)=>t**e),mod:Wr((t,e)=>t%e),abs:Wr(Math.abs),round:Wr((t,e=0)=>+`${Math.round(+`${t}e${e}`)}e${-e}`),number:Wr(t=>{const e=Number(t);return Number.isNaN(Number(t))?null:e}),string:Wr(String)},Ox=t=>t!==null&&t!==0&&t!==!1,Jh=[];function ao(t,e){Jh.unshift({...hl,...Jh[0]});try{const n=zm(t)?hR(t,Jh[0]):uR(t)?LC(`Function notation ["object", {...}] expected but got ${JSON.stringify(t)}`):()=>t;return r=>{try{return n(r)}catch(o){throw o.jsonquery=[{data:r,query:t},...o.jsonquery??[]],o}}}finally{Jh.shift()}}function hR(t,e){const[n,...r]=t,o=e[n];return o||LC(`Unknown function '${n}'`),o(...r)}function LC(t){throw new Error(t)}const BC={and:"and",or:"or",eq:"==",gt:">",gte:">=",lt:"<",lte:"<=",ne:"!=",add:"+",subtract:"-",multiply:"*",divide:"/",pow:"^",mod:"%",in:"in","not in":"not in"},fR=/^[a-zA-Z_$][a-zA-Z\d_$]*$/,pR=/^[a-zA-Z_$][a-zA-Z\d_$]*/,mR=/^"(?:[^"\\]|\\.)*"/,gR=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,vR=/^(0|[1-9][0-9]*)/,bR=/^(true|false|null)/,yR=/^[ \n\t\r]+/;function FC(t,e){const n={...BC},r=Object.keys(n).sort((A,D)=>D.length-A.length),o=()=>{y();const A=i();if(y(),t[w]==="|"){const D=[A];for(;t[w]==="|";)w++,y(),D.push(i());return["pipe",...D]}return A},i=()=>{const A=s();y();for(const D of r){const E=n[D];if(t.substring(w,w+E.length)===E){w+=E.length,y();const z=s();return[D,A,z]}}return A},s=()=>{if(t[w]==="("){w++;const A=o();return k(")"),A}return a()},a=()=>{if(t[w]==="."){const A=[];for(;t[w]===".";)w++,A.push(h()??f()??m()??S("Property expected"));return["get",...A]}return l()},l=()=>{const A=w,D=f();if(y(),!D||t[w]!=="(")return w=A,u();w++,!hl[D]&&S(`Unknown function '${D}'`),y();const E=t[w]!==")"?[o()]:[];for(;w{if(t[w]==="{"){w++,y();const A={};let D=!0;for(;w{if(t[w]==="["){w++,y();const A=[];let D=!0;for(;wg(mR,JSON.parse),f=()=>g(pR,A=>A),p=()=>g(gR,JSON.parse),m=()=>g(vR,JSON.parse),b=()=>{const A=g(bR,JSON.parse);if(A!==void 0)return A;S("Value expected")},v=()=>{y(),w{const E=t.substring(w).match(A);if(E)return w+=E[0].length,D(E[0])},y=()=>g(yR,A=>A),k=A=>{t[w]!==A&&S(`Character '${A}' expected`),w++},S=(A,D=w)=>{throw new SyntaxError(`${A} (pos: ${D})`)};let w=0;const _=o();return v(),_}const wR=40,xR=" ",jR=(t,e)=>{const n=xR,r=(u,d)=>zm(u)?o(u,d):JSON.stringify(u),o=(u,d)=>{var h;const[f,...p]=u;if(f==="get"&&p.length>0)return s(p);if(f==="pipe"){const g=p.map(y=>r(y,d+n));return l(g,[""," | ",""],["",` +${d+n}| `,""])}if(f==="object")return i(p[0],d);if(f==="array"){const g=p.map(y=>r(y,d));return l(g,["[",", ","]"],[`[ +${d+n}`,`, +${d+n}`,` +${d}]`])}const m=((h=void 0)==null?void 0:h[f])??BC[f];if(m&&p.length===2){const[g,y]=p,k=r(g,d),S=r(y,d);return`(${k} ${m} ${S})`}const b=p.length===1?d:d+n,v=p.map(g=>r(g,b));return p.length===1&&v[0][0]==="("?`${f}${v[0]}`:l(v,[`${f}(`,", ",")"],p.length===1?[`${f}(`,`, +${d}`,")"]:[`${f}( +${b}`,`, +${b}`,` +${d})`])},i=(u,d)=>{const h=d+n,f=Object.entries(u).map(([p,m])=>`${a(p)}: ${r(m,h)}`);return l(f,["{ ",", "," }"],[`{ +${h}`,`, +${h}`,` +${d}}`])},s=u=>u.map(d=>`.${a(d)}`).join(""),a=u=>fR.test(u)?u:JSON.stringify(u),l=(u,[d,h,f],[p,m,b])=>d.length+u.reduce((v,g)=>v+g.length+h.length,0)-h.length+f.length<=wR?d+u.join(h)+f:p+u.join(m)+b;return r(t,"")};function kR(t,e,n){return ao(dR(e)?FC(e):e)(t)}/*! + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2024 Fonticons, Inc. + */const SR={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M297.2 248.9C311.6 228.3 320 203.2 320 176c0-70.7-57.3-128-128-128S64 105.3 64 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7c0 0 0 0 0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5L109 384c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8c0 0 0 0 0 0s0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C27.6 247.9 16 213.3 16 176C16 78.8 94.8 0 192 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4c0 0 0 0 0 0s0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5l-48.6 0c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8c0 0 0 0 0 0s0 0 0 0s0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM192 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80l0-16 160 0 0 16c0 44.2-35.8 80-80 80z"]},CR={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l320 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 80zM0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},qC=CR,UC={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l320 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z"]},OR={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};/*! + * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2024 Fonticons, Inc. + */const o0={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"]},_R={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"]},Cd={prefix:"fas",iconName:"caret-right",icon:[256,512,[],"f0da","M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z"]},VC={prefix:"fas",iconName:"paste",icon:[512,512,["file-clipboard"],"f0ea","M160 0c-23.7 0-44.4 12.9-55.4 32L48 32C21.5 32 0 53.5 0 80L0 400c0 26.5 21.5 48 48 48l144 0 0-272c0-44.2 35.8-80 80-80l48 0 0-16c0-26.5-21.5-48-48-48l-56.6 0C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48l0 272 0 16c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-220.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L320 128l-48 0zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},ER={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},AR={prefix:"fas",iconName:"scissors",icon:[512,512,[9984,9986,9988,"cut"],"f0c4","M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},Mc=AR,$R={prefix:"fas",iconName:"square-caret-down",icon:[448,512,["caret-square-down"],"f150","M384 480c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0zM224 352c-6.7 0-13-2.8-17.6-7.7l-104-112c-6.5-7-8.2-17.2-4.4-25.9s12.5-14.4 22-14.4l208 0c9.5 0 18.2 5.7 22 14.4s2.1 18.9-4.4 25.9l-104 112c-4.5 4.9-10.9 7.7-17.6 7.7z"]},MR=$R,TR={prefix:"fas",iconName:"caret-left",icon:[256,512,[],"f0d9","M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z"]},PR={prefix:"fas",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},HC=PR,RR={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},NR=RR,DR={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},WC={prefix:"fas",iconName:"angle-right",icon:[320,512,[8250],"f105","M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"]},IR={prefix:"fas",iconName:"square-caret-up",icon:[448,512,["caret-square-up"],"f151","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM224 160c6.7 0 13 2.8 17.6 7.7l104 112c6.5 7 8.2 17.2 4.4 25.9s-12.5 14.4-22 14.4l-208 0c-9.5 0-18.2-5.7-22-14.4s-2.1-18.9 4.4-25.9l104-112c4.5-4.9 10.9-7.7 17.6-7.7z"]},zR=IR,LR={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},KC={prefix:"fas",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z"]},jp={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},kp={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"]},Xc={prefix:"fas",iconName:"wrench",icon:[512,512,[128295],"f0ad","M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},BR={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},Tc={prefix:"fas",iconName:"pen",icon:[512,512,[128394],"f304","M362.7 19.3L314.3 67.7 444.3 197.7l48.4-48.4c25-25 25-65.5 0-90.5L453.3 19.3c-25-25-65.5-25-90.5 0zm-71 71L58.6 323.5c-10.4 10.4-18 23.3-22.2 37.4L1 481.2C-1.5 489.7 .8 498.8 7 505s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L421.7 220.3 291.7 90.3z"]},FR={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M386.3 160L336 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-128c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z"]},m1=FR,qR={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},g1=qR,UR={prefix:"fas",iconName:"crop-simple",icon:[512,512,["crop-alt"],"f565","M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32l0 32L32 64C14.3 64 0 78.3 0 96s14.3 32 32 32l32 0 0 256c0 35.3 28.7 64 64 64l224 0 0-64-224 0 0-352zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-32 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0 0-256c0-35.3-28.7-64-64-64L160 64l0 64 224 0 0 352z"]},VR=UR,HR={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},WR=HR,qa={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},KR={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},JC=KR,Gh={prefix:"fas",iconName:"arrow-right-arrow-left",icon:[448,512,[8644,"exchange"],"f0ec","M438.6 150.6c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.7 96 32 96C14.3 96 0 110.3 0 128s14.3 32 32 32l306.7 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96zm-333.3 352c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 416 416 416c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96z"]},JR={prefix:"fas",iconName:"arrow-down-short-wide",icon:[576,512,["sort-amount-desc","sort-amount-down-alt"],"f884","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},Sp=JR,GR={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},_x={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},QR={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},Lm=QR,YR={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Sa={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"]},wc={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},GC={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},XR=GC,Bm=GC,ZR={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"]},e9={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"]},QC={prefix:"fas",iconName:"clone",icon:[512,512,[],"f24d","M288 448L64 448l0-224 64 0 0-64-64 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-64-64 0 0 64zm-64-96l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64z"]},v1={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},t9={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},Tl=t9;var YC={exports:{}};/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */var Ex=function(t,e){var n,r,o=1,i=0,s=0,a=String.alphabet;function l(u,d,h){if(h){for(n=d;h=l(u,n),h<76&&h>65;)++n;return+u.slice(d-1,n)}return h=a&&a.indexOf(u.charAt(d)),h>-1?h+76:(h=u.charCodeAt(d)||0,h<45||h>127?h:h<46?65:h<48?h-1:h<58?h+18:h<65?h-11:h<91?h+11:h<97?h-37:h<123?h+5:h-63)}if((t+="")!=(e+="")){for(;o;)if(r=l(t,i++),o=l(e,s++),r<76&&o<76&&r>66&&o>66&&(r=l(t,i,i),o=l(e,s,i=n),s=n),r!=o)return r1)return!1;const y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((k,S)=>`${k}${S}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((k,S)=>(S instanceof n&&(k[S.str]=(k[S.str]||0)+1),k),{})}}t._Code=r,t.nil=new r("");function o(g,...y){const k=[g[0]];let S=0;for(;S{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,e._)`${u}${h.scopePath}`})}scopeCode(u=this._values,d,h){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},d,h)}_reduceValues(u,d,h={},f){let p=e.nil;for(const m in u){const b=u[m];if(!b)continue;const v=h[m]=h[m]||new Map;b.forEach(g=>{if(v.has(g))return;v.set(g,r.Started);let y=d(g);if(y){const k=this.opts.es5?t.varKinds.var:t.varKinds.const;p=(0,e._)`${p}${k} ${g} = ${y};${this.opts._n}`}else if(y=f==null?void 0:f(g))p=(0,e._)`${p}${y}${this.opts._n}`;else throw new n(g);v.set(g,r.Completed)})}return p}}t.ValueScope=a})(i0);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=_d,n=i0;var r=_d;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var o=i0;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(C,$){return this}}class s extends i{constructor(C,$,oe){super(),this.varKind=C,this.name=$,this.rhs=oe}render({es5:C,_n:$}){const oe=C?n.varKinds.var:this.varKind,_e=this.rhs===void 0?"":` = ${this.rhs}`;return`${oe} ${this.name}${_e};`+$}optimizeNames(C,$){if(C[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,C,$)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(C,$,oe){super(),this.lhs=C,this.rhs=$,this.sideEffects=oe}render({_n:C}){return`${this.lhs} = ${this.rhs};`+C}optimizeNames(C,$){if(!(this.lhs instanceof e.Name&&!C[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,C,$),this}get names(){const C=this.lhs instanceof e.Name?{}:{...this.lhs.names};return se(C,this.rhs)}}class l extends a{constructor(C,$,oe,_e){super(C,oe,_e),this.op=$}render({_n:C}){return`${this.lhs} ${this.op}= ${this.rhs};`+C}}class u extends i{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`${this.label}:`+C}}class d extends i{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`break${this.label?` ${this.label}`:""};`+C}}class h extends i{constructor(C){super(),this.error=C}render({_n:C}){return`throw ${this.error};`+C}get names(){return this.error.names}}class f extends i{constructor(C){super(),this.code=C}render({_n:C}){return`${this.code};`+C}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(C,$){return this.code=pe(this.code,C,$),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class p extends i{constructor(C=[]){super(),this.nodes=C}render(C){return this.nodes.reduce(($,oe)=>$+oe.render(C),"")}optimizeNodes(){const{nodes:C}=this;let $=C.length;for(;$--;){const oe=C[$].optimizeNodes();Array.isArray(oe)?C.splice($,1,...oe):oe?C[$]=oe:C.splice($,1)}return C.length>0?this:void 0}optimizeNames(C,$){const{nodes:oe}=this;let _e=oe.length;for(;_e--;){const q=oe[_e];q.optimizeNames(C,$)||(re(C,q.names),oe.splice(_e,1))}return oe.length>0?this:void 0}get names(){return this.nodes.reduce((C,$)=>F(C,$.names),{})}}class m extends p{render(C){return"{"+C._n+super.render(C)+"}"+C._n}}class b extends p{}class v extends m{}v.kind="else";class g extends m{constructor(C,$){super($),this.condition=C}render(C){let $=`if(${this.condition})`+super.render(C);return this.else&&($+="else "+this.else.render(C)),$}optimizeNodes(){super.optimizeNodes();const C=this.condition;if(C===!0)return this.nodes;let $=this.else;if($){const oe=$.optimizeNodes();$=this.else=Array.isArray(oe)?new v(oe):oe}if($)return C===!1?$ instanceof g?$:$.nodes:this.nodes.length?this:new g(Z(C),$ instanceof g?[$]:$.nodes);if(!(C===!1||!this.nodes.length))return this}optimizeNames(C,$){var oe;if(this.else=(oe=this.else)===null||oe===void 0?void 0:oe.optimizeNames(C,$),!!(super.optimizeNames(C,$)||this.else))return this.condition=pe(this.condition,C,$),this}get names(){const C=super.names;return se(C,this.condition),this.else&&F(C,this.else.names),C}}g.kind="if";class y extends m{}y.kind="for";class k extends y{constructor(C){super(),this.iteration=C}render(C){return`for(${this.iteration})`+super.render(C)}optimizeNames(C,$){if(super.optimizeNames(C,$))return this.iteration=pe(this.iteration,C,$),this}get names(){return F(super.names,this.iteration.names)}}class S extends y{constructor(C,$,oe,_e){super(),this.varKind=C,this.name=$,this.from=oe,this.to=_e}render(C){const $=C.es5?n.varKinds.var:this.varKind,{name:oe,from:_e,to:q}=this;return`for(${$} ${oe}=${_e}; ${oe}<${q}; ${oe}++)`+super.render(C)}get names(){const C=se(super.names,this.from);return se(C,this.to)}}class w extends y{constructor(C,$,oe,_e){super(),this.loop=C,this.varKind=$,this.name=oe,this.iterable=_e}render(C){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(C)}optimizeNames(C,$){if(super.optimizeNames(C,$))return this.iterable=pe(this.iterable,C,$),this}get names(){return F(super.names,this.iterable.names)}}class _ extends m{constructor(C,$,oe){super(),this.name=C,this.args=$,this.async=oe}render(C){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(C)}}_.kind="func";class A extends p{render(C){return"return "+super.render(C)}}A.kind="return";class D extends m{render(C){let $="try"+super.render(C);return this.catch&&($+=this.catch.render(C)),this.finally&&($+=this.finally.render(C)),$}optimizeNodes(){var C,$;return super.optimizeNodes(),(C=this.catch)===null||C===void 0||C.optimizeNodes(),($=this.finally)===null||$===void 0||$.optimizeNodes(),this}optimizeNames(C,$){var oe,_e;return super.optimizeNames(C,$),(oe=this.catch)===null||oe===void 0||oe.optimizeNames(C,$),(_e=this.finally)===null||_e===void 0||_e.optimizeNames(C,$),this}get names(){const C=super.names;return this.catch&&F(C,this.catch.names),this.finally&&F(C,this.finally.names),C}}class E extends m{constructor(C){super(),this.error=C}render(C){return`catch(${this.error})`+super.render(C)}}E.kind="catch";class z extends m{render(C){return"finally"+super.render(C)}}z.kind="finally";class G{constructor(C,$={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...$,_n:$.lines?` +`:""},this._extScope=C,this._scope=new n.Scope({parent:C}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(C){return this._scope.name(C)}scopeName(C){return this._extScope.name(C)}scopeValue(C,$){const oe=this._extScope.value(C,$);return(this._values[oe.prefix]||(this._values[oe.prefix]=new Set)).add(oe),oe}getScopeValue(C,$){return this._extScope.getValue(C,$)}scopeRefs(C){return this._extScope.scopeRefs(C,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(C,$,oe,_e){const q=this._scope.toName($);return oe!==void 0&&_e&&(this._constants[q.str]=oe),this._leafNode(new s(C,q,oe)),q}const(C,$,oe){return this._def(n.varKinds.const,C,$,oe)}let(C,$,oe){return this._def(n.varKinds.let,C,$,oe)}var(C,$,oe){return this._def(n.varKinds.var,C,$,oe)}assign(C,$,oe){return this._leafNode(new a(C,$,oe))}add(C,$){return this._leafNode(new l(C,t.operators.ADD,$))}code(C){return typeof C=="function"?C():C!==e.nil&&this._leafNode(new f(C)),this}object(...C){const $=["{"];for(const[oe,_e]of C)$.length>1&&$.push(","),$.push(oe),(oe!==_e||this.opts.es5)&&($.push(":"),(0,e.addCodeArg)($,_e));return $.push("}"),new e._Code($)}if(C,$,oe){if(this._blockNode(new g(C)),$&&oe)this.code($).else().code(oe).endIf();else if($)this.code($).endIf();else if(oe)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(C){return this._elseNode(new g(C))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(C,$){return this._blockNode(C),$&&this.code($).endFor(),this}for(C,$){return this._for(new k(C),$)}forRange(C,$,oe,_e,q=this.opts.es5?n.varKinds.var:n.varKinds.let){const K=this._scope.toName(C);return this._for(new S(q,K,$,oe),()=>_e(K))}forOf(C,$,oe,_e=n.varKinds.const){const q=this._scope.toName(C);if(this.opts.es5){const K=$ instanceof e.Name?$:this.var("_arr",$);return this.forRange("_i",0,(0,e._)`${K}.length`,L=>{this.var(q,(0,e._)`${K}[${L}]`),oe(q)})}return this._for(new w("of",_e,q,$),()=>oe(q))}forIn(C,$,oe,_e=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(C,(0,e._)`Object.keys(${$})`,oe);const q=this._scope.toName(C);return this._for(new w("in",_e,q,$),()=>oe(q))}endFor(){return this._endBlockNode(y)}label(C){return this._leafNode(new u(C))}break(C){return this._leafNode(new d(C))}return(C){const $=new A;if(this._blockNode($),this.code(C),$.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(C,$,oe){if(!$&&!oe)throw new Error('CodeGen: "try" without "catch" and "finally"');const _e=new D;if(this._blockNode(_e),this.code(C),$){const q=this.name("e");this._currNode=_e.catch=new E(q),$(q)}return oe&&(this._currNode=_e.finally=new z,this.code(oe)),this._endBlockNode(E,z)}throw(C){return this._leafNode(new h(C))}block(C,$){return this._blockStarts.push(this._nodes.length),C&&this.code(C).endBlock($),this}endBlock(C){const $=this._blockStarts.pop();if($===void 0)throw new Error("CodeGen: not in self-balancing block");const oe=this._nodes.length-$;if(oe<0||C!==void 0&&oe!==C)throw new Error(`CodeGen: wrong number of nodes: ${oe} vs ${C} expected`);return this._nodes.length=$,this}func(C,$=e.nil,oe,_e){return this._blockNode(new _(C,$,oe)),_e&&this.code(_e).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(C=1){for(;C-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(C){return this._currNode.nodes.push(C),this}_blockNode(C){this._currNode.nodes.push(C),this._nodes.push(C)}_endBlockNode(C,$){const oe=this._currNode;if(oe instanceof C||$&&oe instanceof $)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${$?`${C.kind}/${$.kind}`:C.kind}"`)}_elseNode(C){const $=this._currNode;if(!($ instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=$.else=C,this}get _root(){return this._nodes[0]}get _currNode(){const C=this._nodes;return C[C.length-1]}set _currNode(C){const $=this._nodes;$[$.length-1]=C}}t.CodeGen=G;function F(M,C){for(const $ in C)M[$]=(M[$]||0)+(C[$]||0);return M}function se(M,C){return C instanceof e._CodeOrName?F(M,C.names):M}function pe(M,C,$){if(M instanceof e.Name)return oe(M);if(!_e(M))return M;return new e._Code(M._items.reduce((q,K)=>(K instanceof e.Name&&(K=oe(K)),K instanceof e._Code?q.push(...K._items):q.push(K),q),[]));function oe(q){const K=$[q.str];return K===void 0||C[q.str]!==1?q:(delete C[q.str],K)}function _e(q){return q instanceof e._Code&&q._items.some(K=>K instanceof e.Name&&C[K.str]===1&&$[K.str]!==void 0)}}function re(M,C){for(const $ in C)M[$]=(M[$]||0)-(C[$]||0)}function Z(M){return typeof M=="boolean"||typeof M=="number"||M===null?!M:(0,e._)`!${Q(M)}`}t.not=Z;const he=I(t.operators.AND);function be(...M){return M.reduce(he)}t.and=be;const fe=I(t.operators.OR);function J(...M){return M.reduce(fe)}t.or=J;function I(M){return(C,$)=>C===e.nil?$:$===e.nil?C:(0,e._)`${Q(C)} ${M} ${Q($)}`}function Q(M){return M instanceof e.Name?M:(0,e._)`(${M})`}})(An);var st={};Object.defineProperty(st,"__esModule",{value:!0});st.checkStrictMode=st.getErrorPath=st.Type=st.useFunc=st.setEvaluated=st.evaluatedPropsToName=st.mergeEvaluated=st.eachItem=st.unescapeJsonPointer=st.escapeJsonPointer=st.escapeFragment=st.unescapeFragment=st.schemaRefOrVal=st.schemaHasRulesButRef=st.schemaHasRules=st.checkUnknownRules=st.alwaysValidSchema=st.toHash=void 0;const ur=An,s9=_d;function a9(t){const e={};for(const n of t)e[n]=!0;return e}st.toHash=a9;function l9(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(ZC(t,e),!e4(e,t.self.RULES.all))}st.alwaysValidSchema=l9;function ZC(t,e=t.schema){const{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;const o=r.RULES.keywords;for(const i in e)o[i]||r4(t,`unknown keyword: "${i}"`)}st.checkUnknownRules=ZC;function e4(t,e){if(typeof t=="boolean")return!t;for(const n in t)if(e[n])return!0;return!1}st.schemaHasRules=e4;function c9(t,e){if(typeof t=="boolean")return!t;for(const n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}st.schemaHasRulesButRef=c9;function u9({topSchemaRef:t,schemaPath:e},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,ur._)`${n}`}return(0,ur._)`${t}${e}${(0,ur.getProperty)(r)}`}st.schemaRefOrVal=u9;function d9(t){return t4(decodeURIComponent(t))}st.unescapeFragment=d9;function h9(t){return encodeURIComponent(b1(t))}st.escapeFragment=h9;function b1(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}st.escapeJsonPointer=b1;function t4(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}st.unescapeJsonPointer=t4;function f9(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)}st.eachItem=f9;function Mx({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(o,i,s,a)=>{const l=s===void 0?i:s instanceof ur.Name?(i instanceof ur.Name?t(o,i,s):e(o,i,s),s):i instanceof ur.Name?(e(o,s,i),i):n(i,s);return a===ur.Name&&!(l instanceof ur.Name)?r(o,l):l}}st.mergeEvaluated={props:Mx({mergeNames:(t,e,n)=>t.if((0,ur._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,ur._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,ur._)`${n} || {}`).code((0,ur._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,ur._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,ur._)`${n} || {}`),y1(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:n4}),items:Mx({mergeNames:(t,e,n)=>t.if((0,ur._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,ur._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,ur._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,ur._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function n4(t,e){if(e===!0)return t.var("props",!0);const n=t.var("props",(0,ur._)`{}`);return e!==void 0&&y1(t,n,e),n}st.evaluatedPropsToName=n4;function y1(t,e,n){Object.keys(n).forEach(r=>t.assign((0,ur._)`${e}${(0,ur.getProperty)(r)}`,!0))}st.setEvaluated=y1;const Tx={};function p9(t,e){return t.scopeValue("func",{ref:e,code:Tx[e.code]||(Tx[e.code]=new s9._Code(e.code))})}st.useFunc=p9;var s0;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(s0||(st.Type=s0={}));function m9(t,e,n){if(t instanceof ur.Name){const r=e===s0.Num;return n?r?(0,ur._)`"[" + ${t} + "]"`:(0,ur._)`"['" + ${t} + "']"`:r?(0,ur._)`"/" + ${t}`:(0,ur._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,ur.getProperty)(t).toString():"/"+b1(t)}st.getErrorPath=m9;function r4(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}st.checkStrictMode=r4;var Ds={};Object.defineProperty(Ds,"__esModule",{value:!0});const Co=An,g9={data:new Co.Name("data"),valCxt:new Co.Name("valCxt"),instancePath:new Co.Name("instancePath"),parentData:new Co.Name("parentData"),parentDataProperty:new Co.Name("parentDataProperty"),rootData:new Co.Name("rootData"),dynamicAnchors:new Co.Name("dynamicAnchors"),vErrors:new Co.Name("vErrors"),errors:new Co.Name("errors"),this:new Co.Name("this"),self:new Co.Name("self"),scope:new Co.Name("scope"),json:new Co.Name("json"),jsonPos:new Co.Name("jsonPos"),jsonLen:new Co.Name("jsonLen"),jsonPart:new Co.Name("jsonPart")};Ds.default=g9;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=An,n=st,r=Ds;t.keywordError={message:({keyword:v})=>(0,e.str)`must pass "${v}" keyword validation`},t.keyword$DataError={message:({keyword:v,schemaType:g})=>g?(0,e.str)`"${v}" keyword must be ${g} ($data)`:(0,e.str)`"${v}" keyword is invalid ($data)`};function o(v,g=t.keywordError,y,k){const{it:S}=v,{gen:w,compositeRule:_,allErrors:A}=S,D=h(v,g,y);k??(_||A)?l(w,D):u(S,(0,e._)`[${D}]`)}t.reportError=o;function i(v,g=t.keywordError,y){const{it:k}=v,{gen:S,compositeRule:w,allErrors:_}=k,A=h(v,g,y);l(S,A),w||_||u(k,r.default.vErrors)}t.reportExtraError=i;function s(v,g){v.assign(r.default.errors,g),v.if((0,e._)`${r.default.vErrors} !== null`,()=>v.if(g,()=>v.assign((0,e._)`${r.default.vErrors}.length`,g),()=>v.assign(r.default.vErrors,null)))}t.resetErrorsCount=s;function a({gen:v,keyword:g,schemaValue:y,data:k,errsCount:S,it:w}){if(S===void 0)throw new Error("ajv implementation error");const _=v.name("err");v.forRange("i",S,r.default.errors,A=>{v.const(_,(0,e._)`${r.default.vErrors}[${A}]`),v.if((0,e._)`${_}.instancePath === undefined`,()=>v.assign((0,e._)`${_}.instancePath`,(0,e.strConcat)(r.default.instancePath,w.errorPath))),v.assign((0,e._)`${_}.schemaPath`,(0,e.str)`${w.errSchemaPath}/${g}`),w.opts.verbose&&(v.assign((0,e._)`${_}.schema`,y),v.assign((0,e._)`${_}.data`,k))})}t.extendErrors=a;function l(v,g){const y=v.const("err",g);v.if((0,e._)`${r.default.vErrors} === null`,()=>v.assign(r.default.vErrors,(0,e._)`[${y}]`),(0,e._)`${r.default.vErrors}.push(${y})`),v.code((0,e._)`${r.default.errors}++`)}function u(v,g){const{gen:y,validateName:k,schemaEnv:S}=v;S.$async?y.throw((0,e._)`new ${v.ValidationError}(${g})`):(y.assign((0,e._)`${k}.errors`,g),y.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function h(v,g,y){const{createErrors:k}=v.it;return k===!1?(0,e._)`{}`:f(v,g,y)}function f(v,g,y={}){const{gen:k,it:S}=v,w=[p(S,y),m(v,y)];return b(v,g,w),k.object(...w)}function p({errorPath:v},{instancePath:g}){const y=g?(0,e.str)`${v}${(0,n.getErrorPath)(g,n.Type.Str)}`:v;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,y)]}function m({keyword:v,it:{errSchemaPath:g}},{schemaPath:y,parentSchema:k}){let S=k?g:(0,e.str)`${g}/${v}`;return y&&(S=(0,e.str)`${S}${(0,n.getErrorPath)(y,n.Type.Str)}`),[d.schemaPath,S]}function b(v,{params:g,message:y},k){const{keyword:S,data:w,schemaValue:_,it:A}=v,{opts:D,propertyName:E,topSchemaRef:z,schemaPath:G}=A;k.push([d.keyword,S],[d.params,typeof g=="function"?g(v):g||(0,e._)`{}`]),D.messages&&k.push([d.message,typeof y=="function"?y(v):y]),D.verbose&&k.push([d.schema,_],[d.parentSchema,(0,e._)`${z}${G}`],[r.default.data,w]),E&&k.push([d.propertyName,E])}})(fh);Object.defineProperty(Zc,"__esModule",{value:!0});Zc.boolOrEmptySchema=Zc.topBoolOrEmptySchema=void 0;const v9=fh,b9=An,y9=Ds,w9={message:"boolean schema is false"};function x9(t){const{gen:e,schema:n,validateName:r}=t;n===!1?o4(t,!1):typeof n=="object"&&n.$async===!0?e.return(y9.default.data):(e.assign((0,b9._)`${r}.errors`,null),e.return(!0))}Zc.topBoolOrEmptySchema=x9;function j9(t,e){const{gen:n,schema:r}=t;r===!1?(n.var(e,!1),o4(t)):n.var(e,!0)}Zc.boolOrEmptySchema=j9;function o4(t,e){const{gen:n,data:r}=t,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,v9.reportError)(o,w9,void 0,e)}var lo={},Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.getRules=Pl.isJSONType=void 0;const k9=["string","number","integer","boolean","null","object","array"],S9=new Set(k9);function C9(t){return typeof t=="string"&&S9.has(t)}Pl.isJSONType=C9;function O9(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Pl.getRules=O9;var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.shouldUseRule=Ks.shouldUseGroup=Ks.schemaHasRulesForType=void 0;function _9({schema:t,self:e},n){const r=e.RULES.types[n];return r&&r!==!0&&i4(t,r)}Ks.schemaHasRulesForType=_9;function i4(t,e){return e.rules.some(n=>s4(t,n))}Ks.shouldUseGroup=i4;function s4(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}Ks.shouldUseRule=s4;Object.defineProperty(lo,"__esModule",{value:!0});lo.reportTypeError=lo.checkDataTypes=lo.checkDataType=lo.coerceAndCheckDataType=lo.getJSONTypes=lo.getSchemaTypes=lo.DataType=void 0;const E9=Pl,A9=Ks,$9=fh,pn=An,a4=st;var Pc;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Pc||(lo.DataType=Pc={}));function M9(t){const e=l4(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}lo.getSchemaTypes=M9;function l4(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(E9.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}lo.getJSONTypes=l4;function T9(t,e){const{gen:n,data:r,opts:o}=t,i=P9(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,A9.schemaHasRulesForType)(t,e[0]));if(s){const a=w1(e,r,o.strictNumbers,Pc.Wrong);n.if(a,()=>{i.length?R9(t,e,i):x1(t)})}return s}lo.coerceAndCheckDataType=T9;const c4=new Set(["string","number","integer","boolean","null"]);function P9(t,e){return e?t.filter(n=>c4.has(n)||e==="array"&&n==="array"):[]}function R9(t,e,n){const{gen:r,data:o,opts:i}=t,s=r.let("dataType",(0,pn._)`typeof ${o}`),a=r.let("coerced",(0,pn._)`undefined`);i.coerceTypes==="array"&&r.if((0,pn._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,pn._)`${o}[0]`).assign(s,(0,pn._)`typeof ${o}`).if(w1(e,o,i.strictNumbers),()=>r.assign(a,o))),r.if((0,pn._)`${a} !== undefined`);for(const u of n)(c4.has(u)||u==="array"&&i.coerceTypes==="array")&&l(u);r.else(),x1(t),r.endIf(),r.if((0,pn._)`${a} !== undefined`,()=>{r.assign(o,a),N9(t,a)});function l(u){switch(u){case"string":r.elseIf((0,pn._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,pn._)`"" + ${o}`).elseIf((0,pn._)`${o} === null`).assign(a,(0,pn._)`""`);return;case"number":r.elseIf((0,pn._)`${s} == "boolean" || ${o} === null + || (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,pn._)`+${o}`);return;case"integer":r.elseIf((0,pn._)`${s} === "boolean" || ${o} === null + || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,pn._)`+${o}`);return;case"boolean":r.elseIf((0,pn._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,pn._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":r.elseIf((0,pn._)`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(a,null);return;case"array":r.elseIf((0,pn._)`${s} === "string" || ${s} === "number" + || ${s} === "boolean" || ${o} === null`).assign(a,(0,pn._)`[${o}]`)}}}function N9({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,pn._)`${e} !== undefined`,()=>t.assign((0,pn._)`${e}[${n}]`,r))}function a0(t,e,n,r=Pc.Correct){const o=r===Pc.Correct?pn.operators.EQ:pn.operators.NEQ;let i;switch(t){case"null":return(0,pn._)`${e} ${o} null`;case"array":i=(0,pn._)`Array.isArray(${e})`;break;case"object":i=(0,pn._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,pn._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,pn._)`typeof ${e} ${o} ${t}`}return r===Pc.Correct?i:(0,pn.not)(i);function s(a=pn.nil){return(0,pn.and)((0,pn._)`typeof ${e} == "number"`,a,n?(0,pn._)`isFinite(${e})`:pn.nil)}}lo.checkDataType=a0;function w1(t,e,n,r){if(t.length===1)return a0(t[0],e,n,r);let o;const i=(0,a4.toHash)(t);if(i.array&&i.object){const s=(0,pn._)`typeof ${e} != "object"`;o=i.null?s:(0,pn._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else o=pn.nil;i.number&&delete i.integer;for(const s in i)o=(0,pn.and)(o,a0(s,e,n,r));return o}lo.checkDataTypes=w1;const D9={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,pn._)`{type: ${t}}`:(0,pn._)`{type: ${e}}`};function x1(t){const e=I9(t);(0,$9.reportError)(e,D9)}lo.reportTypeError=x1;function I9(t){const{gen:e,data:n,schema:r}=t,o=(0,a4.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:t}}var Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});Fm.assignDefaults=void 0;const ic=An,z9=st;function L9(t,e){const{properties:n,items:r}=t.schema;if(e==="object"&&n)for(const o in n)Px(t,o,n[o].default);else e==="array"&&Array.isArray(r)&&r.forEach((o,i)=>Px(t,i,o.default))}Fm.assignDefaults=L9;function Px(t,e,n){const{gen:r,compositeRule:o,data:i,opts:s}=t;if(n===void 0)return;const a=(0,ic._)`${i}${(0,ic.getProperty)(e)}`;if(o){(0,z9.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,ic._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,ic._)`${l} || ${a} === null || ${a} === ""`),r.if(l,(0,ic._)`${a} = ${(0,ic.stringify)(n)}`)}var ws={},Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.validateUnion=Cn.validateArray=Cn.usePattern=Cn.callValidateCode=Cn.schemaProperties=Cn.allSchemaProperties=Cn.noPropertyInData=Cn.propertyInData=Cn.isOwnProperty=Cn.hasPropFunc=Cn.reportMissingProp=Cn.checkMissingProp=Cn.checkReportMissingProp=void 0;const kr=An,j1=st,ha=Ds,B9=st;function F9(t,e){const{gen:n,data:r,it:o}=t;n.if(S1(n,r,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,kr._)`${e}`},!0),t.error()})}Cn.checkReportMissingProp=F9;function q9({gen:t,data:e,it:{opts:n}},r,o){return(0,kr.or)(...r.map(i=>(0,kr.and)(S1(t,e,i,n.ownProperties),(0,kr._)`${o} = ${i}`)))}Cn.checkMissingProp=q9;function U9(t,e){t.setParams({missingProperty:e},!0),t.error()}Cn.reportMissingProp=U9;function u4(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,kr._)`Object.prototype.hasOwnProperty`})}Cn.hasPropFunc=u4;function k1(t,e,n){return(0,kr._)`${u4(t)}.call(${e}, ${n})`}Cn.isOwnProperty=k1;function V9(t,e,n,r){const o=(0,kr._)`${e}${(0,kr.getProperty)(n)} !== undefined`;return r?(0,kr._)`${o} && ${k1(t,e,n)}`:o}Cn.propertyInData=V9;function S1(t,e,n,r){const o=(0,kr._)`${e}${(0,kr.getProperty)(n)} === undefined`;return r?(0,kr.or)(o,(0,kr.not)(k1(t,e,n))):o}Cn.noPropertyInData=S1;function d4(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Cn.allSchemaProperties=d4;function H9(t,e){return d4(e).filter(n=>!(0,j1.alwaysValidSchema)(t,e[n]))}Cn.schemaProperties=H9;function W9({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:o,errorPath:i},it:s},a,l,u){const d=u?(0,kr._)`${t}, ${e}, ${r}${o}`:e,h=[[ha.default.instancePath,(0,kr.strConcat)(ha.default.instancePath,i)],[ha.default.parentData,s.parentData],[ha.default.parentDataProperty,s.parentDataProperty],[ha.default.rootData,ha.default.rootData]];s.opts.dynamicRef&&h.push([ha.default.dynamicAnchors,ha.default.dynamicAnchors]);const f=(0,kr._)`${d}, ${n.object(...h)}`;return l!==kr.nil?(0,kr._)`${a}.call(${l}, ${f})`:(0,kr._)`${a}(${f})`}Cn.callValidateCode=W9;const K9=(0,kr._)`new RegExp`;function J9({gen:t,it:{opts:e}},n){const r=e.unicodeRegExp?"u":"",{regExp:o}=e.code,i=o(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,kr._)`${o.code==="new RegExp"?K9:(0,B9.useFunc)(t,o)}(${n}, ${r})`})}Cn.usePattern=J9;function G9(t){const{gen:e,data:n,keyword:r,it:o}=t,i=e.name("valid");if(o.allErrors){const a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){const l=e.const("len",(0,kr._)`${n}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:r,dataProp:u,dataPropType:j1.Type.Num},i),e.if((0,kr.not)(i),a)})}}Cn.validateArray=G9;function Q9(t){const{gen:e,schema:n,keyword:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,j1.alwaysValidSchema)(o,l))&&!o.opts.unevaluated)return;const s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((l,u)=>{const d=t.subschema({keyword:r,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,kr._)`${s} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0,kr.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Cn.validateUnion=Q9;Object.defineProperty(ws,"__esModule",{value:!0});ws.validateKeywordUsage=ws.validSchemaType=ws.funcKeywordCode=ws.macroKeywordCode=void 0;const zo=An,fl=Ds,Y9=Cn,X9=fh;function Z9(t,e){const{gen:n,keyword:r,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),l=h4(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);const u=n.name("valid");t.subschema({schema:a,schemaPath:zo.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}ws.macroKeywordCode=Z9;function eN(t,e){var n;const{gen:r,keyword:o,schema:i,parentSchema:s,$data:a,it:l}=t;nN(l,e);const u=!a&&e.compile?e.compile.call(l.self,i,s,l):e.validate,d=h4(r,o,u),h=r.let("valid");t.block$data(h,f),t.ok((n=e.valid)!==null&&n!==void 0?n:h);function f(){if(e.errors===!1)b(),e.modifying&&Rx(t),v(()=>t.error());else{const g=e.async?p():m();e.modifying&&Rx(t),v(()=>tN(t,g))}}function p(){const g=r.let("ruleErrs",null);return r.try(()=>b((0,zo._)`await `),y=>r.assign(h,!1).if((0,zo._)`${y} instanceof ${l.ValidationError}`,()=>r.assign(g,(0,zo._)`${y}.errors`),()=>r.throw(y))),g}function m(){const g=(0,zo._)`${d}.errors`;return r.assign(g,null),b(zo.nil),g}function b(g=e.async?(0,zo._)`await `:zo.nil){const y=l.opts.passContext?fl.default.this:fl.default.self,k=!("compile"in e&&!a||e.schema===!1);r.assign(h,(0,zo._)`${g}${(0,Y9.callValidateCode)(t,d,y,k)}`,e.modifying)}function v(g){var y;r.if((0,zo.not)((y=e.valid)!==null&&y!==void 0?y:h),g)}}ws.funcKeywordCode=eN;function Rx(t){const{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,zo._)`${r.parentData}[${r.parentDataProperty}]`))}function tN(t,e){const{gen:n}=t;n.if((0,zo._)`Array.isArray(${e})`,()=>{n.assign(fl.default.vErrors,(0,zo._)`${fl.default.vErrors} === null ? ${e} : ${fl.default.vErrors}.concat(${e})`).assign(fl.default.errors,(0,zo._)`${fl.default.vErrors}.length`),(0,X9.extendErrors)(t)},()=>t.error())}function nN({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function h4(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,zo.stringify)(n)})}function rN(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}ws.validSchemaType=rN;function oN({schema:t,opts:e,self:n,errSchemaPath:r},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(s!=null&&s.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[i])){const l=`keyword "${i}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}ws.validateKeywordUsage=oN;var Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.extendSubschemaMode=Ta.extendSubschemaData=Ta.getSubschema=void 0;const gs=An,f4=st;function iN(t,{keyword:e,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,gs._)`${t.schemaPath}${(0,gs.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,gs._)`${t.schemaPath}${(0,gs.getProperty)(e)}${(0,gs.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,f4.escapeFragment)(n)}`}}if(r!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Ta.getSubschema=iN;function sN(t,e,{dataProp:n,dataPropType:r,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=e;if(n!==void 0){const{errorPath:u,dataPathArr:d,opts:h}=e,f=a.let("data",(0,gs._)`${e.data}${(0,gs.getProperty)(n)}`,!0);l(f),t.errorPath=(0,gs.str)`${u}${(0,f4.getErrorPath)(n,r,h.jsPropertySyntax)}`,t.parentDataProperty=(0,gs._)`${n}`,t.dataPathArr=[...d,t.parentDataProperty]}if(o!==void 0){const u=o instanceof gs.Name?o:a.let("data",o,!0);l(u),s!==void 0&&(t.propertyName=s)}i&&(t.dataTypes=i);function l(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Ta.extendSubschemaData=sN;function aN(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:i}){r!==void 0&&(t.compositeRule=r),o!==void 0&&(t.createErrors=o),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=n}Ta.extendSubschemaMode=aN;var vo={},p4=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},m4={exports:{}},Ca=m4.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},o=n.post||function(){};Vf(e,r,o,t,"",t)};Ca.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ca.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ca.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ca.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Vf(t,e,n,r,o,i,s,a,l,u){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,o,i,s,a,l,u);for(var d in r){var h=r[d];if(Array.isArray(h)){if(d in Ca.arrayKeywords)for(var f=0;fe+=g4(r)),e===1/0))return 1/0}return e}function v4(t,e="",n){n!==!1&&(e=Rc(e));const r=t.parse(e);return b4(t,r)}vo.getFullPath=v4;function b4(t,e){return t.serialize(e).split("#")[0]+"#"}vo._getFullPath=b4;const gN=/#\/?$/;function Rc(t){return t?t.replace(gN,""):""}vo.normalizeId=Rc;function vN(t,e,n){return n=Rc(n),t.resolve(e,n)}vo.resolveUrl=vN;const bN=/^[a-z_][-a-z0-9._]*$/i;function yN(t,e){if(typeof t=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,o=Rc(t[n]||e),i={"":o},s=v4(r,o,!1),a={},l=new Set;return hN(t,{allKeys:!0},(h,f,p,m)=>{if(m===void 0)return;const b=s+f;let v=i[m];typeof h[n]=="string"&&(v=g.call(this,h[n])),y.call(this,h.$anchor),y.call(this,h.$dynamicAnchor),i[f]=v;function g(k){const S=this.opts.uriResolver.resolve;if(k=Rc(v?S(v,k):k),l.has(k))throw d(k);l.add(k);let w=this.refs[k];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?u(h,w.schema,k):k!==Rc(b)&&(k[0]==="#"?(u(h,a[k],k),a[k]=h):this.refs[k]=b),k}function y(k){if(typeof k=="string"){if(!bN.test(k))throw new Error(`invalid anchor "${k}"`);g.call(this,`#${k}`)}}}),a;function u(h,f,p){if(f!==void 0&&!dN(h,f))throw d(p)}function d(h){return new Error(`reference "${h}" resolves to more than one schema`)}}vo.getSchemaRefs=yN;Object.defineProperty(Gi,"__esModule",{value:!0});Gi.getData=Gi.KeywordCxt=Gi.validateFunctionCode=void 0;const y4=Zc,Nx=lo,C1=Ks,Cp=lo,wN=Fm,ud=ws,Fg=Ta,wt=An,rn=Ds,xN=vo,Js=st,Iu=fh;function jN(t){if(j4(t)&&(k4(t),x4(t))){CN(t);return}w4(t,()=>(0,y4.topBoolOrEmptySchema)(t))}Gi.validateFunctionCode=jN;function w4({gen:t,validateName:e,schema:n,schemaEnv:r,opts:o},i){o.code.es5?t.func(e,(0,wt._)`${rn.default.data}, ${rn.default.valCxt}`,r.$async,()=>{t.code((0,wt._)`"use strict"; ${Dx(n,o)}`),SN(t,o),t.code(i)}):t.func(e,(0,wt._)`${rn.default.data}, ${kN(o)}`,r.$async,()=>t.code(Dx(n,o)).code(i))}function kN(t){return(0,wt._)`{${rn.default.instancePath}="", ${rn.default.parentData}, ${rn.default.parentDataProperty}, ${rn.default.rootData}=${rn.default.data}${t.dynamicRef?(0,wt._)`, ${rn.default.dynamicAnchors}={}`:wt.nil}}={}`}function SN(t,e){t.if(rn.default.valCxt,()=>{t.var(rn.default.instancePath,(0,wt._)`${rn.default.valCxt}.${rn.default.instancePath}`),t.var(rn.default.parentData,(0,wt._)`${rn.default.valCxt}.${rn.default.parentData}`),t.var(rn.default.parentDataProperty,(0,wt._)`${rn.default.valCxt}.${rn.default.parentDataProperty}`),t.var(rn.default.rootData,(0,wt._)`${rn.default.valCxt}.${rn.default.rootData}`),e.dynamicRef&&t.var(rn.default.dynamicAnchors,(0,wt._)`${rn.default.valCxt}.${rn.default.dynamicAnchors}`)},()=>{t.var(rn.default.instancePath,(0,wt._)`""`),t.var(rn.default.parentData,(0,wt._)`undefined`),t.var(rn.default.parentDataProperty,(0,wt._)`undefined`),t.var(rn.default.rootData,rn.default.data),e.dynamicRef&&t.var(rn.default.dynamicAnchors,(0,wt._)`{}`)})}function CN(t){const{schema:e,opts:n,gen:r}=t;w4(t,()=>{n.$comment&&e.$comment&&C4(t),$N(t),r.let(rn.default.vErrors,null),r.let(rn.default.errors,0),n.unevaluated&&ON(t),S4(t),PN(t)})}function ON(t){const{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,wt._)`${n}.evaluated`),e.if((0,wt._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,wt._)`${t.evaluated}.props`,(0,wt._)`undefined`)),e.if((0,wt._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,wt._)`${t.evaluated}.items`,(0,wt._)`undefined`))}function Dx(t,e){const n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,wt._)`/*# sourceURL=${n} */`:wt.nil}function _N(t,e){if(j4(t)&&(k4(t),x4(t))){EN(t,e);return}(0,y4.boolOrEmptySchema)(t,e)}function x4({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const n in t)if(e.RULES.all[n])return!0;return!1}function j4(t){return typeof t.schema!="boolean"}function EN(t,e){const{schema:n,gen:r,opts:o}=t;o.$comment&&n.$comment&&C4(t),MN(t),TN(t);const i=r.const("_errs",rn.default.errors);S4(t,i),r.var(e,(0,wt._)`${i} === ${rn.default.errors}`)}function k4(t){(0,Js.checkUnknownRules)(t),AN(t)}function S4(t,e){if(t.opts.jtd)return Ix(t,[],!1,e);const n=(0,Nx.getSchemaTypes)(t.schema),r=(0,Nx.coerceAndCheckDataType)(t,n);Ix(t,n,!r,e)}function AN(t){const{schema:e,errSchemaPath:n,opts:r,self:o}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,Js.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function $N(t){const{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,Js.checkStrictMode)(t,"default is ignored in the schema root")}function MN(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,xN.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function TN(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function C4({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:o}){const i=n.$comment;if(o.$comment===!0)t.code((0,wt._)`${rn.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){const s=(0,wt.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,wt._)`${rn.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function PN(t){const{gen:e,schemaEnv:n,validateName:r,ValidationError:o,opts:i}=t;n.$async?e.if((0,wt._)`${rn.default.errors} === 0`,()=>e.return(rn.default.data),()=>e.throw((0,wt._)`new ${o}(${rn.default.vErrors})`)):(e.assign((0,wt._)`${r}.errors`,rn.default.vErrors),i.unevaluated&&RN(t),e.return((0,wt._)`${rn.default.errors} === 0`))}function RN({gen:t,evaluated:e,props:n,items:r}){n instanceof wt.Name&&t.assign((0,wt._)`${e}.props`,n),r instanceof wt.Name&&t.assign((0,wt._)`${e}.items`,r)}function Ix(t,e,n,r){const{gen:o,schema:i,data:s,allErrors:a,opts:l,self:u}=t,{RULES:d}=u;if(i.$ref&&(l.ignoreKeywordsWithRef||!(0,Js.schemaHasRulesButRef)(i,d))){o.block(()=>E4(t,"$ref",d.all.$ref.definition));return}l.jtd||NN(t,e),o.block(()=>{for(const f of d.rules)h(f);h(d.post)});function h(f){(0,C1.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Cp.checkDataType)(f.type,s,l.strictNumbers)),zx(t,f),e.length===1&&e[0]===f.type&&n&&(o.else(),(0,Cp.reportTypeError)(t)),o.endIf()):zx(t,f),a||o.if((0,wt._)`${rn.default.errors} === ${r||0}`))}}function zx(t,e){const{gen:n,schema:r,opts:{useDefaults:o}}=t;o&&(0,wN.assignDefaults)(t,e.type),n.block(()=>{for(const i of e.rules)(0,C1.shouldUseRule)(r,i)&&E4(t,i.keyword,i.definition,e.type)})}function NN(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(DN(t,e),t.opts.allowUnionTypes||IN(t,e),zN(t,t.dataTypes))}function DN(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{O4(t.dataTypes,n)||O1(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),BN(t,e)}}function IN(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&O1(t,"use allowUnionTypes to allow union type keyword")}function zN(t,e){const n=t.self.RULES.all;for(const r in n){const o=n[r];if(typeof o=="object"&&(0,C1.shouldUseRule)(t.schema,o)){const{type:i}=o.definition;i.length&&!i.some(s=>LN(e,s))&&O1(t,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function LN(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function O4(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function BN(t,e){const n=[];for(const r of t.dataTypes)O4(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function O1(t,e){const n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,Js.checkStrictMode)(t,e,t.opts.strictTypes)}class _4{constructor(e,n,r){if((0,ud.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Js.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",A4(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ud.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",rn.default.errors))}result(e,n,r){this.failResult((0,wt.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,wt.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:n}=this;this.fail((0,wt._)`${n} !== undefined && (${(0,wt.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Iu.reportExtraError:Iu.reportError)(this,this.def.error,n)}$dataError(){(0,Iu.reportError)(this,this.def.$dataError||Iu.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Iu.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=wt.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=wt.nil,n=wt.nil){if(!this.$data)return;const{gen:r,schemaCode:o,schemaType:i,def:s}=this;r.if((0,wt.or)((0,wt._)`${o} === undefined`,n)),e!==wt.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==wt.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:n,schemaType:r,def:o,it:i}=this;return(0,wt.or)(s(),a());function s(){if(r.length){if(!(n instanceof wt.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,wt._)`${(0,Cp.checkDataTypes)(l,n,i.opts.strictNumbers,Cp.DataType.Wrong)}`}return wt.nil}function a(){if(o.validateSchema){const l=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,wt._)`!${l}(${n})`}return wt.nil}}subschema(e,n){const r=(0,Fg.getSubschema)(this.it,e);(0,Fg.extendSubschemaData)(r,this.it,e),(0,Fg.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return _N(o,n),o}mergeEvaluated(e,n){const{it:r,gen:o}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=Js.mergeEvaluated.props(o,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=Js.mergeEvaluated.items(o,e.items,r.items,n)))}mergeValidEvaluated(e,n){const{it:r,gen:o}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return o.if(n,()=>this.mergeEvaluated(e,wt.Name)),!0}}Gi.KeywordCxt=_4;function E4(t,e,n,r){const o=new _4(t,n,e);"code"in n?n.code(o,r):o.$data&&n.validate?(0,ud.funcKeywordCode)(o,n):"macro"in n?(0,ud.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,ud.funcKeywordCode)(o,n)}const FN=/^\/(?:[^~]|~0|~1)*$/,qN=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A4(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let o,i;if(t==="")return rn.default.rootData;if(t[0]==="/"){if(!FN.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=rn.default.rootData}else{const u=qN.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);const d=+u[1];if(o=u[2],o==="#"){if(d>=e)throw new Error(l("property/index",d));return r[e-d]}if(d>e)throw new Error(l("data",d));if(i=n[e-d],!o)return i}let s=i;const a=o.split("/");for(const u of a)u&&(i=(0,wt._)`${i}${(0,wt.getProperty)((0,Js.unescapeJsonPointer)(u))}`,s=(0,wt._)`${s} && ${i}`);return s;function l(u,d){return`Cannot access ${u} ${d} levels up, current level is ${e}`}}Gi.getData=A4;var ph={};Object.defineProperty(ph,"__esModule",{value:!0});class UN extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}ph.default=UN;var yu={};Object.defineProperty(yu,"__esModule",{value:!0});const qg=vo;class VN extends Error{constructor(e,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,qg.resolveUrl)(e,n,r),this.missingSchema=(0,qg.normalizeId)((0,qg.getFullPath)(e,this.missingRef))}}yu.default=VN;var Xo={};Object.defineProperty(Xo,"__esModule",{value:!0});Xo.resolveSchema=Xo.getCompilingSchema=Xo.resolveRef=Xo.compileSchema=Xo.SchemaEnv=void 0;const Di=An,HN=ph,ll=Ds,qi=vo,Lx=st,WN=Gi;class qm{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,qi.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Xo.SchemaEnv=qm;function _1(t){const e=$4.call(this,t);if(e)return e;const n=(0,qi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Di.CodeGen(this.scope,{es5:r,lines:o,ownProperties:i});let a;t.$async&&(a=s.scopeValue("Error",{ref:HN.default,code:(0,Di._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");t.validateName=l;const u={gen:s,allErrors:this.opts.allErrors,data:ll.default.data,parentData:ll.default.parentData,parentDataProperty:ll.default.parentDataProperty,dataNames:[ll.default.data],dataPathArr:[Di.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Di.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:Di.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Di._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(t),(0,WN.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);const h=s.toString();d=`${s.scopeRefs(ll.default.scope)}return ${h}`,this.opts.code.process&&(d=this.opts.code.process(d,t));const p=new Function(`${ll.default.self}`,`${ll.default.scope}`,d)(this,this.scope.get());if(this.scope.value(l,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:l,validateCode:h,scopeValues:s._values}),this.opts.unevaluated){const{props:m,items:b}=u;p.evaluated={props:m instanceof Di.Name?void 0:m,items:b instanceof Di.Name?void 0:b,dynamicProps:m instanceof Di.Name,dynamicItems:b instanceof Di.Name},p.source&&(p.source.evaluated=(0,Di.stringify)(p.evaluated))}return t.validate=p,t}catch(h){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),h}finally{this._compilations.delete(t)}}Xo.compileSchema=_1;function KN(t,e,n){var r;n=(0,qi.resolveUrl)(this.opts.uriResolver,e,n);const o=t.refs[n];if(o)return o;let i=QN.call(this,t,n);if(i===void 0){const s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(i=new qm({schema:s,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[n]=JN.call(this,i)}Xo.resolveRef=KN;function JN(t){return(0,qi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:_1.call(this,t)}function $4(t){for(const e of this._compilations)if(GN(e,t))return e}Xo.getCompilingSchema=$4;function GN(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function QN(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Um.call(this,t,e)}function Um(t,e){const n=this.opts.uriResolver.parse(e),r=(0,qi._getFullPath)(this.opts.uriResolver,n);let o=(0,qi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===o)return Ug.call(this,n,t);const i=(0,qi.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){const a=Um.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:Ug.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||_1.call(this,s),i===(0,qi.normalizeId)(e)){const{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(o=(0,qi.resolveUrl)(this.opts.uriResolver,o,u)),new qm({schema:a,schemaId:l,root:t,baseId:o})}return Ug.call(this,n,s)}}Xo.resolveSchema=Um;const YN=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ug(t,{baseId:e,schema:n,root:r}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(const a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,Lx.unescapeFragment)(a)];if(l===void 0)return;n=l;const u=typeof n=="object"&&n[this.opts.schemaId];!YN.has(a)&&u&&(e=(0,qi.resolveUrl)(this.opts.uriResolver,e,u))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,Lx.schemaHasRulesButRef)(n,this.RULES)){const a=(0,qi.resolveUrl)(this.opts.uriResolver,e,n.$ref);i=Um.call(this,r,a)}const{schemaId:s}=this.opts;if(i=i||new qm({schema:n,schemaId:s,root:r,baseId:e}),i.schema!==i.root.schema)return i}const XN="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ZN="Meta-schema for $data reference (JSON AnySchema extension proposal)",eD="object",tD=["$data"],nD={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},rD=!1,oD={$id:XN,description:ZN,type:eD,required:tD,properties:nD,additionalProperties:rD};var E1={},Vm={exports:{}};const iD={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var sD={HEX:iD};const{HEX:aD}=sD;function M4(t){if(P4(t,".")<3)return{host:t,isIPV4:!1};const e=t.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=e;return n?{host:cD(n,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function c0(t,e=!1){let n="",r=!0;for(const o of t){if(aD[o]===void 0)return;o!=="0"&&r===!0&&(r=!1),r||(n+=o)}return e&&n.length===0&&(n="0"),n}function lD(t){let e=0;const n={error:!1,address:"",zone:""},r=[],o=[];let i=!1,s=!1,a=!1;function l(){if(o.length){if(i===!1){const u=c0(o);if(u!==void 0)r.push(u);else return n.error=!0,!1}o.length=0}return!0}for(let u=0;u7){n.error=!0;break}u-1>=0&&t[u-1]===":"&&(s=!0);continue}else if(d==="%"){if(!l())break;i=!0}else{o.push(d);continue}}return o.length&&(i?n.zone=o.join(""):a?r.push(o.join("")):r.push(c0(o))),n.address=r.join(""),n}function T4(t,e={}){if(P4(t,":")<2)return{host:t,isIPV6:!1};const n=lD(t);if(n.error)return{host:t,isIPV6:!1};{let r=n.address,o=n.address;return n.zone&&(r+="%"+n.zone,o+="%25"+n.zone),{host:r,escapedHost:o,isIPV6:!0}}}function cD(t,e){let n="",r=!0;const o=t.length;for(let i=0;i/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function ND(t){let e=0;for(let n=0,r=t.length;n126||RD[e])return!0;return!1}const DD=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function na(t,e){const n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=t.indexOf("%")!==-1;let i=!1;n.reference==="suffix"&&(t=(n.scheme?n.scheme+":":"")+"//"+t);const s=t.match(DD);if(s){if(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]),r.host){const l=AD(r.host);if(l.isIPV4===!1){const u=ED(l.host,{isIPV4:!1});r.host=u.host.toLowerCase(),i=u.isIPV6}else r.host=l.host,i=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&!r.path&&r.query===void 0?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const a=$1[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!a||!a.unicodeSupport)&&r.host&&(n.domainHost||a&&a.domainHost)&&i===!1&&ND(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!a||a&&!a.skipNormalize)&&(o&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),o&&r.host!==void 0&&(r.host=unescape(r.host)),r.path!==void 0&&r.path.length&&(r.path=escape(unescape(r.path))),r.fragment!==void 0&&r.fragment.length&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),a&&a.parse&&a.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const M1={SCHEMES:$1,normalize:MD,resolve:TD,resolveComponents:z4,equal:PD,serialize:xs,parse:na};Vm.exports=M1;Vm.exports.default=M1;Vm.exports.fastUri=M1;var ID=Vm.exports;Object.defineProperty(E1,"__esModule",{value:!0});const L4=ID;L4.code='require("ajv/dist/runtime/uri").default';E1.default=L4;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Gi;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var n=An;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=ph,o=yu,i=Pl,s=Xo,a=An,l=vo,u=lo,d=st,h=oD,f=E1,p=(J,I)=>new RegExp(J,I);p.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function k(J){var I,Q,M,C,$,oe,_e,q,K,L,xe,Je,ce,ae,W,it,vt,rt,Ee,Ge,Ue,ft,Et,et,Pe;const O=J.strict,T=(I=J.code)===null||I===void 0?void 0:I.optimize,N=T===!0||T===void 0?1:T||0,ne=(M=(Q=J.code)===null||Q===void 0?void 0:Q.regExp)!==null&&M!==void 0?M:p,X=(C=J.uriResolver)!==null&&C!==void 0?C:f.default;return{strictSchema:(oe=($=J.strictSchema)!==null&&$!==void 0?$:O)!==null&&oe!==void 0?oe:!0,strictNumbers:(q=(_e=J.strictNumbers)!==null&&_e!==void 0?_e:O)!==null&&q!==void 0?q:!0,strictTypes:(L=(K=J.strictTypes)!==null&&K!==void 0?K:O)!==null&&L!==void 0?L:"log",strictTuples:(Je=(xe=J.strictTuples)!==null&&xe!==void 0?xe:O)!==null&&Je!==void 0?Je:"log",strictRequired:(ae=(ce=J.strictRequired)!==null&&ce!==void 0?ce:O)!==null&&ae!==void 0?ae:!1,code:J.code?{...J.code,optimize:N,regExp:ne}:{optimize:N,regExp:ne},loopRequired:(W=J.loopRequired)!==null&&W!==void 0?W:y,loopEnum:(it=J.loopEnum)!==null&&it!==void 0?it:y,meta:(vt=J.meta)!==null&&vt!==void 0?vt:!0,messages:(rt=J.messages)!==null&&rt!==void 0?rt:!0,inlineRefs:(Ee=J.inlineRefs)!==null&&Ee!==void 0?Ee:!0,schemaId:(Ge=J.schemaId)!==null&&Ge!==void 0?Ge:"$id",addUsedSchema:(Ue=J.addUsedSchema)!==null&&Ue!==void 0?Ue:!0,validateSchema:(ft=J.validateSchema)!==null&&ft!==void 0?ft:!0,validateFormats:(Et=J.validateFormats)!==null&&Et!==void 0?Et:!0,unicodeRegExp:(et=J.unicodeRegExp)!==null&&et!==void 0?et:!0,int32range:(Pe=J.int32range)!==null&&Pe!==void 0?Pe:!0,uriResolver:X}}class S{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...k(I)};const{es5:Q,lines:M}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:b,es5:Q,lines:M}),this.logger=F(I.logger);const C=I.validateFormats;I.validateFormats=!1,this.RULES=(0,i.getRules)(),w.call(this,v,I,"NOT SUPPORTED"),w.call(this,g,I,"DEPRECATED","warn"),this._metaOpts=z.call(this),I.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&E.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),A.call(this),I.validateFormats=C}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:I,meta:Q,schemaId:M}=this.opts;let C=h;M==="id"&&(C={...h},C.id=C.$id,delete C.$id),Q&&I&&this.addMetaSchema(C,C[M],!1)}defaultMeta(){const{meta:I,schemaId:Q}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[Q]||I:void 0}validate(I,Q){let M;if(typeof I=="string"){if(M=this.getSchema(I),!M)throw new Error(`no schema with key or ref "${I}"`)}else M=this.compile(I);const C=M(Q);return"$async"in M||(this.errors=M.errors),C}compile(I,Q){const M=this._addSchema(I,Q);return M.validate||this._compileSchemaEnv(M)}compileAsync(I,Q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:M}=this.opts;return C.call(this,I,Q);async function C(L,xe){await $.call(this,L.$schema);const Je=this._addSchema(L,xe);return Je.validate||oe.call(this,Je)}async function $(L){L&&!this.getSchema(L)&&await C.call(this,{$ref:L},!0)}async function oe(L){try{return this._compileSchemaEnv(L)}catch(xe){if(!(xe instanceof o.default))throw xe;return _e.call(this,xe),await q.call(this,xe.missingSchema),oe.call(this,L)}}function _e({missingSchema:L,missingRef:xe}){if(this.refs[L])throw new Error(`AnySchema ${L} is loaded but ${xe} cannot be resolved`)}async function q(L){const xe=await K.call(this,L);this.refs[L]||await $.call(this,xe.$schema),this.refs[L]||this.addSchema(xe,L,Q)}async function K(L){const xe=this._loading[L];if(xe)return xe;try{return await(this._loading[L]=M(L))}finally{delete this._loading[L]}}}addSchema(I,Q,M,C=this.opts.validateSchema){if(Array.isArray(I)){for(const oe of I)this.addSchema(oe,void 0,M,C);return this}let $;if(typeof I=="object"){const{schemaId:oe}=this.opts;if($=I[oe],$!==void 0&&typeof $!="string")throw new Error(`schema ${oe} must be string`)}return Q=(0,l.normalizeId)(Q||$),this._checkUnique(Q),this.schemas[Q]=this._addSchema(I,M,Q,C,!0),this}addMetaSchema(I,Q,M=this.opts.validateSchema){return this.addSchema(I,Q,!0,M),this}validateSchema(I,Q){if(typeof I=="boolean")return!0;let M;if(M=I.$schema,M!==void 0&&typeof M!="string")throw new Error("$schema must be a string");if(M=M||this.opts.defaultMeta||this.defaultMeta(),!M)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const C=this.validate(M,I);if(!C&&Q){const $="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error($);else throw new Error($)}return C}getSchema(I){let Q;for(;typeof(Q=_.call(this,I))=="string";)I=Q;if(Q===void 0){const{schemaId:M}=this.opts,C=new s.SchemaEnv({schema:{},schemaId:M});if(Q=s.resolveSchema.call(this,C,I),!Q)return;this.refs[I]=Q}return Q.validate||this._compileSchemaEnv(Q)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const Q=_.call(this,I);return typeof Q=="object"&&this._cache.delete(Q.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{const Q=I;this._cache.delete(Q);let M=I[this.opts.schemaId];return M&&(M=(0,l.normalizeId)(M),delete this.schemas[M],delete this.refs[M]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(const Q of I)this.addKeyword(Q);return this}addKeyword(I,Q){let M;if(typeof I=="string")M=I,typeof Q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Q.keyword=M);else if(typeof I=="object"&&Q===void 0){if(Q=I,M=Q.keyword,Array.isArray(M)&&!M.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,M,Q),!Q)return(0,d.eachItem)(M,$=>re.call(this,$)),this;he.call(this,Q);const C={...Q,type:(0,u.getJSONTypes)(Q.type),schemaType:(0,u.getJSONTypes)(Q.schemaType)};return(0,d.eachItem)(M,C.type.length===0?$=>re.call(this,$,C):$=>C.type.forEach(oe=>re.call(this,$,C,oe))),this}getKeyword(I){const Q=this.RULES.all[I];return typeof Q=="object"?Q.definition:!!Q}removeKeyword(I){const{RULES:Q}=this;delete Q.keywords[I],delete Q.all[I];for(const M of Q.rules){const C=M.rules.findIndex($=>$.keyword===I);C>=0&&M.rules.splice(C,1)}return this}addFormat(I,Q){return typeof Q=="string"&&(Q=new RegExp(Q)),this.formats[I]=Q,this}errorsText(I=this.errors,{separator:Q=", ",dataVar:M="data"}={}){return!I||I.length===0?"No errors":I.map(C=>`${M}${C.instancePath} ${C.message}`).reduce((C,$)=>C+Q+$)}$dataMetaSchema(I,Q){const M=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(const C of Q){const $=C.split("/").slice(1);let oe=I;for(const _e of $)oe=oe[_e];for(const _e in M){const q=M[_e];if(typeof q!="object")continue;const{$data:K}=q.definition,L=oe[_e];K&&L&&(oe[_e]=fe(L))}}return I}_removeAllSchemas(I,Q){for(const M in I){const C=I[M];(!Q||Q.test(M))&&(typeof C=="string"?delete I[M]:C&&!C.meta&&(this._cache.delete(C.schema),delete I[M]))}}_addSchema(I,Q,M,C=this.opts.validateSchema,$=this.opts.addUsedSchema){let oe;const{schemaId:_e}=this.opts;if(typeof I=="object")oe=I[_e];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof I!="boolean")throw new Error("schema must be object or boolean")}let q=this._cache.get(I);if(q!==void 0)return q;M=(0,l.normalizeId)(oe||M);const K=l.getSchemaRefs.call(this,I,M);return q=new s.SchemaEnv({schema:I,schemaId:_e,meta:Q,baseId:M,localRefs:K}),this._cache.set(q.schema,q),$&&!M.startsWith("#")&&(M&&this._checkUnique(M),this.refs[M]=q),C&&this.validateSchema(I,!0),q}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw new Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):s.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}_compileMetaSchema(I){const Q=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,I)}finally{this.opts=Q}}}S.ValidationError=r.default,S.MissingRefError=o.default,t.default=S;function w(J,I,Q,M="error"){for(const C in J){const $=C;$ in I&&this.logger[M](`${Q}: option ${C}. ${J[$]}`)}}function _(J){return J=(0,l.normalizeId)(J),this.schemas[J]||this.refs[J]}function A(){const J=this.opts.schemas;if(J)if(Array.isArray(J))this.addSchema(J);else for(const I in J)this.addSchema(J[I],I)}function D(){for(const J in this.opts.formats){const I=this.opts.formats[J];I&&this.addFormat(J,I)}}function E(J){if(Array.isArray(J)){this.addVocabulary(J);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const I in J){const Q=J[I];Q.keyword||(Q.keyword=I),this.addKeyword(Q)}}function z(){const J={...this.opts};for(const I of m)delete J[I];return J}const G={log(){},warn(){},error(){}};function F(J){if(J===!1)return G;if(J===void 0)return console;if(J.log&&J.warn&&J.error)return J;throw new Error("logger must implement log, warn and error methods")}const se=/^[a-z_$][a-z0-9_$:-]*$/i;function pe(J,I){const{RULES:Q}=this;if((0,d.eachItem)(J,M=>{if(Q.keywords[M])throw new Error(`Keyword ${M} is already defined`);if(!se.test(M))throw new Error(`Keyword ${M} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function re(J,I,Q){var M;const C=I==null?void 0:I.post;if(Q&&C)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:$}=this;let oe=C?$.post:$.rules.find(({type:q})=>q===Q);if(oe||(oe={type:Q,rules:[]},$.rules.push(oe)),$.keywords[J]=!0,!I)return;const _e={keyword:J,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?Z.call(this,oe,_e,I.before):oe.rules.push(_e),$.all[J]=_e,(M=I.implements)===null||M===void 0||M.forEach(q=>this.addKeyword(q))}function Z(J,I,Q){const M=J.rules.findIndex(C=>C.keyword===Q);M>=0?J.rules.splice(M,0,I):(J.rules.push(I),this.logger.warn(`rule ${Q} is not defined`))}function he(J){let{metaSchema:I}=J;I!==void 0&&(J.$data&&this.opts.$data&&(I=fe(I)),J.validateSchema=this.compile(I,!0))}const be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(J){return{anyOf:[J,be]}}})(XC);var T1={},P1={},R1={};Object.defineProperty(R1,"__esModule",{value:!0});const zD={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};R1.default=zD;var Rl={};Object.defineProperty(Rl,"__esModule",{value:!0});Rl.callRef=Rl.getValidate=void 0;const LD=yu,Ux=Cn,Ko=An,sc=Ds,Vx=Xo,Yh=st,BD={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:n,it:r}=t,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:l}=r,{root:u}=i;if((n==="#"||n==="#/")&&o===u.baseId)return h();const d=Vx.resolveRef.call(l,u,o,n);if(d===void 0)throw new LD.default(r.opts.uriResolver,o,n);if(d instanceof Vx.SchemaEnv)return f(d);return p(d);function h(){if(i===u)return Wf(t,s,i,i.$async);const m=e.scopeValue("root",{ref:u});return Wf(t,(0,Ko._)`${m}.validate`,u,u.$async)}function f(m){const b=B4(t,m);Wf(t,b,m,m.$async)}function p(m){const b=e.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,Ko.stringify)(m)}:{ref:m}),v=e.name("valid"),g=t.subschema({schema:m,dataTypes:[],schemaPath:Ko.nil,topSchemaRef:b,errSchemaPath:n},v);t.mergeEvaluated(g),t.ok(v)}}};function B4(t,e){const{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,Ko._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Rl.getValidate=B4;function Wf(t,e,n,r){const{gen:o,it:i}=t,{allErrors:s,schemaEnv:a,opts:l}=i,u=l.passContext?sc.default.this:Ko.nil;r?d():h();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");const m=o.let("valid");o.try(()=>{o.code((0,Ko._)`await ${(0,Ux.callValidateCode)(t,e,u)}`),p(e),s||o.assign(m,!0)},b=>{o.if((0,Ko._)`!(${b} instanceof ${i.ValidationError})`,()=>o.throw(b)),f(b),s||o.assign(m,!1)}),t.ok(m)}function h(){t.result((0,Ux.callValidateCode)(t,e,u),()=>p(e),()=>f(e))}function f(m){const b=(0,Ko._)`${m}.errors`;o.assign(sc.default.vErrors,(0,Ko._)`${sc.default.vErrors} === null ? ${b} : ${sc.default.vErrors}.concat(${b})`),o.assign(sc.default.errors,(0,Ko._)`${sc.default.vErrors}.length`)}function p(m){var b;if(!i.opts.unevaluated)return;const v=(b=n==null?void 0:n.validate)===null||b===void 0?void 0:b.evaluated;if(i.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(i.props=Yh.mergeEvaluated.props(o,v.props,i.props));else{const g=o.var("props",(0,Ko._)`${m}.evaluated.props`);i.props=Yh.mergeEvaluated.props(o,g,i.props,Ko.Name)}if(i.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(i.items=Yh.mergeEvaluated.items(o,v.items,i.items));else{const g=o.var("items",(0,Ko._)`${m}.evaluated.items`);i.items=Yh.mergeEvaluated.items(o,g,i.items,Ko.Name)}}}Rl.callRef=Wf;Rl.default=BD;Object.defineProperty(P1,"__esModule",{value:!0});const FD=R1,qD=Rl,UD=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",FD.default,qD.default];P1.default=UD;var N1={},D1={};Object.defineProperty(D1,"__esModule",{value:!0});const Op=An,fa=Op.operators,_p={maximum:{okStr:"<=",ok:fa.LTE,fail:fa.GT},minimum:{okStr:">=",ok:fa.GTE,fail:fa.LT},exclusiveMaximum:{okStr:"<",ok:fa.LT,fail:fa.GTE},exclusiveMinimum:{okStr:">",ok:fa.GT,fail:fa.LTE}},VD={message:({keyword:t,schemaCode:e})=>(0,Op.str)`must be ${_p[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Op._)`{comparison: ${_p[t].okStr}, limit: ${e}}`},HD={keyword:Object.keys(_p),type:"number",schemaType:"number",$data:!0,error:VD,code(t){const{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,Op._)`${n} ${_p[e].fail} ${r} || isNaN(${n})`)}};D1.default=HD;var I1={};Object.defineProperty(I1,"__esModule",{value:!0});const dd=An,WD={message:({schemaCode:t})=>(0,dd.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,dd._)`{multipleOf: ${t}}`},KD={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:WD,code(t){const{gen:e,data:n,schemaCode:r,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,dd._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,dd._)`${s} !== parseInt(${s})`;t.fail$data((0,dd._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};I1.default=KD;var z1={},L1={};Object.defineProperty(L1,"__esModule",{value:!0});function F4(t){const e=t.length;let n=0,r=0,o;for(;r=55296&&o<=56319&&r(0,pl._)`{limit: ${t}}`},YD={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:QD,code(t){const{keyword:e,data:n,schemaCode:r,it:o}=t,i=e==="maxLength"?pl.operators.GT:pl.operators.LT,s=o.opts.unicode===!1?(0,pl._)`${n}.length`:(0,pl._)`${(0,JD.useFunc)(t.gen,GD.default)}(${n})`;t.fail$data((0,pl._)`${s} ${i} ${r}`)}};z1.default=YD;var B1={};Object.defineProperty(B1,"__esModule",{value:!0});const XD=Cn,Ep=An,ZD={message:({schemaCode:t})=>(0,Ep.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ep._)`{pattern: ${t}}`},eI={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ZD,code(t){const{data:e,$data:n,schema:r,schemaCode:o,it:i}=t,s=i.opts.unicodeRegExp?"u":"",a=n?(0,Ep._)`(new RegExp(${o}, ${s}))`:(0,XD.usePattern)(t,r);t.fail$data((0,Ep._)`!${a}.test(${e})`)}};B1.default=eI;var F1={};Object.defineProperty(F1,"__esModule",{value:!0});const hd=An,tI={message({keyword:t,schemaCode:e}){const n=t==="maxProperties"?"more":"fewer";return(0,hd.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,hd._)`{limit: ${t}}`},nI={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:tI,code(t){const{keyword:e,data:n,schemaCode:r}=t,o=e==="maxProperties"?hd.operators.GT:hd.operators.LT;t.fail$data((0,hd._)`Object.keys(${n}).length ${o} ${r}`)}};F1.default=nI;var q1={};Object.defineProperty(q1,"__esModule",{value:!0});const zu=Cn,fd=An,rI=st,oI={message:({params:{missingProperty:t}})=>(0,fd.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,fd._)`{missingProperty: ${t}}`},iI={keyword:"required",type:"object",schemaType:"array",$data:!0,error:oI,code(t){const{gen:e,schema:n,schemaCode:r,data:o,$data:i,it:s}=t,{opts:a}=s;if(!i&&n.length===0)return;const l=n.length>=a.loopRequired;if(s.allErrors?u():d(),a.strictRequired){const p=t.parentSchema.properties,{definedProperties:m}=t.it;for(const b of n)if((p==null?void 0:p[b])===void 0&&!m.has(b)){const v=s.schemaEnv.baseId+s.errSchemaPath,g=`required property "${b}" is not defined at "${v}" (strictRequired)`;(0,rI.checkStrictMode)(s,g,s.opts.strictRequired)}}function u(){if(l||i)t.block$data(fd.nil,h);else for(const p of n)(0,zu.checkReportMissingProp)(t,p)}function d(){const p=e.let("missing");if(l||i){const m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,zu.checkMissingProp)(t,n,p)),(0,zu.reportMissingProp)(t,p),e.else()}function h(){e.forOf("prop",r,p=>{t.setParams({missingProperty:p}),e.if((0,zu.noPropertyInData)(e,o,p,a.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,r,()=>{e.assign(m,(0,zu.propertyInData)(e,o,p,a.ownProperties)),e.if((0,fd.not)(m),()=>{t.error(),e.break()})},fd.nil)}}};q1.default=iI;var U1={};Object.defineProperty(U1,"__esModule",{value:!0});const pd=An,sI={message({keyword:t,schemaCode:e}){const n=t==="maxItems"?"more":"fewer";return(0,pd.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,pd._)`{limit: ${t}}`},aI={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:sI,code(t){const{keyword:e,data:n,schemaCode:r}=t,o=e==="maxItems"?pd.operators.GT:pd.operators.LT;t.fail$data((0,pd._)`${n}.length ${o} ${r}`)}};U1.default=aI;var V1={},mh={};Object.defineProperty(mh,"__esModule",{value:!0});const q4=p4;q4.code='require("ajv/dist/runtime/equal").default';mh.default=q4;Object.defineProperty(V1,"__esModule",{value:!0});const Vg=lo,mo=An,lI=st,cI=mh,uI={message:({params:{i:t,j:e}})=>(0,mo.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,mo._)`{i: ${t}, j: ${e}}`},dI={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:uI,code(t){const{gen:e,data:n,$data:r,schema:o,parentSchema:i,schemaCode:s,it:a}=t;if(!r&&!o)return;const l=e.let("valid"),u=i.items?(0,Vg.getSchemaTypes)(i.items):[];t.block$data(l,d,(0,mo._)`${s} === false`),t.ok(l);function d(){const m=e.let("i",(0,mo._)`${n}.length`),b=e.let("j");t.setParams({i:m,j:b}),e.assign(l,!0),e.if((0,mo._)`${m} > 1`,()=>(h()?f:p)(m,b))}function h(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,b){const v=e.name("item"),g=(0,Vg.checkDataTypes)(u,v,a.opts.strictNumbers,Vg.DataType.Wrong),y=e.const("indices",(0,mo._)`{}`);e.for((0,mo._)`;${m}--;`,()=>{e.let(v,(0,mo._)`${n}[${m}]`),e.if(g,(0,mo._)`continue`),u.length>1&&e.if((0,mo._)`typeof ${v} == "string"`,(0,mo._)`${v} += "_"`),e.if((0,mo._)`typeof ${y}[${v}] == "number"`,()=>{e.assign(b,(0,mo._)`${y}[${v}]`),t.error(),e.assign(l,!1).break()}).code((0,mo._)`${y}[${v}] = ${m}`)})}function p(m,b){const v=(0,lI.useFunc)(e,cI.default),g=e.name("outer");e.label(g).for((0,mo._)`;${m}--;`,()=>e.for((0,mo._)`${b} = ${m}; ${b}--;`,()=>e.if((0,mo._)`${v}(${n}[${m}], ${n}[${b}])`,()=>{t.error(),e.assign(l,!1).break(g)})))}}};V1.default=dI;var H1={};Object.defineProperty(H1,"__esModule",{value:!0});const u0=An,hI=st,fI=mh,pI={message:"must be equal to constant",params:({schemaCode:t})=>(0,u0._)`{allowedValue: ${t}}`},mI={keyword:"const",$data:!0,error:pI,code(t){const{gen:e,data:n,$data:r,schemaCode:o,schema:i}=t;r||i&&typeof i=="object"?t.fail$data((0,u0._)`!${(0,hI.useFunc)(e,fI.default)}(${n}, ${o})`):t.fail((0,u0._)`${i} !== ${n}`)}};H1.default=mI;var W1={};Object.defineProperty(W1,"__esModule",{value:!0});const Yu=An,gI=st,vI=mh,bI={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Yu._)`{allowedValues: ${t}}`},yI={keyword:"enum",schemaType:"array",$data:!0,error:bI,code(t){const{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t;if(!r&&o.length===0)throw new Error("enum must have non-empty array");const a=o.length>=s.opts.loopEnum;let l;const u=()=>l??(l=(0,gI.useFunc)(e,vI.default));let d;if(a||r)d=e.let("valid"),t.block$data(d,h);else{if(!Array.isArray(o))throw new Error("ajv implementation error");const p=e.const("vSchema",i);d=(0,Yu.or)(...o.map((m,b)=>f(p,b)))}t.pass(d);function h(){e.assign(d,!1),e.forOf("v",i,p=>e.if((0,Yu._)`${u()}(${n}, ${p})`,()=>e.assign(d,!0).break()))}function f(p,m){const b=o[m];return typeof b=="object"&&b!==null?(0,Yu._)`${u()}(${n}, ${p}[${m}])`:(0,Yu._)`${n} === ${b}`}}};W1.default=yI;Object.defineProperty(N1,"__esModule",{value:!0});const wI=D1,xI=I1,jI=z1,kI=B1,SI=F1,CI=q1,OI=U1,_I=V1,EI=H1,AI=W1,$I=[wI.default,xI.default,jI.default,kI.default,SI.default,CI.default,OI.default,_I.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},EI.default,AI.default];N1.default=$I;var K1={},wu={};Object.defineProperty(wu,"__esModule",{value:!0});wu.validateAdditionalItems=void 0;const ml=An,d0=st,MI={message:({params:{len:t}})=>(0,ml.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ml._)`{limit: ${t}}`},TI={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:MI,code(t){const{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,d0.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}U4(t,r)}};function U4(t,e){const{gen:n,schema:r,data:o,keyword:i,it:s}=t;s.items=!0;const a=n.const("len",(0,ml._)`${o}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,ml._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,d0.alwaysValidSchema)(s,r)){const u=n.var("valid",(0,ml._)`${a} <= ${e.length}`);n.if((0,ml.not)(u),()=>l(u)),t.ok(u)}function l(u){n.forRange("i",e.length,a,d=>{t.subschema({keyword:i,dataProp:d,dataPropType:d0.Type.Num},u),s.allErrors||n.if((0,ml.not)(u),()=>n.break())})}}wu.validateAdditionalItems=U4;wu.default=TI;var J1={},xu={};Object.defineProperty(xu,"__esModule",{value:!0});xu.validateTuple=void 0;const Hx=An,Kf=st,PI=Cn,RI={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return V4(t,"additionalItems",e);n.items=!0,!(0,Kf.alwaysValidSchema)(n,e)&&t.ok((0,PI.validateArray)(t))}};function V4(t,e,n=t.schema){const{gen:r,parentSchema:o,data:i,keyword:s,it:a}=t;d(o),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=Kf.mergeEvaluated.items(r,n.length,a.items));const l=r.name("valid"),u=r.const("len",(0,Hx._)`${i}.length`);n.forEach((h,f)=>{(0,Kf.alwaysValidSchema)(a,h)||(r.if((0,Hx._)`${u} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},l)),t.ok(l))});function d(h){const{opts:f,errSchemaPath:p}=a,m=n.length,b=m===h.minItems&&(m===h.maxItems||h[e]===!1);if(f.strictTuples&&!b){const v=`"${s}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Kf.checkStrictMode)(a,v,f.strictTuples)}}}xu.validateTuple=V4;xu.default=RI;Object.defineProperty(J1,"__esModule",{value:!0});const NI=xu,DI={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,NI.validateTuple)(t,"items")};J1.default=DI;var G1={};Object.defineProperty(G1,"__esModule",{value:!0});const Wx=An,II=st,zI=Cn,LI=wu,BI={message:({params:{len:t}})=>(0,Wx.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Wx._)`{limit: ${t}}`},FI={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:BI,code(t){const{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,!(0,II.alwaysValidSchema)(r,e)&&(o?(0,LI.validateAdditionalItems)(t,o):t.ok((0,zI.validateArray)(t)))}};G1.default=FI;var Q1={};Object.defineProperty(Q1,"__esModule",{value:!0});const mi=An,Xh=st,qI={message:({params:{min:t,max:e}})=>e===void 0?(0,mi.str)`must contain at least ${t} valid item(s)`:(0,mi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,mi._)`{minContains: ${t}}`:(0,mi._)`{minContains: ${t}, maxContains: ${e}}`},UI={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:qI,code(t){const{gen:e,schema:n,parentSchema:r,data:o,it:i}=t;let s,a;const{minContains:l,maxContains:u}=r;i.opts.next?(s=l===void 0?1:l,a=u):s=1;const d=e.const("len",(0,mi._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Xh.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Xh.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Xh.alwaysValidSchema)(i,n)){let b=(0,mi._)`${d} >= ${s}`;a!==void 0&&(b=(0,mi._)`${b} && ${d} <= ${a}`),t.pass(b);return}i.items=!0;const h=e.name("valid");a===void 0&&s===1?p(h,()=>e.if(h,()=>e.break())):s===0?(e.let(h,!0),a!==void 0&&e.if((0,mi._)`${o}.length > 0`,f)):(e.let(h,!1),f()),t.result(h,()=>t.reset());function f(){const b=e.name("_valid"),v=e.let("count",0);p(b,()=>e.if(b,()=>m(v)))}function p(b,v){e.forRange("i",0,d,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:Xh.Type.Num,compositeRule:!0},b),v()})}function m(b){e.code((0,mi._)`${b}++`),a===void 0?e.if((0,mi._)`${b} >= ${s}`,()=>e.assign(h,!0).break()):(e.if((0,mi._)`${b} > ${a}`,()=>e.assign(h,!1).break()),s===1?e.assign(h,!0):e.if((0,mi._)`${b} >= ${s}`,()=>e.assign(h,!0)))}}};Q1.default=UI;var H4={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=An,n=st,r=Cn;t.error={message:({params:{property:l,depsCount:u,deps:d}})=>{const h=u===1?"property":"properties";return(0,e.str)`must have ${h} ${d} when property ${l} is present`},params:({params:{property:l,depsCount:u,deps:d,missingProperty:h}})=>(0,e._)`{property: ${l}, + missingProperty: ${h}, + depsCount: ${u}, + deps: ${d}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(l){const[u,d]=i(l);s(l,u),a(l,d)}};function i({schema:l}){const u={},d={};for(const h in l){if(h==="__proto__")continue;const f=Array.isArray(l[h])?u:d;f[h]=l[h]}return[u,d]}function s(l,u=l.schema){const{gen:d,data:h,it:f}=l;if(Object.keys(u).length===0)return;const p=d.let("missing");for(const m in u){const b=u[m];if(b.length===0)continue;const v=(0,r.propertyInData)(d,h,m,f.opts.ownProperties);l.setParams({property:m,depsCount:b.length,deps:b.join(", ")}),f.allErrors?d.if(v,()=>{for(const g of b)(0,r.checkReportMissingProp)(l,g)}):(d.if((0,e._)`${v} && (${(0,r.checkMissingProp)(l,b,p)})`),(0,r.reportMissingProp)(l,p),d.else())}}t.validatePropertyDeps=s;function a(l,u=l.schema){const{gen:d,data:h,keyword:f,it:p}=l,m=d.name("valid");for(const b in u)(0,n.alwaysValidSchema)(p,u[b])||(d.if((0,r.propertyInData)(d,h,b,p.opts.ownProperties),()=>{const v=l.subschema({keyword:f,schemaProp:b},m);l.mergeValidEvaluated(v,m)},()=>d.var(m,!0)),l.ok(m))}t.validateSchemaDeps=a,t.default=o})(H4);var Y1={};Object.defineProperty(Y1,"__esModule",{value:!0});const W4=An,VI=st,HI={message:"property name must be valid",params:({params:t})=>(0,W4._)`{propertyName: ${t.propertyName}}`},WI={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:HI,code(t){const{gen:e,schema:n,data:r,it:o}=t;if((0,VI.alwaysValidSchema)(o,n))return;const i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,W4.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};Y1.default=WI;var Hm={};Object.defineProperty(Hm,"__esModule",{value:!0});const Zh=Cn,Ii=An,KI=Ds,ef=st,JI={message:"must NOT have additional properties",params:({params:t})=>(0,Ii._)`{additionalProperty: ${t.additionalProperty}}`},GI={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:JI,code(t){const{gen:e,schema:n,parentSchema:r,data:o,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");const{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,ef.alwaysValidSchema)(s,n))return;const u=(0,Zh.allSchemaProperties)(r.properties),d=(0,Zh.allSchemaProperties)(r.patternProperties);h(),t.ok((0,Ii._)`${i} === ${KI.default.errors}`);function h(){e.forIn("key",o,v=>{!u.length&&!d.length?m(v):e.if(f(v),()=>m(v))})}function f(v){let g;if(u.length>8){const y=(0,ef.schemaRefOrVal)(s,r.properties,"properties");g=(0,Zh.isOwnProperty)(e,y,v)}else u.length?g=(0,Ii.or)(...u.map(y=>(0,Ii._)`${v} === ${y}`)):g=Ii.nil;return d.length&&(g=(0,Ii.or)(g,...d.map(y=>(0,Ii._)`${(0,Zh.usePattern)(t,y)}.test(${v})`))),(0,Ii.not)(g)}function p(v){e.code((0,Ii._)`delete ${o}[${v}]`)}function m(v){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){p(v);return}if(n===!1){t.setParams({additionalProperty:v}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,ef.alwaysValidSchema)(s,n)){const g=e.name("valid");l.removeAdditional==="failing"?(b(v,g,!1),e.if((0,Ii.not)(g),()=>{t.reset(),p(v)})):(b(v,g),a||e.if((0,Ii.not)(g),()=>e.break()))}}function b(v,g,y){const k={keyword:"additionalProperties",dataProp:v,dataPropType:ef.Type.Str};y===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,g)}}};Hm.default=GI;var X1={};Object.defineProperty(X1,"__esModule",{value:!0});const QI=Gi,Kx=Cn,Hg=st,Jx=Hm,YI={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,parentSchema:r,data:o,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Jx.default.code(new QI.KeywordCxt(i,Jx.default,"additionalProperties"));const s=(0,Kx.allSchemaProperties)(n);for(const h of s)i.definedProperties.add(h);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Hg.mergeEvaluated.props(e,(0,Hg.toHash)(s),i.props));const a=s.filter(h=>!(0,Hg.alwaysValidSchema)(i,n[h]));if(a.length===0)return;const l=e.name("valid");for(const h of a)u(h)?d(h):(e.if((0,Kx.propertyInData)(e,o,h,i.opts.ownProperties)),d(h),i.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(l);function u(h){return i.opts.useDefaults&&!i.compositeRule&&n[h].default!==void 0}function d(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},l)}}};X1.default=YI;var Z1={};Object.defineProperty(Z1,"__esModule",{value:!0});const Gx=Cn,tf=An,Qx=st,Yx=st,XI={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,data:r,parentSchema:o,it:i}=t,{opts:s}=i,a=(0,Gx.allSchemaProperties)(n),l=a.filter(b=>(0,Qx.alwaysValidSchema)(i,n[b]));if(a.length===0||l.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;const u=s.strictSchema&&!s.allowMatchingProperties&&o.properties,d=e.name("valid");i.props!==!0&&!(i.props instanceof tf.Name)&&(i.props=(0,Yx.evaluatedPropsToName)(e,i.props));const{props:h}=i;f();function f(){for(const b of a)u&&p(b),i.allErrors?m(b):(e.var(d,!0),m(b),e.if(d))}function p(b){for(const v in u)new RegExp(b).test(v)&&(0,Qx.checkStrictMode)(i,`property ${v} matches pattern ${b} (use allowMatchingProperties)`)}function m(b){e.forIn("key",r,v=>{e.if((0,tf._)`${(0,Gx.usePattern)(t,b)}.test(${v})`,()=>{const g=l.includes(b);g||t.subschema({keyword:"patternProperties",schemaProp:b,dataProp:v,dataPropType:Yx.Type.Str},d),i.opts.unevaluated&&h!==!0?e.assign((0,tf._)`${h}[${v}]`,!0):!g&&!i.allErrors&&e.if((0,tf.not)(d),()=>e.break())})})}}};Z1.default=XI;var ey={};Object.defineProperty(ey,"__esModule",{value:!0});const ZI=st,ez={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:n,it:r}=t;if((0,ZI.alwaysValidSchema)(r,n)){t.fail();return}const o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};ey.default=ez;var ty={};Object.defineProperty(ty,"__esModule",{value:!0});const tz=Cn,nz={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:tz.validateUnion,error:{message:"must match a schema in anyOf"}};ty.default=nz;var ny={};Object.defineProperty(ny,"__esModule",{value:!0});const Jf=An,rz=st,oz={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Jf._)`{passingSchemas: ${t.passing}}`},iz={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:oz,code(t){const{gen:e,schema:n,parentSchema:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&r.discriminator)return;const i=n,s=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){i.forEach((d,h)=>{let f;(0,rz.alwaysValidSchema)(o,d)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},l),h>0&&e.if((0,Jf._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Jf._)`[${a}, ${h}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,h),f&&t.mergeEvaluated(f,Jf.Name)})})}}};ny.default=iz;var ry={};Object.defineProperty(ry,"__esModule",{value:!0});const sz=st,az={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const o=e.name("valid");n.forEach((i,s)=>{if((0,sz.alwaysValidSchema)(r,i))return;const a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};ry.default=az;var oy={};Object.defineProperty(oy,"__esModule",{value:!0});const Ap=An,K4=st,lz={message:({params:t})=>(0,Ap.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ap._)`{failingKeyword: ${t.ifClause}}`},cz={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:lz,code(t){const{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,K4.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const o=Xx(r,"then"),i=Xx(r,"else");if(!o&&!i)return;const s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),o&&i){const d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,u("then",d),u("else",d))}else o?e.if(a,u("then")):e.if((0,Ap.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){const d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(d)}function u(d,h){return()=>{const f=t.subschema({keyword:d},a);e.assign(s,a),t.mergeValidEvaluated(f,s),h?e.assign(h,(0,Ap._)`${d}`):t.setParams({ifClause:d})}}}};function Xx(t,e){const n=t.schema[e];return n!==void 0&&!(0,K4.alwaysValidSchema)(t,n)}oy.default=cz;var iy={};Object.defineProperty(iy,"__esModule",{value:!0});const uz=st,dz={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,uz.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};iy.default=dz;Object.defineProperty(K1,"__esModule",{value:!0});const hz=wu,fz=J1,pz=xu,mz=G1,gz=Q1,vz=H4,bz=Y1,yz=Hm,wz=X1,xz=Z1,jz=ey,kz=ty,Sz=ny,Cz=ry,Oz=oy,_z=iy;function Ez(t=!1){const e=[jz.default,kz.default,Sz.default,Cz.default,Oz.default,_z.default,bz.default,yz.default,vz.default,wz.default,xz.default];return t?e.push(fz.default,mz.default):e.push(hz.default,pz.default),e.push(gz.default),e}K1.default=Ez;var sy={},ay={};Object.defineProperty(ay,"__esModule",{value:!0});const Kr=An,Az={message:({schemaCode:t})=>(0,Kr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Kr._)`{format: ${t}}`},$z={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Az,code(t,e){const{gen:n,data:r,$data:o,schema:i,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:d,self:h}=a;if(!l.validateFormats)return;o?f():p();function f(){const m=n.scopeValue("formats",{ref:h.formats,code:l.code.formats}),b=n.const("fDef",(0,Kr._)`${m}[${s}]`),v=n.let("fType"),g=n.let("format");n.if((0,Kr._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>n.assign(v,(0,Kr._)`${b}.type || "string"`).assign(g,(0,Kr._)`${b}.validate`),()=>n.assign(v,(0,Kr._)`"string"`).assign(g,b)),t.fail$data((0,Kr.or)(y(),k()));function y(){return l.strictSchema===!1?Kr.nil:(0,Kr._)`${s} && !${g}`}function k(){const S=d.$async?(0,Kr._)`(${b}.async ? await ${g}(${r}) : ${g}(${r}))`:(0,Kr._)`${g}(${r})`,w=(0,Kr._)`(typeof ${g} == "function" ? ${S} : ${g}.test(${r}))`;return(0,Kr._)`${g} && ${g} !== true && ${v} === ${e} && !${w}`}}function p(){const m=h.formats[i];if(!m){y();return}if(m===!0)return;const[b,v,g]=k(m);b===e&&t.pass(S());function y(){if(l.strictSchema===!1){h.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(w){const _=w instanceof RegExp?(0,Kr.regexpCode)(w):l.code.formats?(0,Kr._)`${l.code.formats}${(0,Kr.getProperty)(i)}`:void 0,A=n.scopeValue("formats",{key:i,ref:w,code:_});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Kr._)`${A}.validate`]:["string",w,A]}function S(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Kr._)`await ${g}(${r})`}return typeof v=="function"?(0,Kr._)`${g}(${r})`:(0,Kr._)`${g}.test(${r})`}}}};ay.default=$z;Object.defineProperty(sy,"__esModule",{value:!0});const Mz=ay,Tz=[Mz.default];sy.default=Tz;var eu={};Object.defineProperty(eu,"__esModule",{value:!0});eu.contentVocabulary=eu.metadataVocabulary=void 0;eu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];eu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(T1,"__esModule",{value:!0});const Pz=P1,Rz=N1,Nz=K1,Dz=sy,Zx=eu,Iz=[Pz.default,Rz.default,(0,Nz.default)(),Dz.default,Zx.metadataVocabulary,Zx.contentVocabulary];T1.default=Iz;var ly={},Wm={};Object.defineProperty(Wm,"__esModule",{value:!0});Wm.DiscrError=void 0;var ej;(function(t){t.Tag="tag",t.Mapping="mapping"})(ej||(Wm.DiscrError=ej={}));Object.defineProperty(ly,"__esModule",{value:!0});const pc=An,h0=Wm,tj=Xo,zz=yu,Lz=st,Bz={message:({params:{discrError:t,tagName:e}})=>t===h0.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,pc._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},Fz={keyword:"discriminator",type:"object",schemaType:"object",error:Bz,code(t){const{gen:e,data:n,schema:r,parentSchema:o,it:i}=t,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),u=e.const("tag",(0,pc._)`${n}${(0,pc.getProperty)(a)}`);e.if((0,pc._)`typeof ${u} == "string"`,()=>d(),()=>t.error(!1,{discrError:h0.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function d(){const p=f();e.if(!1);for(const m in p)e.elseIf((0,pc._)`${u} === ${m}`),e.assign(l,h(p[m]));e.else(),t.error(!1,{discrError:h0.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function h(p){const m=e.name("valid"),b=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(b,pc.Name),m}function f(){var p;const m={},b=g(o);let v=!0;for(let S=0;Sthis.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const m=this.opts.$data?this.$dataMetaSchema(i,s):i;this.addMetaSchema(m,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=l,t.exports=e=l,t.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var u=Gi;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=An;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var h=ph;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var f=yu;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})($x,$x.exports);var Gz={};(function(t){(function(e){function n(O){return O!==null?Object.prototype.toString.call(O)==="[object Array]":!1}function r(O){return O!==null?Object.prototype.toString.call(O)==="[object Object]":!1}function o(O,T){if(O===T)return!0;var N=Object.prototype.toString.call(O);if(N!==Object.prototype.toString.call(T))return!1;if(n(O)===!0){if(O.length!==T.length)return!1;for(var ne=0;ne",9:"Array"},k="EOF",S="UnquotedIdentifier",w="QuotedIdentifier",_="Rbracket",A="Rparen",D="Comma",E="Colon",z="Rbrace",G="Number",F="Current",se="Expref",pe="Pipe",re="Or",Z="And",he="EQ",be="GT",fe="LT",J="GTE",I="LTE",Q="NE",M="Flatten",C="Star",$="Filter",oe="Dot",_e="Not",q="Lbrace",K="Lbracket",L="Lparen",xe="Literal",Je={".":oe,"*":C,",":D,":":E,"{":q,"}":z,"]":_,"(":L,")":A,"@":F},ce={"<":!0,">":!0,"=":!0,"!":!0},ae={" ":!0," ":!0,"\n":!0};function W(O){return O>="a"&&O<="z"||O>="A"&&O<="Z"||O==="_"}function it(O){return O>="0"&&O<="9"||O==="-"}function vt(O){return O>="a"&&O<="z"||O>="A"&&O<="Z"||O>="0"&&O<="9"||O==="_"}function rt(){}rt.prototype={tokenize:function(O){var T=[];this._current=0;for(var N,ne,X;this._current")return O[this._current]==="="?(this._current++,{type:J,value:">=",start:T}):{type:be,value:">",start:T};if(N==="="&&O[this._current]==="=")return this._current++,{type:he,value:"==",start:T}},_consumeLiteral:function(O){this._current++;for(var T=this._current,N=O.length,ne;O[this._current]!=="`"&&this._current=0)return!0;if(N.indexOf(O)>=0)return!0;if(ne.indexOf(O[0])>=0)try{return JSON.parse(O),!0}catch{return!1}else return!1}};var Ee={};Ee[k]=0,Ee[S]=0,Ee[w]=0,Ee[_]=0,Ee[A]=0,Ee[D]=0,Ee[z]=0,Ee[G]=0,Ee[F]=0,Ee[se]=0,Ee[pe]=1,Ee[re]=2,Ee[Z]=3,Ee[he]=5,Ee[be]=5,Ee[fe]=5,Ee[J]=5,Ee[I]=5,Ee[Q]=5,Ee[M]=9,Ee[C]=20,Ee[$]=21,Ee[oe]=40,Ee[_e]=45,Ee[q]=50,Ee[K]=55,Ee[L]=60;function Ge(){}Ge.prototype={parse:function(O){this._loadTokens(O),this.index=0;var T=this.expression(0);if(this._lookahead(0)!==k){var N=this._lookaheadToken(0),ne=new Error("Unexpected token type: "+N.type+", value: "+N.value);throw ne.name="ParserError",ne}return T},_loadTokens:function(O){var T=new rt,N=T.tokenize(O);N.push({type:k,value:"",start:O.length}),this.tokens=N},expression:function(O){var T=this._lookaheadToken(0);this._advance();for(var N=this.nud(T),ne=this._lookahead(0);O=0)return this.expression(O);if(T===K)return this._match(K),this._parseMultiselectList();if(T===q)return this._match(q),this._parseMultiselectHash()},_parseProjectionRHS:function(O){var T;if(Ee[this._lookahead(0)]<10)T={type:"Identity"};else if(this._lookahead(0)===K)T=this.expression(O);else if(this._lookahead(0)===$)T=this.expression(O);else if(this._lookahead(0)===oe)this._match(oe),T=this._parseDotRHS(O);else{var N=this._lookaheadToken(0),ne=new Error("Sytanx error, unexpected token: "+N.value+"("+N.type+")");throw ne.name="ParserError",ne}return T},_parseMultiselectList:function(){for(var O=[];this._lookahead(0)!==_;){var T=this.expression(0);if(O.push(T),this._lookahead(0)===D&&(this._match(D),this._lookahead(0)===_))throw new Error("Unexpected token Rbracket")}return this._match(_),{type:"MultiSelectList",children:O}},_parseMultiselectHash:function(){for(var O=[],T=[S,w],N,ne,X,me;;){if(N=this._lookaheadToken(0),T.indexOf(N.type)<0)throw new Error("Expecting an identifier token, got: "+N.type);if(ne=N.value,this._advance(),this._match(E),X=this.expression(0),me={type:"KeyValuePair",name:ne,value:X},O.push(me),this._lookahead(0)===D)this._match(D);else if(this._lookahead(0)===z){this._match(z);break}}return{type:"MultiSelectHash",children:O}}};function Ue(O){this.runtime=O}Ue.prototype={search:function(O,T){return this.visit(O,T)},visit:function(O,T){var N,ne,X,me,te,qe,Me,mt,Bt,We;switch(O.type){case"Field":return T!==null&&r(T)?(qe=T[O.name],qe===void 0?null:qe):null;case"Subexpression":for(X=this.visit(O.children[0],T),We=1;We0)for(We=Pn;Ween;We+=Tt)X.push(T[We]);return X;case"Projection":var hn=this.visit(O.children[0],T);if(!n(hn))return null;for(Bt=[],We=0;Wete;break;case J:X=me>=te;break;case fe:X=me=O&&(T=N<0?O-1:O),T}};function ft(O){this._interpreter=O,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[l]}]},avg:{_func:this._functionAvg,_signature:[{types:[v]}]},ceil:{_func:this._functionCeil,_signature:[{types:[l]}]},contains:{_func:this._functionContains,_signature:[{types:[d,h]},{types:[u]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[d]},{types:[d]}]},floor:{_func:this._functionFloor,_signature:[{types:[l]}]},length:{_func:this._functionLength,_signature:[{types:[d,h,f]}]},map:{_func:this._functionMap,_signature:[{types:[m]},{types:[h]}]},max:{_func:this._functionMax,_signature:[{types:[v,g]}]},merge:{_func:this._functionMerge,_signature:[{types:[f],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[h]},{types:[m]}]},sum:{_func:this._functionSum,_signature:[{types:[v]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[d]},{types:[d]}]},min:{_func:this._functionMin,_signature:[{types:[v,g]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[h]},{types:[m]}]},type:{_func:this._functionType,_signature:[{types:[u]}]},keys:{_func:this._functionKeys,_signature:[{types:[f]}]},values:{_func:this._functionValues,_signature:[{types:[f]}]},sort:{_func:this._functionSort,_signature:[{types:[g,v]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[h]},{types:[m]}]},join:{_func:this._functionJoin,_signature:[{types:[d]},{types:[g]}]},reverse:{_func:this._functionReverse,_signature:[{types:[d,h]}]},to_array:{_func:this._functionToArray,_signature:[{types:[u]}]},to_string:{_func:this._functionToString,_signature:[{types:[u]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[u]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[u],variadic:!0}]}}}ft.prototype={callFunction:function(O,T){var N=this.functionTable[O];if(N===void 0)throw new Error("Unknown function: "+O+"()");return this._validateArgs(O,T,N._signature),N._func.call(this,T)},_validateArgs:function(O,T,N){var ne;if(N[N.length-1].variadic){if(T.length=0;X--)ne+=N[X];return ne}else{var me=O[0].slice(0);return me.reverse(),me}},_functionAbs:function(O){return Math.abs(O[0])},_functionCeil:function(O){return Math.ceil(O[0])},_functionAvg:function(O){for(var T=0,N=O[0],ne=0;ne=0},_functionFloor:function(O){return Math.floor(O[0])},_functionLength:function(O){return r(O[0])?Object.keys(O[0]).length:O[0].length},_functionMap:function(O){for(var T=[],N=this._interpreter,ne=O[0],X=O[1],me=0;me0){var T=this._getTypeName(O[0][0]);if(T===l)return Math.max.apply(Math,O[0]);for(var N=O[0],ne=N[0],X=1;X0){var T=this._getTypeName(O[0][0]);if(T===l)return Math.min.apply(Math,O[0]);for(var N=O[0],ne=N[0],X=1;Xon?1:WeX&&(X=te,me=N[qe]);return me},_functionMinBy:function(O){for(var T=O[1],N=O[0],ne=this.createKeyFunction(T,[l,d]),X=1/0,me,te,qe=0;qe{if(typeof o!="object"||!o.name||!o.init)throw new Error("Invalid JSEP plugin format");this.registered[o.name]||(o.init(this.jsep),this.registered[o.name]=o)})}}class we{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+we.version}static addUnaryOp(e){return we.max_unop_len=Math.max(e.length,we.max_unop_len),we.unary_ops[e]=1,we}static addBinaryOp(e,n,r){return we.max_binop_len=Math.max(e.length,we.max_binop_len),we.binary_ops[e]=n,r?we.right_associative.add(e):we.right_associative.delete(e),we}static addIdentifierChar(e){return we.additional_identifier_chars.add(e),we}static addLiteral(e,n){return we.literals[e]=n,we}static removeUnaryOp(e){return delete we.unary_ops[e],e.length===we.max_unop_len&&(we.max_unop_len=we.getMaxKeyLen(we.unary_ops)),we}static removeAllUnaryOps(){return we.unary_ops={},we.max_unop_len=0,we}static removeIdentifierChar(e){return we.additional_identifier_chars.delete(e),we}static removeBinaryOp(e){return delete we.binary_ops[e],e.length===we.max_binop_len&&(we.max_binop_len=we.getMaxKeyLen(we.binary_ops)),we.right_associative.delete(e),we}static removeAllBinaryOps(){return we.binary_ops={},we.max_binop_len=0,we}static removeLiteral(e){return delete we.literals[e],we}static removeAllLiterals(){return we.literals={},we}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new we(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(n=>n.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return we.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!we.binary_ops[String.fromCharCode(e)]||we.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return we.isIdentifierStart(e)||we.isDecimalDigit(e)}throwError(e){const n=new Error(e+" at character "+this.index);throw n.index=this.index,n.description=e,n}runHook(e,n){if(we.hooks[e]){const r={context:this,node:n};return we.hooks.run(e,r),r.node}return n}searchHook(e){if(we.hooks[e]){const n={context:this};return we.hooks[e].find(function(r){return r.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let e=this.code;for(;e===we.SPACE_CODE||e===we.TAB_CODE||e===we.LF_CODE||e===we.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),n=e.length===1?e[0]:{type:we.COMPOUND,body:e};return this.runHook("after-all",n)}gobbleExpressions(e){let n=[],r,o;for(;this.index0;){if(we.binary_ops.hasOwnProperty(e)&&(!we.isIdentifierStart(this.code)||this.index+e.lengthi.right_a&&h.right_a?r>h.prec:r<=h.prec;for(;o.length>2&&d(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),e={type:we.BINARY_EXP,operator:n,left:s,right:a},o.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+u),o.push(i,e)}for(l=o.length-1,e=o[l];l>1;)e={type:we.BINARY_EXP,operator:o[l-1].value,left:o[l-2],right:e},l-=2;return e}gobbleToken(){let e,n,r,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(e=this.code,we.isDecimalDigit(e)||e===we.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===we.SQUOTE_CODE||e===we.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(e===we.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,we.max_unop_len),r=n.length;r>0;){if(we.unary_ops.hasOwnProperty(n)&&(!we.isIdentifierStart(this.code)||this.index+n.length=n.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}else if(i===we.COMMA_CODE){if(this.index++,o++,o!==n.length){if(e===we.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===we.CBRACK_CODE)for(let s=n.length;s":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});we.max_unop_len=we.getMaxKeyLen(we.unary_ops);we.max_binop_len=we.getMaxKeyLen(we.binary_ops);const Ua=t=>new we(t).parse(),Zz=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(we).filter(t=>!Zz.includes(t)&&Ua[t]===void 0).forEach(t=>{Ua[t]=we[t]});Ua.Jsep=we;const eL="ConditionalExpression";var tL={name:"ternary",init(t){t.hooks.add("after-expression",function(n){if(n.node&&this.code===t.QUMARK_CODE){this.index++;const r=n.node,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),n.node={type:eL,test:r,consequent:o,alternate:i},r.operator&&t.binary_ops[r.operator]<=.9){let s=r;for(;s.right.operator&&t.binary_ops[s.right.operator]<=.9;)s=s.right;n.node.test=s.right,s.right=n.node,n.node=r}}else this.throwError("Expected :")}})}};Ua.plugins.register(tL);const nj=47,nL=92;var rL={name:"regex",init(t){t.hooks.add("gobble-token",function(n){if(this.code===nj){const r=++this.index;let o=!1;for(;this.index=97&&l<=122||l>=65&&l<=90||l>=48&&l<=57)s+=this.char;else break}let a;try{a=new RegExp(i,s)}catch(l){this.throwError(l.message)}return n.node={type:t.LITERAL,value:a,raw:this.expr.slice(r-1,this.index)},n.node=this.gobbleTokenProperty(n.node),n.node}this.code===t.OBRACK_CODE?o=!0:o&&this.code===t.CBRACK_CODE&&(o=!1),this.index+=this.code===nL?2:1}this.throwError("Unclosed Regex")}})}};const Wg=43,oL=45,mc={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Wg,oL],assignmentPrecedence:.9,init(t){const e=[t.IDENTIFIER,t.MEMBER_EXP];mc.assignmentOperators.forEach(r=>t.addBinaryOp(r,mc.assignmentPrecedence,!0)),t.hooks.add("gobble-token",function(o){const i=this.code;mc.updateOperators.some(s=>s===i&&s===this.expr.charCodeAt(this.index+1))&&(this.index+=2,o.node={type:"UpdateExpression",operator:i===Wg?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!o.node.argument||!e.includes(o.node.argument.type))&&this.throwError(`Unexpected ${o.node.operator}`))}),t.hooks.add("after-token",function(o){if(o.node){const i=this.code;mc.updateOperators.some(s=>s===i&&s===this.expr.charCodeAt(this.index+1))&&(e.includes(o.node.type)||this.throwError(`Unexpected ${o.node.operator}`),this.index+=2,o.node={type:"UpdateExpression",operator:i===Wg?"++":"--",argument:o.node,prefix:!1})}}),t.hooks.add("after-expression",function(o){o.node&&n(o.node)});function n(r){mc.assignmentOperators.has(r.operator)?(r.type="AssignmentExpression",n(r.left),n(r.right)):r.operator||Object.values(r).forEach(o=>{o&&typeof o=="object"&&n(o)})}}};Ua.plugins.register(rL,mc);Ua.addUnaryOp("typeof");Ua.addLiteral("null",null);Ua.addLiteral("undefined",void 0);let Zn=class J4{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=tu(this,e,n);let o=[];return this.decompose(0,e,o,2),r.length&&r.decompose(0,r.length,o,3),this.decompose(n,this.length,o,1),vs.from(o,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=tu(this,e,n);let r=[];return this.decompose(e,n,r,0),vs.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),o=new md(this),i=new md(e);for(let s=n,a=n;;){if(o.next(s),i.next(s),s=0,o.lineBreak!=i.lineBreak||o.done!=i.done||o.value!=i.value)return!1;if(a+=o.value.length,o.done||a>=r)return!0}}iter(e=1){return new md(this,e)}iterRange(e,n=this.length){return new G4(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let o=this.line(e).from;r=this.iterRange(o,Math.max(o,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new Q4(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?J4.empty:e.length<=32?new Jr(e):vs.from(Jr.split(e,[]))}};class Jr extends Zn{constructor(e,n=iL(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,o){for(let i=0;;i++){let s=this.text[i],a=o+s.length;if((n?r:a)>=e)return new sL(o,a,r,s);o=a+1,r++}}decompose(e,n,r,o){let i=e<=0&&n>=this.length?this:new Jr(rj(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(o&1){let s=r.pop(),a=Gf(i.text,s.text.slice(),0,i.length);if(a.length<=32)r.push(new Jr(a,s.length+i.length));else{let l=a.length>>1;r.push(new Jr(a.slice(0,l)),new Jr(a.slice(l)))}}else r.push(i)}replace(e,n,r){if(!(r instanceof Jr))return super.replace(e,n,r);[e,n]=tu(this,e,n);let o=Gf(this.text,Gf(r.text,rj(this.text,0,e)),n),i=this.length+r.length-(n-e);return o.length<=32?new Jr(o,i):vs.from(Jr.split(o,[]),i)}sliceString(e,n=this.length,r=` +`){[e,n]=tu(this,e,n);let o="";for(let i=0,s=0;i<=n&&se&&s&&(o+=r),ei&&(o+=a.slice(Math.max(0,e-i),n-i)),i=l+1}return o}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],o=-1;for(let i of e)r.push(i),o+=i.length+1,r.length==32&&(n.push(new Jr(r,o)),r=[],o=-1);return o>-1&&n.push(new Jr(r,o)),n}}class vs extends Zn{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,o){for(let i=0;;i++){let s=this.children[i],a=o+s.length,l=r+s.lines-1;if((n?l:a)>=e)return s.lineInner(e,n,r,o);o=a+1,r=l+1}}decompose(e,n,r,o){for(let i=0,s=0;s<=n&&i=s){let u=o&((s<=e?1:0)|(l>=n?2:0));s>=e&&l<=n&&!u?r.push(a):a.decompose(e-s,n-s,r,u)}s=l+1}}replace(e,n,r){if([e,n]=tu(this,e,n),r.lines=i&&n<=a){let l=s.replace(e-i,n-i,r),u=this.lines-s.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let d=this.children.slice();return d[o]=l,new vs(d,this.length-(n-e)+r.length)}return super.replace(i,a,l)}i=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` +`){[e,n]=tu(this,e,n);let o="";for(let i=0,s=0;ie&&i&&(o+=r),es&&(o+=a.sliceString(e-s,n-s,r)),s=l+1}return o}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof vs))return 0;let r=0,[o,i,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;o+=n,i+=n){if(o==s||i==a)return r;let l=this.children[o],u=e.children[i];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,o)=>r+o.length+1,-1)){let r=0;for(let p of e)r+=p.lines;if(r<32){let p=[];for(let m of e)m.flatten(p);return new Jr(p,n)}let o=Math.max(32,r>>5),i=o<<1,s=o>>1,a=[],l=0,u=-1,d=[];function h(p){let m;if(p.lines>i&&p instanceof vs)for(let b of p.children)h(b);else p.lines>s&&(l>s||!l)?(f(),a.push(p)):p instanceof Jr&&l&&(m=d[d.length-1])instanceof Jr&&p.lines+m.lines<=32?(l+=p.lines,u+=p.length+1,d[d.length-1]=new Jr(m.text.concat(p.text),m.length+1+p.length)):(l+p.lines>o&&f(),l+=p.lines,u+=p.length+1,d.push(p))}function f(){l!=0&&(a.push(d.length==1?d[0]:vs.from(d,u)),u=-1,l=d.length=0)}for(let p of e)h(p);return f(),a.length==1?a[0]:new vs(a,n)}}Zn.empty=new Jr([""],0);function iL(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Gf(t,e,n=0,r=1e9){for(let o=0,i=0,s=!0;i=n&&(l>r&&(a=a.slice(0,r-o)),o0?1:(e instanceof Jr?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,o=this.nodes[r],i=this.offsets[r],s=i>>1,a=o instanceof Jr?o.text.length:o.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(o instanceof Jr){let l=o.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=o.children[s+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Jr?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class G4{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new md(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:o}=this.cursor.next(e);return this.pos+=(o.length+e)*n,this.value=o.length<=r?o:n<0?o.slice(o.length-r):o.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Q4{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:o}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Zn.prototype[Symbol.iterator]=function(){return this.iter()},md.prototype[Symbol.iterator]=G4.prototype[Symbol.iterator]=Q4.prototype[Symbol.iterator]=function(){return this});class sL{constructor(e,n,r,o){this.from=e,this.to=n,this.number=r,this.text=o}get length(){return this.to-this.from}}function tu(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}let Nc="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return Nc[e-1]<=t;return!1}function oj(t){return t>=127462&&t<=127487}const ij=8205;function xo(t,e,n=!0,r=!0){return(n?Y4:lL)(t,e,r)}function Y4(t,e,n){if(e==t.length)return e;e&&X4(t.charCodeAt(e))&&Z4(t.charCodeAt(e-1))&&e--;let r=bo(t,e);for(e+=bi(r);e=0&&oj(bo(t,s));)i++,s-=2;if(i%2==0)break;e+=2}else break}return e}function lL(t,e,n){for(;e>0;){let r=Y4(t,e-2,n);if(r=56320&&t<57344}function Z4(t){return t>=55296&&t<56320}function bo(t,e){let n=t.charCodeAt(e);if(!Z4(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return X4(r)?(n-55296<<10)+(r-56320)+65536:n}function cy(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function bi(t){return t<65536?1:2}const f0=/\r\n?|\n/;var Lo=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Lo||(Lo={}));class Gs{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return i+(e-o);i+=a}else{if(r!=Lo.Simple&&u>=e&&(r==Lo.TrackDel&&oe||r==Lo.TrackBefore&&oe))return null;if(u>e||u==e&&n<0&&!a)return e==o||n<0?i:i+l;i+=l}o=u}if(e>o)throw new RangeError(`Position ${e} is out of range for changeset of length ${o}`);return i}touchesRange(e,n=e){for(let r=0,o=0;r=0&&o<=n&&a>=e)return on?"cover":!0;o=a}return!1}toString(){let e="";for(let n=0;n=0?":"+o:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Gs(e)}static create(e){return new Gs(e)}}class eo extends Gs{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return p0(this,(n,r,o,i,s)=>e=e.replace(o,o+(r-n),s),!1),e}mapDesc(e,n=!1){return m0(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let o=0,i=0;o=0){n[o]=a,n[o+1]=s;let l=o>>1;for(;r.length0&&Oa(r,n,i.text),i.forward(d),a+=d}let u=e[s++];for(;a>1].toJSON()))}return e}static of(e,n,r){let o=[],i=[],s=0,a=null;function l(d=!1){if(!d&&!o.length)return;sf||h<0||f>n)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${n})`);let m=p?typeof p=="string"?Zn.of(p.split(r||f0)):p:Zn.empty,b=m.length;if(h==f&&b==0)return;hs&&_o(o,h-s,-1),_o(o,f-h,b),Oa(i,o,m),s=f}}return u(e),l(!a),a}static empty(e){return new eo(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let o=0;oa&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)n.push(i[0],0);else{for(;r.length=0&&n<=0&&n==t[o+1]?t[o]+=e:e==0&&t[o]==0?t[o+1]+=n:r?(t[o]+=e,t[o+1]+=n):t.push(e,n)}function Oa(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(o,u,i,d,h),o=u,i=d}}}function m0(t,e,n,r=!1){let o=[],i=r?[]:null,s=new Ed(t),a=new Ed(e);for(let l=-1;;)if(s.ins==-1&&a.ins==-1){let u=Math.min(s.len,a.len);_o(o,u,-1),s.forward(u),a.forward(u)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len=0&&l=0){let u=0,d=s.len;for(;d;)if(a.ins==-1){let h=Math.min(d,a.len);u+=h,d-=h,a.forward(h)}else if(a.ins==0&&a.lenl||s.ins>=0&&s.len>l)&&(a||r.length>u),i.forward2(l),s.forward(l)}}}}class Ed{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Zn.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Zn.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class yl{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,o;return this.empty?r=o=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),o=e.mapPos(this.to,-1)),r==this.from&&o==this.to?this:new yl(r,o,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Ae.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Ae.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ae.range(e.anchor,e.head)}static create(e,n,r){return new yl(e,n,r)}}class Ae{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Ae.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ae(e.ranges.map(n=>yl.fromJSON(n)),e.main)}static single(e,n=e){return new Ae([Ae.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,o=0;oe?8:0)|i)}static normalized(e,n=0){let r=e[n];e.sort((o,i)=>o.from-i.from),n=e.indexOf(r);for(let o=1;oi.head?Ae.range(l,a):Ae.range(a,l))}}return new Ae(e,n)}}function tO(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let uy=0;class at{constructor(e,n,r,o,i){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=o,this.id=uy++,this.default=e([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(e={}){return new at(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:dy),!!e.static,e.enables)}of(e){return new Qf([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qf(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qf(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function dy(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Qf{constructor(e,n,r,o){this.dependencies=e,this.facet=n,this.type=r,this.value=o,this.id=uy++}dynamicSlot(e){var n;let r=this.value,o=this.facet.compareInput,i=this.id,s=e[i]>>1,a=this.type==2,l=!1,u=!1,d=[];for(let h of this.dependencies)h=="doc"?l=!0:h=="selection"?u=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||d.push(e[h.id]);return{create(h){return h.values[s]=r(h),1},update(h,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||g0(h,d)){let p=r(h);if(a?!sj(p,h.values[s],o):!o(p,h.values[s]))return h.values[s]=p,1}return 0},reconfigure:(h,f)=>{let p,m=f.config.address[i];if(m!=null){let b=Mp(f,m);if(this.dependencies.every(v=>v instanceof at?f.facet(v)===h.facet(v):v instanceof po?f.field(v,!1)==h.field(v,!1):!0)||(a?sj(p=r(h),b,o):o(p=r(h),b)))return h.values[s]=b,0}else p=r(h);return h.values[s]=p,1}}}}function sj(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),o=n.map(l=>l.type),i=r.filter(l=>!(l&1)),s=t[e.id]>>1;function a(l){let u=[];for(let d=0;dr===o),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(aj).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,o)=>{let i=r.values[n],s=this.updateF(i,o);return this.compareF(i,s)?0:(r.values[n]=s,1)},reconfigure:(r,o)=>o.config.address[this.id]!=null?(r.values[n]=o.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,aj.of({field:this,create:e})]}get extension(){return this}}const gl={lowest:4,low:3,default:2,high:1,highest:0};function Lu(t){return e=>new nO(e,t)}const Gl={highest:Lu(gl.highest),high:Lu(gl.high),default:Lu(gl.default),low:Lu(gl.low),lowest:Lu(gl.lowest)};class nO{constructor(e,n){this.inner=e,this.prec=n}}class Fs{of(e){return new v0(this,e)}reconfigure(e){return Fs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class v0{constructor(e,n){this.compartment=e,this.inner=n}}class $p{constructor(e,n,r,o,i,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=o,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let o=[],i=Object.create(null),s=new Map;for(let f of uL(e,n,s))f instanceof po?o.push(f):(i[f.facet.id]||(i[f.facet.id]=[])).push(f);let a=Object.create(null),l=[],u=[];for(let f of o)a[f.id]=u.length<<1,u.push(p=>f.slot(p));let d=r==null?void 0:r.config.facets;for(let f in i){let p=i[f],m=p[0].facet,b=d&&d[f]||[];if(p.every(v=>v.type==0))if(a[m.id]=l.length<<1|1,dy(b,p))l.push(r.facet(m));else{let v=m.combine(p.map(g=>g.value));l.push(r&&m.compare(v,r.facet(m))?r.facet(m):v)}else{for(let v of p)v.type==0?(a[v.id]=l.length<<1|1,l.push(v.value)):(a[v.id]=u.length<<1,u.push(g=>v.dynamicSlot(g)));a[m.id]=u.length<<1,u.push(v=>cL(v,m,p))}}let h=u.map(f=>f(a));return new $p(e,s,h,a,l,i)}}function uL(t,e,n){let r=[[],[],[],[],[]],o=new Map;function i(s,a){let l=o.get(s);if(l!=null){if(l<=a)return;let u=r[l].indexOf(s);u>-1&&r[l].splice(u,1),s instanceof v0&&n.delete(s.compartment)}if(o.set(s,a),Array.isArray(s))for(let u of s)i(u,a);else if(s instanceof v0){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),i(u,a)}else if(s instanceof nO)i(s.inner,s.prec);else if(s instanceof po)r[a].push(s),s.provides&&i(s.provides,a);else if(s instanceof Qf)r[a].push(s),s.facet.extensions&&i(s.facet.extensions,gl.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(u,a)}}return i(t,gl.default),r.reduce((s,a)=>s.concat(a))}function gd(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let o=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|o}function Mp(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const rO=at.define(),b0=at.define({combine:t=>t.some(e=>e),static:!0}),oO=at.define({combine:t=>t.length?t[0]:void 0,static:!0}),iO=at.define(),sO=at.define(),aO=at.define(),lO=at.define({combine:t=>t.length?t[0]:!1});class Xa{constructor(e,n){this.type=e,this.value=n}static define(){return new dL}}class dL{of(e){return new Xa(this,e)}}class hL{constructor(e){this.map=e}of(e){return new bn(this,e)}}class bn{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new bn(this.type,n)}is(e){return this.type==e}static define(e={}){return new hL(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let o of e){let i=o.map(n);i&&r.push(i)}return r}}bn.reconfigure=bn.define();bn.appendConfig=bn.define();class Mo{constructor(e,n,r,o,i,s){this.startState=e,this.changes=n,this.selection=r,this.effects=o,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,r&&tO(r,n.newLength),i.some(a=>a.type==Mo.time)||(this.annotations=i.concat(Mo.time.of(Date.now())))}static create(e,n,r,o,i,s){return new Mo(e,n,r,o,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Mo.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Mo.time=Xa.define();Mo.userEvent=Xa.define();Mo.addToHistory=Xa.define();Mo.remote=Xa.define();function fL(t,e){let n=[];for(let r=0,o=0;;){let i,s;if(r=t[r]))i=t[r++],s=t[r++];else if(o=0;o--){let i=r[o](t);i instanceof Mo?t=i:Array.isArray(i)&&i.length==1&&i[0]instanceof Mo?t=i[0]:t=uO(e,Dc(i),!1)}return t}function mL(t){let e=t.startState,n=e.facet(aO),r=t;for(let o=n.length-1;o>=0;o--){let i=n[o](t);i&&Object.keys(i).length&&(r=cO(r,y0(e,i,t.changes.newLength),!0))}return r==t?t:Mo.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const gL=[];function Dc(t){return t==null?gL:Array.isArray(t)?t:[t]}var Ar=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Ar||(Ar={}));const vL=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let w0;try{w0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function bL(t){if(w0)return w0.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||vL.test(n)))return!0}return!1}function yL(t){return e=>{if(!/\S/.test(e))return Ar.Space;if(bL(e))return Ar.Word;for(let n=0;n-1)return Ar.Word;return Ar.Other}}class Mn{constructor(e,n,r,o,i,s){this.config=e,this.doc=n,this.selection=r,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let a=0;ao.set(u,l)),n=null),o.set(a.value.compartment,a.value.extension)):a.is(bn.reconfigure)?(n=null,r=a.value):a.is(bn.appendConfig)&&(n=null,r=Dc(r).concat(a.value));let i;n?i=e.startState.values.slice():(n=$p.resolve(r,o,this),i=new Mn(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let s=e.startState.facet(b0)?e.newSelection:e.newSelection.asSingle();new Mn(n,e.newDoc,s,i,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Ae.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),o=this.changes(r.changes),i=[r.range],s=Dc(r.effects);for(let a=1;as.spec.fromJSON(a,l)))}}return Mn.create({doc:e.doc,selection:Ae.fromJSON(e.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(e={}){let n=$p.resolve(e.extensions||[],new Map),r=e.doc instanceof Zn?e.doc:Zn.of((e.doc||"").split(n.staticFacet(Mn.lineSeparator)||f0)),o=e.selection?e.selection instanceof Ae?e.selection:Ae.single(e.selection.anchor,e.selection.head):Ae.single(0);return tO(o,r.length),n.staticFacet(b0)||(o=o.asSingle()),new Mn(n,r,o,n.dynamicSlots.map(()=>null),(i,s)=>s.create(i),null)}get tabSize(){return this.facet(Mn.tabSize)}get lineBreak(){return this.facet(Mn.lineSeparator)||` +`}get readOnly(){return this.facet(lO)}phrase(e,...n){for(let r of this.facet(Mn.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,o)=>{if(o=="$")return"$";let i=+(o||1);return!i||i>n.length?r:n[i-1]})),e}languageDataAt(e,n,r=-1){let o=[];for(let i of this.facet(rO))for(let s of i(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&o.push(s[e]);return o}charCategorizer(e){return yL(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:o}=this.doc.lineAt(e),i=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let l=xo(n,s,!1);if(i(n.slice(l,s))!=Ar.Word)break;s=l}for(;at.length?t[0]:4});Mn.lineSeparator=oO;Mn.readOnly=lO;Mn.phrases=at.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(o=>t[o]==e[o])}});Mn.languageData=rO;Mn.changeFilter=iO;Mn.transactionFilter=sO;Mn.transactionExtender=aO;Fs.reconfigure=bn.define();function ls(t,e,n={}){let r={};for(let o of t)for(let i of Object.keys(o)){let s=o[i],a=r[i];if(a===void 0)r[i]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,i))r[i]=n[i](a,s);else throw new Error("Config merge conflict for field "+i)}for(let o in e)r[o]===void 0&&(r[o]=e[o]);return r}class Nl{eq(e){return this==e}range(e,n=e){return x0.create(e,n,this)}}Nl.prototype.startSide=Nl.prototype.endSide=0;Nl.prototype.point=!1;Nl.prototype.mapMode=Lo.TrackDel;let x0=class dO{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new dO(e,n,r)}};function j0(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class hy{constructor(e,n,r,o){this.from=e,this.to=n,this.value=r,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,o=0){let i=r?this.to:this.from;for(let s=o,a=i.length;;){if(s==a)return s;let l=s+a>>1,u=i[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==s)return u>=0?s:a;u>=0?a=l:s=l+1}}between(e,n,r,o){for(let i=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,i);ip||f==p&&u.startSide>0&&u.endSide<=0)continue;(p-f||u.endSide-u.startSide)<0||(s<0&&(s=f),u.point&&(a=Math.max(a,p-f)),r.push(u),o.push(f-s),i.push(p-s))}return{mapped:r.length?new hy(o,i,r,a):null,pos:s}}}class Dn{constructor(e,n,r,o){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=o}static create(e,n,r,o){return new Dn(e,n,r,o)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:o=0,filterTo:i=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(j0)),this.isEmpty)return n.length?Dn.of(n):this;let a=new hO(this,null,-1).goto(0),l=0,u=[],d=new os;for(;a.value||l=0){let h=n[l++];d.addInner(h.from,h.to,h.value)||u.push(h)}else a.rangeIndex==1&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||ia.to||i=i&&e<=i+s.length&&s.between(i,e-i,n-i,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Ad.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Ad.from(e).goto(n)}static compare(e,n,r,o,i=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=i),a=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=i),l=lj(s,a,r),u=new Bu(s,l,i),d=new Bu(a,l,i);r.iterGaps((h,f,p)=>cj(u,h,d,f,p,o)),r.empty&&r.length==0&&cj(u,0,d,0,0,o)}static eq(e,n,r=0,o){o==null&&(o=999999999);let i=e.filter(d=>!d.isEmpty&&n.indexOf(d)<0),s=n.filter(d=>!d.isEmpty&&e.indexOf(d)<0);if(i.length!=s.length)return!1;if(!i.length)return!0;let a=lj(i,s),l=new Bu(i,a,0).goto(r),u=new Bu(s,a,0).goto(r);for(;;){if(l.to!=u.to||!k0(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>o)return!0;l.next(),u.next()}}static spans(e,n,r,o,i=-1){let s=new Bu(e,null,i).goto(n),a=n,l=s.openStart;for(;;){let u=Math.min(s.to,r);if(s.point){let d=s.activeForPoint(s.to),h=s.pointFroma&&(o.span(a,u,s.active,l),l=s.openEnd(u));if(s.to>r)return l+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new os;for(let o of e instanceof x0?[e]:n?wL(e):e)r.add(o.from,o.to,o.value);return r.finish()}static join(e){if(!e.length)return Dn.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let o=e[r];o!=Dn.empty;o=o.nextLayer)n=new Dn(o.chunkPos,o.chunk,n,Math.max(o.maxPoint,n.maxPoint));return n}}Dn.empty=new Dn([],[],null,-1);function wL(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(j0);e=r}return t}Dn.empty.nextLayer=Dn.empty;class os{finishChunk(e){this.chunks.push(new hy(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new os)).add(e,n,r)}addInner(e,n,r){let o=e-this.lastTo||r.startSide-this.last.endSide;if(o<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return o<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Dn.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Dn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function lj(t,e,n){let r=new Map;for(let i of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&o.push(new hO(s,n,r,i));return o.length==1?o[0]:new Ad(o)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kg(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Kg(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Kg(this.heap,0)}}}function Kg(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let o=t[r];if(r+1=0&&(o=t[r+1],r++),n.compare(o)<0)break;t[r]=n,t[e]=o,e=r}}class Bu{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ad.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){nf(this.active,e),nf(this.activeTo,e),nf(this.activeRank,e),this.minActive=uj(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:o,rank:i}=this.cursor;for(;n0;)n++;rf(this.active,n,r),rf(this.activeTo,n,o),rf(this.activeRank,n,i),e&&rf(e,n,this.cursor.from),this.minActive=uj(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let o=this.minActive;if(o>-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>e){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),r&&nf(r,o)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[o]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function cj(t,e,n,r,o,i){t.goto(e),n.goto(r);let s=r+o,a=r,l=r-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,d=u<0?t.to+l:n.to,h=Math.min(d,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&k0(t.activeForPoint(t.to),n.activeForPoint(n.to))||i.comparePoint(a,h,t.point,n.point):h>a&&!k0(t.active,n.active)&&i.compareRange(a,h,t.active,n.active),d>s)break;a=d,u<=0&&t.next(),u>=0&&n.next()}}function k0(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function uj(t,e){let n=-1,r=1e9;for(let o=0;o=e)return o;if(o==t.length)break;i+=t.charCodeAt(o)==9?n-i%n:1,o=xo(t,o)}return r===!0?-1:t.length}const C0="ͼ",dj=typeof Symbol>"u"?"__"+C0:Symbol.for(C0),O0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),hj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Va{constructor(e,n){this.rules=[];let{finish:r}=n||{};function o(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function i(s,a,l,u){let d=[],h=/^@(\w+)\b/.exec(s[0]),f=h&&h[1]=="keyframes";if(h&&a==null)return l.push(s[0]+";");for(let p in a){let m=a[p];if(/&/.test(p))i(p.split(/,\s*/).map(b=>s.map(v=>b.replace(/&/,v))).reduce((b,v)=>b.concat(v)),m,l);else if(m&&typeof m=="object"){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");i(o(p),m,d,f)}else m!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+m+";")}(d.length||f)&&l.push((r&&!h&&!u?s.map(r):s).join(", ")+" {"+d.join(" ")+"}")}for(let s in e)i(o(s),e[s],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=hj[dj]||1;return hj[dj]=e+1,C0+e.toString(36)}static mount(e,n,r){let o=e[O0],i=r&&r.nonce;o?i&&o.setNonce(i):o=new xL(e,i),o.mount(Array.isArray(n)?n:[n],e)}}let fj=new Map;class xL{constructor(e,n){let r=e.ownerDocument||e,o=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&o.CSSStyleSheet){let i=fj.get(r);if(i)return e[O0]=i;this.sheet=new o.CSSStyleSheet,fj.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[O0]=this}mount(e,n){let r=this.sheet,o=0,i=0;for(let s=0;s-1&&(this.modules.splice(l,1),i--,l=-1),l==-1){if(this.modules.splice(i++,0,a),r)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},jL=typeof navigator<"u"&&/Mac/.test(navigator.platform),kL=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var yo=0;yo<10;yo++)Ha[48+yo]=Ha[96+yo]=String(yo);for(var yo=1;yo<=24;yo++)Ha[yo+111]="F"+yo;for(var yo=65;yo<=90;yo++)Ha[yo]=String.fromCharCode(yo+32),$d[yo]=String.fromCharCode(yo);for(var Jg in Ha)$d.hasOwnProperty(Jg)||($d[Jg]=Ha[Jg]);function SL(t){var e=jL&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||kL&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?$d:Ha)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Md(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function _0(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Yf(t,e){if(!e.anchorNode)return!1;try{return _0(t,e.anchorNode)}catch{return!1}}function Td(t){return t.nodeType==3?Il(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function vd(t,e,n,r){return n?pj(t,e,n,r,-1)||pj(t,e,n,r,1):!1}function Dl(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Tp(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function pj(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Ms(t))){if(t.nodeName=="DIV")return!1;let i=t.parentNode;if(!i||i.nodeType!=1)return!1;e=Dl(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=o<0?Ms(t):0}else return!1}}function Ms(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Km(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function CL(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function fO(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function OL(t,e,n,r,o,i,s,a){let l=t.ownerDocument,u=l.defaultView||window;for(let d=t,h=!1;d&&!h;)if(d.nodeType==1){let f,p=d==l.body,m=1,b=1;if(p)f=CL(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(h=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let y=d.getBoundingClientRect();({scaleX:m,scaleY:b}=fO(d,y)),f={left:y.left,right:y.left+d.clientWidth*m,top:y.top,bottom:y.top+d.clientHeight*b}}let v=0,g=0;if(o=="nearest")e.top0&&e.bottom>f.bottom+g&&(g=e.bottom-f.bottom+g+s)):e.bottom>f.bottom&&(g=e.bottom-f.bottom+s,n<0&&e.top-g0&&e.right>f.right+v&&(v=e.right-f.right+v+i)):e.right>f.right&&(v=e.right-f.right+i,n<0&&e.lefto.clientHeight&&(r=o),!n&&o.scrollWidth>o.clientWidth&&(n=o),o=o.assignedSlot||o.parentNode;else if(o.nodeType==11)o=o.host;else break;return{x:n,y:r}}class EL{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Ms(n):0),r,Math.min(e.focusOffset,r?Ms(r):0))}set(e,n,r,o){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=o}}let ac=null;function pO(t){if(t.setActive)return t.setActive();if(ac)return t.focus(ac);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(ac==null?{get preventScroll(){return ac={preventScroll:!0},!0}}:void 0),!ac){ac=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function vO(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ms(n)}else if(n.parentNode&&!Tp(n))r=Dl(n),n=n.parentNode;else return null}}function bO(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&rn)return h.domBoundsAround(e,n,u);if(f>=e&&o==-1&&(o=l,i=u),u>n&&h.dom.parentNode==this.dom){s=l,a=d;break}d=f,u=f+h.breakAfter}return{from:i,to:a<0?r+this.length:a,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=fy){this.markDirty();for(let o=e;othis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function wO(t,e,n,r,o,i,s,a,l){let{children:u}=t,d=u.length?u[e]:null,h=i.length?i[i.length-1]:null,f=h?h.breakAfter:s;if(!(e==r&&d&&!s&&!f&&i.length<2&&d.merge(n,o,i.length?h:null,n==0,a,l))){if(r0&&(!s&&i.length&&d.merge(n,d.length,i[0],!1,a,0)?d.breakAfter=i.shift().breakAfter:(n2);var ct={mac:yj||/Mac/.test(Qo.platform),windows:/Win/.test(Qo.platform),linux:/Linux|X11/.test(Qo.platform),ie:Jm,ie_version:jO?E0.documentMode||6:$0?+$0[1]:A0?+A0[1]:0,gecko:vj,gecko_version:vj?+(/Firefox\/(\d+)/.exec(Qo.userAgent)||[0,0])[1]:0,chrome:!!Gg,chrome_version:Gg?+Gg[1]:0,ios:yj,android:/Android\b/.test(Qo.userAgent),webkit:bj,safari:kO,webkit_version:bj?+(/\bAppleWebKit\/(\d+)/.exec(Qo.userAgent)||[0,0])[1]:0,tabSize:E0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const ML=256;class is extends hr{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof is)||this.length-(n-e)+r.length>ML||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new is(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Ao(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return TL(this.dom,e,n)}}class ra extends hr{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let o of n)o.setParent(this)}setAttrs(e){if(mO(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,o,i,s){return r&&(!(r instanceof ra&&r.mark.eq(this.mark))||e&&i<=0||ne&&n.push(r=e&&(o=i),r=l,i++}let s=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new ra(this.mark,n,s)}domAtPos(e){return SO(this,e)}coordsAt(e,n){return OO(this,e,n)}}function TL(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let o=e,i=e,s=0;e==0&&n<0||e==r&&n>=0?ct.chrome||ct.gecko||(e?(o--,s=1):i=0)?0:a.length-1];return ct.safari&&!s&&l.width==0&&(l=Array.prototype.find.call(a,u=>u.width)||l),s?Km(l,s<0):l||null}class _a extends hr{static create(e,n,r){return new _a(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=_a.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,o,i,s){return r&&(!(r instanceof _a)||!this.widget.compare(r.widget)||e>0&&i<=0||n0)?Ao.before(this.dom):Ao.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let o=this.dom.getClientRects(),i=null;if(!o.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?o.length-1:0;i=o[a],!(e>0?a==0:a==o.length-1||i.top0?Ao.before(this.dom):Ao.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Zn.empty}get isHidden(){return!0}}is.prototype.children=_a.prototype.children=nu.prototype.children=fy;function SO(t,e){let n=t.dom,{children:r}=t,o=0;for(let i=0;oi&&e0;i--){let s=r[i-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let i=o;i0&&e instanceof ra&&o.length&&(r=o[o.length-1])instanceof ra&&r.mark.eq(e.mark)?CO(r,e.children[0],n-1):(o.push(e),e.setParent(t)),t.length+=e.length}function OO(t,e,n){let r=null,o=-1,i=null,s=-1;function a(u,d){for(let h=0,f=0;h=d&&(p.children.length?a(p,d-f):(!i||i.isHidden&&n>0)&&(m>d||f==m&&p.getSide()>0)?(i=p,s=d-f):(f-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(o.indexOf(i)==-1||t[i]!==e[i]))return!1;return!0}function T0(t,e,n){let r=!1;if(e)for(let o in e)n&&o in n||(r=!0,o=="style"?t.style.cssText="":t.removeAttribute(o));if(n)for(let o in n)e&&e[o]==n[o]||(r=!0,o=="style"?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r}function RL(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Wa(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,o;if(e.isBlockGap)r=-5e8,o=4e8;else{let{start:i,end:s}=_O(e,n);r=(i?n?-3e8:-1:5e8)-1,o=(s?n?2e8:1:-6e8)+1}return new Wa(e,r,o,n,e.widget||null,!0)}static line(e){return new vh(e)}static set(e,n=!1){return Dn.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Lt.none=Dn.empty;class gh extends Lt{constructor(e){let{start:n,end:r}=_O(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof gh&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Pp(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}gh.prototype.point=!1;class vh extends Lt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof vh&&this.spec.class==e.spec.class&&Pp(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}vh.prototype.mapMode=Lo.TrackBefore;vh.prototype.point=!0;class Wa extends Lt{constructor(e,n,r,o,i,s){super(n,r,i,e),this.block=o,this.isReplace=s,this.mapMode=o?n<=0?Lo.TrackBefore:Lo.TrackAfter:Lo.TrackDel}get type(){return this.startSide!=this.endSide?qo.WidgetRange:this.startSide<=0?qo.WidgetBefore:qo.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Wa&&NL(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Wa.prototype.point=!0;function _O(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function NL(t,e){return t==e||!!(t&&e&&t.compare(e))}function P0(t,e,n,r=0){let o=n.length-1;o>=0&&n[o]+r>=t?n[o]=Math.max(n[o],e):n.push(t,e)}class Zr extends hr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,o,i,s){if(r){if(!(r instanceof Zr))return!1;this.dom||r.transferDOM(this)}return o&&this.setDeco(r?r.attrs:null),xO(this,e,n,r?r.children.slice():[],i,s),!0}split(e){let n=new Zr;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:o}=this.childPos(e);o&&(n.append(this.children[r].split(o),0),this.children[r].merge(o,this.children[r].length,null,!1,0,0),r++);for(let i=r;i0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Pp(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){CO(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=M0(n,this.attrs||{})),r&&(this.attrs=M0({class:r},this.attrs||{}))}domAtPos(e){return SO(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(mO(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(T0(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let o=this.dom.lastChild;for(;o&&hr.get(o)instanceof ra;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((r=hr.get(o))===null||r===void 0?void 0:r.isEditable)==!1&&(!ct.ios||!this.children.some(i=>i instanceof is))){let i=document.createElement("BR");i.cmIgnore=!0,this.dom.appendChild(i)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof is)||/[^ -~]/.test(r.text))return null;let o=Td(r.dom);if(o.length!=1)return null;e+=o[0].width,n=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=OO(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:o}=this.parent.view.viewState,i=r.bottom-r.top;if(Math.abs(i-o.lineHeight)<2&&o.textHeight=n){if(i instanceof Zr)return i;if(s>n)break}o=s+i.breakAfter}return null}}class Qs extends hr{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,o,i,s){return r&&(!(r instanceof Qs)||!this.widget.compare(r.widget)||e>0&&i<=0||n0}}class R0 extends Za{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class bd{constructor(e,n,r,o){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Qs&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Zr),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(of(new nu(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Qs)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=i,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(of(new is(this.text.slice(this.textOff,this.textOff+o)),n),r),this.atCursorPos=!0,this.textOff+=o,e-=o,r=0}}span(e,n,r,o){this.buildText(n-e,r,o),this.pos=n,this.openStart<0&&(this.openStart=o)}point(e,n,r,o,i,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Wa){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Wa)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Qs(r.widget||ru.block,a,r));else{let l=_a.create(r.widget||ru.inline,a,a?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&i<=o.length&&(e0),d=!l.isEditable&&(eo.length||r.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),u&&(h.append(of(new nu(1),o),i),i=o.length+Math.max(0,i-o.length)),h.append(of(l,o),i),this.atCursorPos=d,this.pendingBuffer=d?eo.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=i)}static build(e,n,r,o,i){let s=new bd(e,n,r,i);return s.openEnd=Dn.spans(o,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function of(t,e){for(let n of e)t=new ra(n,[t],t.length);return t}class ru extends Za{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ru.inline=new ru("span");ru.block=new ru("div");var Sr=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Sr||(Sr={}));const zl=Sr.LTR,py=Sr.RTL;function EO(t){let e=[];for(let n=0;n=n){if(a.level==r)return s;(i<0||(o!=0?o<0?a.fromn:e[i].level>a.level))&&(i=s)}}if(i<0)throw new RangeError("Index out of range");return i}}function $O(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;b-=3)if(hs[b+1]==-p){let v=hs[b+2],g=v&2?o:v&4?v&1?i:o:0;g&&(dr[h]=dr[hs[b]]=g),a=b;break}}else{if(hs.length==189)break;hs[a++]=h,hs[a++]=f,hs[a++]=l}else if((m=dr[h])==2||m==1){let b=m==o;l=b?0:1;for(let v=a-3;v>=0;v-=3){let g=hs[v+2];if(g&2)break;if(b)hs[v+2]|=2;else{if(g&4)break;hs[v+2]|=4}}}}}function FL(t,e,n,r){for(let o=0,i=r;o<=n.length;o++){let s=o?n[o-1].to:t,a=ol;)m==v&&(m=n[--b].from,v=b?n[b-1].to:t),dr[--m]=p;l=d}else i=u,l++}}}function D0(t,e,n,r,o,i,s){let a=r%2?2:1;if(r%2==o%2)for(let l=e,u=0;ll&&s.push(new Ea(l,b.from,p));let v=b.direction==zl!=!(p%2);I0(t,v?r+1:r,o,b.inner,b.from,b.to,s),l=b.to}m=b.to}else{if(m==n||(d?dr[m]!=a:dr[m]==a))break;m++}f?D0(t,l,m,r+1,o,f,s):le;){let d=!0,h=!1;if(!u||l>i[u-1].to){let b=dr[l-1];b!=a&&(d=!1,h=b==16)}let f=!d&&a==1?[]:null,p=d?r:r+1,m=l;e:for(;;)if(u&&m==i[u-1].to){if(h)break e;let b=i[--u];if(!d)for(let v=b.from,g=u;;){if(v==e)break e;if(g&&i[g-1].to==v)v=i[--g].from;else{if(dr[v-1]==a)break e;break}}if(f)f.push(b);else{b.todr.length;)dr[dr.length]=256;let r=[],o=e==zl?0:1;return I0(t,o,o,n,0,t.length,r),r}function MO(t){return[new Ea(0,t,0)]}let TO="";function UL(t,e,n,r,o){var i;let s=r.head-t.from,a=Ea.find(e,s,(i=r.bidiLevel)!==null&&i!==void 0?i:-1,r.assoc),l=e[a],u=l.side(o,n);if(s==u){let f=a+=o?1:-1;if(f<0||f>=e.length)return null;l=e[a=f],s=l.side(!o,n),u=l.side(o,n)}let d=xo(t.text,s,l.forward(o,n));(dl.to)&&(d=u),TO=t.text.slice(Math.min(s,d),Math.max(s,d));let h=a==(o?e.length-1:0)?null:e[a+(o?1:-1)];return h&&d==u&&h.level+(o?0:1)t.some(e=>e)}),BO=at.define({combine:t=>t.some(e=>e)}),FO=at.define();class zc{constructor(e,n="nearest",r="nearest",o=5,i=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=o,this.xMargin=i,this.isSnapshot=s}map(e){return e.empty?this:new zc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new zc(Ae.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const sf=bn.define({map:(t,e)=>t.map(e)}),qO=bn.define();function Fo(t,e,n){let r=t.facet(DO);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const ja=at.define({combine:t=>t.length?t[0]:!0});let HL=0;const Xu=at.define();class Ir{constructor(e,n,r,o,i){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=o,this.extension=i(this)}static define(e,n){const{eventHandlers:r,eventObservers:o,provide:i,decorations:s}=n||{};return new Ir(HL++,e,r,o,a=>{let l=[Xu.of(a)];return s&&l.push(Pd.of(u=>{let d=u.plugin(a);return d?s(d):Lt.none})),i&&l.push(i(a)),l})}static fromClass(e,n){return Ir.define(r=>new e(r),n)}}class Qg{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Fo(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){Fo(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Fo(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const UO=at.define(),vy=at.define(),Pd=at.define(),VO=at.define(),by=at.define(),HO=at.define();function xj(t,e){let n=t.state.facet(HO);if(!n.length)return n;let r=n.map(i=>i instanceof Function?i(t):i),o=[];return Dn.spans(r,e.from,e.to,{point(){},span(i,s,a,l){let u=i-e.from,d=s-e.from,h=o;for(let f=a.length-1;f>=0;f--,l--){let p=a[f].spec.bidiIsolate,m;if(p==null&&(p=VL(e.text,u,d)),l>0&&h.length&&(m=h[h.length-1]).to==u&&m.direction==p)m.to=d,h=m.inner;else{let b={from:u,to:d,direction:p,inner:[]};h.push(b),h=b.inner}}}}),o}const WO=at.define();function yy(t){let e=0,n=0,r=0,o=0;for(let i of t.state.facet(WO)){let s=i(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(o=Math.max(o,s.bottom)))}return{left:e,right:n,top:r,bottom:o}}const Zu=at.define();class ki{constructor(e,n,r,o){this.fromA=e,this.toA=n,this.fromB=r,this.toB=o}join(e){return new ki(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let o=e[n-1];if(!(o.fromA>r.toA)){if(o.toAd)break;i+=2}if(!l)return r;new ki(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),s=l.toA,a=l.toB}}}class Rp{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=eo.empty(this.startState.doc.length);for(let i of r)this.changes=this.changes.compose(i.changes);let o=[];this.changes.iterChangedRanges((i,s,a,l)=>o.push(new ki(i,s,a,l))),this.changedRanges=o}static create(e,n,r){return new Rp(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class jj extends hr{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Lt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Zr],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ki(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:d})=>dthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let o=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?o=this.domChanged.newSel.head:!XL(e.changes,this.hasComposition)&&!e.selectionSet&&(o=e.state.selection.main.head));let i=o>-1?KL(this.view,e.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:d}=this.hasComposition;r=new ki(u,d,e.changes.mapPos(u,-1),e.changes.mapPos(d,1)).addToSet(r.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(ct.ie||ct.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),l=QL(s,a,e.changes);return r=ki.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=ct.chrome||ct.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||o.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to=0?o[s]:null;if(!a)break;let{fromA:l,toA:u,fromB:d,toB:h}=a,f,p,m,b;if(r&&r.range.fromBd){let S=bd.build(this.view.state.doc,d,r.range.fromB,this.decorations,this.dynamicDecorationMap),w=bd.build(this.view.state.doc,r.range.toB,h,this.decorations,this.dynamicDecorationMap);p=S.breakAtStart,m=S.openStart,b=w.openEnd;let _=this.compositionView(r);w.breakAtStart?_.breakAfter=1:w.content.length&&_.merge(_.length,_.length,w.content[0],!1,w.openStart,0)&&(_.breakAfter=w.content[0].breakAfter,w.content.shift()),S.content.length&&_.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(_).concat(w.content)}else({content:f,breakAtStart:p,openStart:m,openEnd:b}=bd.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:v,off:g}=i.findPos(u,1),{i:y,off:k}=i.findPos(l,-1);wO(this,y,k,v,g,f,p,m,b)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(qO)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new is(e.text.nodeValue);n.flags|=8;for(let{deco:o}of e.marks)n=new ra(o,[n],n.length);let r=new Zr;return r.append(n,0),r}fixCompositionDOM(e){let n=(i,s)=>{s.flags|=8|(s.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(s);let a=hr.get(i);a&&a!=s&&(a.dom=null),s.setDOM(i)},r=this.childPos(e.range.fromB,1),o=this.children[r.i];n(e.line,o);for(let i=e.marks.length-1;i>=-1;i--)r=o.childPos(r.off,1),o=o.children[r.i],n(i>=0?e.marks[i].node:e.text,o)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,o=r==this.dom,i=!o&&Yf(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(o||n||i))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),u=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(ct.gecko&&a.empty&&!this.hasComposition&&WL(l)){let h=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(h,l.node.childNodes[l.offset]||null)),l=u=new Ao(h,0),s=!0}let d=this.view.observer.selectionRange;(s||!d.focusNode||(!vd(l.node,l.offset,d.anchorNode,d.anchorOffset)||!vd(u.node,u.offset,d.focusNode,d.focusOffset))&&!this.suppressWidgetCursorChange(d,a))&&(this.view.observer.ignore(()=>{ct.android&&ct.chrome&&this.dom.contains(d.focusNode)&&YL(d.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=Md(this.view.root);if(h)if(a.empty){if(ct.gecko){let f=JL(l.node,l.offset);if(f&&f!=3){let p=(f==1?vO:bO)(l.node,l.offset);p&&(l=new Ao(p.node,p.offset))}}h.collapse(l.node,l.offset),a.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=a.bidiLevel)}else if(h.extend){h.collapse(l.node,l.offset);try{h.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();a.anchor>a.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(f)}i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new Ao(d.anchorNode,d.anchorOffset),this.impreciseHead=u.precise?null:new Ao(d.focusNode,d.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&vd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Md(e.root),{anchorNode:o,anchorOffset:i}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=Zr.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let d=this.domAtPos(n.head+n.assoc);r.collapse(d.node,d.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&r.collapse(o,i)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let o=e.offset;!r&&o=0;o--){let i=hr.get(n.childNodes[o]);i instanceof Zr&&(r=i.domAtPos(i.length))}return r?new Ao(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=hr.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;s--){let a=this.children[s],l=i-a.breakAfter,u=l-a.length;if(le||a.covers(1))&&(!r||a instanceof Zr&&!(r instanceof Zr&&n>=0)))r=a,o=u;else if(r&&u==e&&l==e&&a instanceof Qs&&Math.abs(n)<2){if(a.deco.startSide<0)break;s&&(r=null)}i=u}return r?r.coordsAt(e-o,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),o=this.children[n];if(!(o instanceof Zr))return null;for(;o.children.length;){let{i:a,off:l}=o.childPos(r,1);for(;;a++){if(a==o.children.length)return null;if((o=o.children[a]).length)break}r=l}if(!(o instanceof is))return null;let i=xo(o.text,r);if(i==r)return null;let s=Il(o.dom,r,i).getClientRects();for(let a=0;aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==Sr.LTR;for(let u=0,d=0;do)break;if(u>=r){let p=h.dom.getBoundingClientRect();if(n.push(p.height),s){let m=h.dom.lastChild,b=m?Td(m):[];if(b.length){let v=b[b.length-1],g=l?v.right-p.left:p.right-v.left;g>a&&(a=g,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Sr.RTL:Sr.LTR}measureTextSize(){for(let i of this.children)if(i instanceof Zr){let s=i.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let i=Td(e.firstChild)[0];n=e.getBoundingClientRect().height,r=i?i.width/27:7,o=i?i.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:o}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new yO(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,o=0;;o++){let i=o==n.viewports.length?null:n.viewports[o],s=i?i.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(Lt.replace({widget:new R0(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!i)break;r=i.to+1}return Lt.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Pd).map(i=>(this.dynamicDecorationMap[e++]=typeof i=="function")?i(this.view):i),r=!1,o=this.view.state.facet(VO).map((i,s)=>{let a=typeof i=="function";return a&&(r=!0),a?i(this.view):i});for(o.length&&(this.dynamicDecorationMap[e++]=r,n.push(Dn.join(o))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),o;if(!r)return;!n.empty&&(o=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,o.left),top:Math.min(r.top,o.top),right:Math.max(r.right,o.right),bottom:Math.max(r.bottom,o.bottom)});let i=yy(this.view),s={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;OL(this.view.scrollDOM,s,n.head{re.from&&(n=!0)}),n}function ZL(t,e,n=1){let r=t.charCategorizer(e),o=t.doc.lineAt(e),i=e-o.from;if(o.length==0)return Ae.cursor(e);i==0?n=1:i==o.length&&(n=-1);let s=i,a=i;n<0?s=xo(o.text,i,!1):a=xo(o.text,i);let l=r(o.text.slice(s,a));for(;s>0;){let u=xo(o.text,s,!1);if(r(o.text.slice(u,s))!=l)break;s=u}for(;at?e.left-t:Math.max(0,t-e.right)}function t7(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Yg(t,e){return t.tope.top+1}function kj(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function L0(t,e,n){let r,o,i,s,a=!1,l,u,d,h;for(let m=t.firstChild;m;m=m.nextSibling){let b=Td(m);for(let v=0;vk||s==k&&i>y){r=m,o=g,i=y,s=k;let S=k?n0?v0)}y==0?n>g.bottom&&(!d||d.bottomg.top)&&(u=m,h=g):d&&Yg(d,g)?d=Sj(d,g.bottom):h&&Yg(h,g)&&(h=kj(h,g.top))}}if(d&&d.bottom>=n?(r=l,o=d):h&&h.top<=n&&(r=u,o=h),!r)return{node:t,offset:0};let f=Math.max(o.left,Math.min(o.right,e));if(r.nodeType==3)return Cj(r,f,n);if(a&&r.contentEditable!="false")return L0(r,f,n);let p=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(o.left+o.right)/2?1:0);return{node:t,offset:p}}function Cj(t,e,n){let r=t.nodeValue.length,o=-1,i=1e9,s=0;for(let a=0;an?d.top-n:n-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&h=(d.left+d.right)/2,p=f;if((ct.chrome||ct.gecko)&&Il(t,a).getBoundingClientRect().left==d.right&&(p=!f),h<=0)return{node:t,offset:a+(p?1:0)};o=a+(p?1:0),i=h}}}return{node:t,offset:o>-1?o:s>0?t.nodeValue.length:0}}function JO(t,e,n,r=-1){var o,i;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:d,y:h}=e,f=h-a;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,w=!1;l=t.elementAtHeight(f),l.type!=qo.Text;)for(;f=r>0?l.bottom+S:l.top-S,!(f>=0&&f<=u);){if(w)return n?null:0;w=!0,r=-r}h=a+f;let p=l.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:Oj(t,s,l,d,h);let m=t.dom.ownerDocument,b=t.root.elementFromPoint?t.root:m,v=b.elementFromPoint(d,h);v&&!t.contentDOM.contains(v)&&(v=null),v||(d=Math.max(s.left+1,Math.min(s.right-1,d)),v=b.elementFromPoint(d,h),v&&!t.contentDOM.contains(v)&&(v=null));let g,y=-1;if(v&&((o=t.docView.nearest(v))===null||o===void 0?void 0:o.isEditable)!=!1){if(m.caretPositionFromPoint){let S=m.caretPositionFromPoint(d,h);S&&({offsetNode:g,offset:y}=S)}else if(m.caretRangeFromPoint){let S=m.caretRangeFromPoint(d,h);S&&({startContainer:g,startOffset:y}=S,(!t.contentDOM.contains(g)||ct.safari&&n7(g,y,d)||ct.chrome&&r7(g,y,d))&&(g=void 0))}g&&(y=Math.min(Ms(g),y))}if(!g||!t.docView.dom.contains(g)){let S=Zr.find(t.docView,p);if(!S)return f>l.top+l.height/2?l.to:l.from;({node:g,offset:y}=L0(S.dom,d,h))}let k=t.docView.nearest(g);if(!k)return null;if(k.isWidget&&((i=k.dom)===null||i===void 0?void 0:i.nodeType)==1){let S=k.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,l=Math.floor((o-n.top-(t.defaultLineHeight-a)*.5)/a);i+=l*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+S0(s,i,t.state.tabSize)}function n7(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let o=t.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return Il(t,r-1,r).getBoundingClientRect().left>n}function r7(t,e,n){if(e!=0)return!1;for(let o=t;;){let i=o.parentNode;if(!i||i.nodeType!=1||i.firstChild!=o)return!1;if(i.classList.contains("cm-line"))break;o=i}let r=t.nodeType==1?t.getBoundingClientRect():Il(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function B0(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==qo.Text))return r}return n}function o7(t,e,n,r){let o=B0(t,e.head),i=!r||o.type!=qo.Text||!(t.lineWrapping||o.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(i){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(o.from),l=t.posAtCoords({x:n==(a==Sr.LTR)?s.right-1:s.left+1,y:(i.top+i.bottom)/2});if(l!=null)return Ae.cursor(l,n?-1:1)}return Ae.cursor(n?o.to:o.from,n?-1:1)}function _j(t,e,n,r){let o=t.state.doc.lineAt(e.head),i=t.bidiSpans(o),s=t.textDirectionAt(o.from);for(let a=e,l=null;;){let u=UL(o,i,s,a,n),d=TO;if(!u){if(o.number==(n?t.state.doc.lines:1))return a;d=` +`,o=t.state.doc.line(o.number+(n?1:-1)),i=t.bidiSpans(o),u=t.visualLineSide(o,!n)}if(l){if(!l(d))return a}else{if(!r)return u;l=r(d)}a=u}}function i7(t,e,n){let r=t.state.charCategorizer(e),o=r(n);return i=>{let s=r(i);return o==Ar.Space&&(o=s),o==s}}function s7(t,e,n,r){let o=e.head,i=n?1:-1;if(o==(n?t.state.doc.length:0))return Ae.cursor(o,e.assoc);let s=e.goalColumn,a,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(o,e.assoc||-1),d=t.documentTop;if(u)s==null&&(s=u.left-l.left),a=i<0?u.top:u.bottom;else{let p=t.viewState.lineBlockAt(o);s==null&&(s=Math.min(l.right-l.left,t.defaultCharacterWidth*(o-p.from))),a=(i<0?p.top:p.bottom)+d}let h=l.left+s,f=r??t.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=a+(f+p)*i,b=JO(t,{x:h,y:m},!1,i);if(ml.bottom||(i<0?bo)){let v=t.docView.coordsForChar(b),g=!v||m{if(e>i&&eo(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Ae.cursor(r,ri)&&this.lineBreak(),o=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,s=1,a;if(this.lineSeparator?(i=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=o.exec(n))&&(i=a.index,s=a[0].length),this.append(n.slice(r,i<0?n.length:i)),i<0)break;if(this.lineBreak(),s>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=s-1);r=i+s}}readNode(e){if(e.cmIgnore)return;let n=hr.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let o=r.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(l7(e,r.node,r.offset)?n:0))}}function l7(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:i,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=i||s?[]:h7(e),l=new a7(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=f7(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=i&&i.node==a.focusNode&&i.offset==a.focusOffset||!_0(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),u=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!_0(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),d=e.viewport;if((ct.ios||ct.chrome)&&e.state.selection.main.empty&&l!=u&&(d.from>0||d.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,l=o.from,u=null;(i===8||ct.android&&e.text.length=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,o.to))}:(ct.mac||ct.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ae.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:Zn.of([" "])}):ct.chrome&&n&&n.from==n.to&&n.from==o.head&&n.insert.toString()==` + `&&t.lineWrapping&&(r&&(r=Ae.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:Zn.of([" "])}),n)return wy(t,n,r,i);if(r&&!r.main.eq(o)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function wy(t,e,n,r=-1){if(ct.ios&&t.inputState.flushIOSKey(e))return!0;let o=t.state.selection.main;if(ct.android&&(e.to==o.to&&(e.from==o.from||e.from==o.from-1&&t.state.sliceDoc(e.from,o.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ic(t.contentDOM,"Enter",13)||(e.from==o.from-1&&e.to==o.to&&e.insert.length==0||r==8&&e.insert.lengtho.head)&&Ic(t.contentDOM,"Backspace",8)||e.from==o.from&&e.to==o.to+1&&e.insert.length==0&&Ic(t.contentDOM,"Delete",46)))return!0;let i=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,a=()=>s||(s=u7(t,e,n));return t.state.facet(IO).some(l=>l(t,e.from,e.to,i,a))||t.dispatch(a()),!0}function u7(t,e,n){let r,o=t.state,i=o.selection.main;if(e.from>=i.from&&e.to<=i.to&&e.to-e.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=i.frome.to?o.sliceDoc(e.to,i.to):"";r=o.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let a=o.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=i.to&&e.to>=i.to-10){let u=t.state.sliceDoc(e.from,e.to),d,h=n&&KO(t,n.main.head);if(h){let m=e.insert.length-(e.to-e.from);d={from:h.from,to:h.to-m}}else d=t.state.doc.lineAt(i.head);let f=i.to-e.to,p=i.to-i.from;r=o.changeByRange(m=>{if(m.from==i.from&&m.to==i.to)return{changes:a,range:l||m.map(a)};let b=m.to-f,v=b-u.length;if(m.to-m.from!=p||t.state.sliceDoc(v,b)!=u||m.to>=d.from&&m.from<=d.to)return{range:m};let g=o.changes({from:v,to:b,insert:e.insert}),y=m.to-i.to;return{changes:g,range:l?Ae.range(Math.max(0,l.anchor+y),Math.max(0,l.head+y)):m.map(g)}})}else r={changes:a,selection:l&&o.selection.replaceRange(l)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),o.update(r,{userEvent:s,scrollIntoView:!0})}function d7(t,e,n,r){let o=Math.min(t.length,e.length),i=0;for(;i0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let l=Math.max(0,i-Math.min(s,a));n-=s+l-i}if(s=s?i-n:0;i-=l,a=i+(a-s),s=i}else if(a=a?i-n:0;i-=l,s=i+(s-a),a=i}return{from:i,toA:s,toB:a}}function h7(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=t.observer.selectionRange;return n&&(e.push(new Ej(n,r)),(o!=n||i!=r)&&e.push(new Ej(o,i))),e}function f7(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Ae.single(n+e,r+e):null}class p7{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ct.safari&&e.contentDOM.addEventListener("input",()=>null),ct.gecko&&$7(e.contentDOM.ownerDocument)}handleEvent(e){!j7(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let o of r.observers)o(this.view,n);for(let o of r.handlers){if(n.defaultPrevented)break;if(o(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=m7(e),r=this.handlers,o=this.view.contentDOM;for(let i in n)if(i!="scroll"){let s=!n[i].handlers.length,a=r[i];a&&s!=!a.handlers.length&&(o.removeEventListener(i,this.handleEvent),a=null),a||o.addEventListener(i,this.handleEvent,{passive:s})}for(let i in r)i!="scroll"&&!n[i]&&o.removeEventListener(i,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&YO.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),ct.android&&ct.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return ct.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=QO.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||g7.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:ct.safari&&!ct.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Aj(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(o){Fo(n.state,o)}}}function m7(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let o=r.spec;if(o&&o.domEventHandlers)for(let i in o.domEventHandlers){let s=o.domEventHandlers[i];s&&n(i).handlers.push(Aj(r.value,s))}if(o&&o.domEventObservers)for(let i in o.domEventObservers){let s=o.domEventObservers[i];s&&n(i).observers.push(Aj(r.value,s))}}for(let r in ss)n(r).handlers.push(ss[r]);for(let r in Oi)n(r).observers.push(Oi[r]);return e}const QO=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],g7="dthko",YO=[16,17,18,20,91,92,224,225],af=6;function lf(t){return Math.max(0,t)*.7+8}function v7(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class b7{constructor(e,n,r,o){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=_L(e.contentDOM),this.atoms=e.state.facet(by).map(s=>s(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Mn.allowMultipleSelections)&&y7(e,n),this.dragging=x7(e,n)&&e_(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&v7(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,o=0,i=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=yy(this.view);e.clientX-l.left<=o+af?n=-lf(o-e.clientX):e.clientX+l.right>=s-af&&(n=lf(e.clientX-s)),e.clientY-l.top<=i+af?r=-lf(i-e.clientY):e.clientY+l.bottom>=a-af&&(r=lf(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;rn.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function y7(t,e){let n=t.state.facet(PO);return n.length?n[0](e):ct.mac?e.metaKey:e.ctrlKey}function w7(t,e){let n=t.state.facet(RO);return n.length?n[0](e):ct.mac?!e.altKey:!e.ctrlKey}function x7(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Md(t.root);if(!r||r.rangeCount==0)return!0;let o=r.getRangeAt(0).getClientRects();for(let i=0;i=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function j7(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=hr.get(n))&&r.ignoreEvent(e))return!1;return!0}const ss=Object.create(null),Oi=Object.create(null),XO=ct.ie&&ct.ie_version<15||ct.ios&&ct.webkit_version<604;function k7(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),ZO(t,n.value)},50)}function Gm(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function ZO(t,e){e=Gm(t.state,my,e);let{state:n}=t,r,o=1,i=n.toText(e),s=i.lines==n.selection.ranges.length;if(F0!=null&&n.selection.ranges.every(l=>l.empty)&&F0==i.toString()){let l=-1;r=n.changeByRange(u=>{let d=n.doc.lineAt(u.from);if(d.from==l)return{range:u};l=d.from;let h=n.toText((s?i.line(o++).text:e)+n.lineBreak);return{changes:{from:d.from,insert:h},range:Ae.cursor(u.from+h.length)}})}else s?r=n.changeByRange(l=>{let u=i.line(o++);return{changes:{from:l.from,to:l.to,insert:u.text},range:Ae.cursor(l.from+u.length)}}):r=n.replaceSelection(i);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Oi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};ss.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Oi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Oi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};ss.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(NO))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=O7(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new b7(t,e,n,r)),r&&t.observer.ignore(()=>{pO(t.contentDOM);let i=t.root.activeElement;i&&!i.contains(t.contentDOM)&&i.blur()});let o=t.inputState.mouseSelection;if(o)return o.start(e),o.dragging===!1}return!1};function $j(t,e,n,r){if(r==1)return Ae.cursor(e,n);if(r==2)return ZL(t.state,e,n);{let o=Zr.find(t.docView,e),i=t.state.doc.lineAt(o?o.posAtEnd:e),s=o?o.posAtStart:i.from,a=o?o.posAtEnd:i.to;return ae>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function S7(t,e,n,r){let o=Zr.find(t.docView,e);if(!o)return 1;let i=e-o.posAtStart;if(i==0)return 1;if(i==o.length)return-1;let s=o.coordsAt(i,-1);if(s&&Mj(n,r,s))return-1;let a=o.coordsAt(i,1);return a&&Mj(n,r,a)?1:s&&s.bottom>=r?-1:1}function Tj(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:S7(t,n,e.clientX,e.clientY)}}const C7=ct.ie&&ct.ie_version<=11;let Pj=null,Rj=0,Nj=0;function e_(t){if(!C7)return t.detail;let e=Pj,n=Nj;return Pj=t,Nj=Date.now(),Rj=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Rj+1)%3:1}function O7(t,e){let n=Tj(t,e),r=e_(e),o=t.state.selection;return{update(i){i.docChanged&&(n.pos=i.changes.mapPos(n.pos),o=o.map(i.changes))},get(i,s,a){let l=Tj(t,i),u,d=$j(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!s){let h=$j(t,n.pos,n.bias,r),f=Math.min(h.from,d.from),p=Math.max(h.to,d.to);d=f1&&(u=_7(o,l.pos))?u:a?o.addRange(d):Ae.create([d])}}}function _7(t,e){for(let n=0;n=e)return Ae.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ss.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let o=t.docView.nearest(e.target);if(o&&o.isWidget){let i=o.posAtStart,s=i+o.length;(i>=n.to||s<=n.from)&&(n=Ae.range(i,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Gm(t.state,gy,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};ss.dragend=t=>(t.inputState.draggedContent=null,!1);function Dj(t,e,n,r){if(n=Gm(t.state,my,n),!n)return;let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:i}=t.inputState,s=r&&i&&w7(t,e)?{from:i.from,to:i.to}:null,a={from:o,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}ss.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),o=0,i=()=>{++o==n.length&&Dj(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),i()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Dj(t,e,r,!0),!0}return!1};ss.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=XO?null:e.clipboardData;return n?(ZO(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(k7(t),!1)};function E7(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function A7(t){let e=[],n=[],r=!1;for(let o of t.selection.ranges)o.empty||(e.push(t.sliceDoc(o.from,o.to)),n.push(o));if(!e.length){let o=-1;for(let{from:i}of t.selection.ranges){let s=t.doc.lineAt(i);s.number>o&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),o=s.number}r=!0}return{text:Gm(t,gy,e.join(t.lineBreak)),ranges:n,linewise:r}}let F0=null;ss.copy=ss.cut=(t,e)=>{let{text:n,ranges:r,linewise:o}=A7(t.state);if(!n&&!o)return!1;F0=o?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=XO?null:e.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(E7(t,n),!1)};const t_=Xa.define();function n_(t,e){let n=[];for(let r of t.facet(zO)){let o=r(t,e);o&&n.push(o)}return n?t.update({effects:n,annotations:t_.of(!0)}):null}function r_(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=n_(t.state,e);n?t.dispatch(n):t.update([])}},10)}Oi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),r_(t)};Oi.blur=t=>{t.observer.clearSelectionRange(),r_(t)};Oi.compositionstart=Oi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Oi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,ct.chrome&&ct.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Oi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ss.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let i=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=e.getTargetRanges();if(i&&s.length){let a=s[0],l=t.posAtDOM(a.startContainer,a.startOffset),u=t.posAtDOM(a.endContainer,a.endOffset);return wy(t,{from:l,to:u,insert:t.state.toText(i)},null),!0}}let o;if(ct.chrome&&ct.android&&(o=QO.find(i=>i.inputType==e.inputType))&&(t.observer.delayAndroidKey(o.key,o.keyCode),o.key=="Backspace"||o.key=="Delete")){let i=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>i+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return ct.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),ct.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Oi.compositionend(t,e),20),!1};const Ij=new Set;function $7(t){Ij.has(t)||(Ij.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const zj=["pre-wrap","normal","pre-line","break-spaces"];let ou=!1;function Lj(){ou=!1}class M7{constructor(e){this.lineWrapping=e,this.doc=Zn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return zj.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=o,this.lineLength=i,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Zf&&(ou=!0),this.height=e)}replace(e,n,r){return Uo.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,o){let i=this,s=r.doc;for(let a=o.length-1;a>=0;a--){let{fromA:l,toA:u,fromB:d,toB:h}=o[a],f=i.lineAt(l,jr.ByPosNoHeight,r.setDoc(n),0,0),p=f.to>=u?f:i.lineAt(u,jr.ByPosNoHeight,r,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=o[a-1].toA;)l=o[a-1].fromA,d=o[a-1].fromB,a--,li*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,o-=a.size}else if(i>o*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,i-=a.size}else break;else if(o=i&&s(this.blockAt(0,r,o,i))}updateHeight(e,n=0,r=!1,o){return o&&o.from<=n&&o.more&&this.setHeight(o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class oi extends o_{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,o){return new bs(o,this.length,r,this.height,this.breaks)}replace(e,n,r){let o=r[0];return r.length==1&&(o instanceof oi||o instanceof go&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof go?o=new oi(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):Uo.of(r)}updateHeight(e,n=0,r=!1,o){return o&&o.from<=n&&o.more?this.setHeight(o.heights[o.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class go extends Uo{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,o=e.doc.lineAt(n+this.length).number,i=o-r+1,s,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*i);s=l/i,this.length>i+1&&(a=(this.height-l)/(this.length-i-1))}else s=this.height/i;return{firstLine:r,lastLine:o,perLine:s,perChar:a}}blockAt(e,n,r,o){let{firstLine:i,lastLine:s,perLine:a,perChar:l}=this.heightMetrics(n,o);if(n.lineWrapping){let u=o+(e0){let i=r[r.length-1];i instanceof go?r[r.length-1]=new go(i.length+o):r.push(null,new go(o-1))}if(e>0){let i=r[0];i instanceof go?r[0]=new go(e+i.length):r.unshift(new go(e-1),null)}return Uo.of(r)}decomposeLeft(e,n){n.push(new go(e-1),null)}decomposeRight(e,n){n.push(null,new go(this.length-e-1))}updateHeight(e,n=0,r=!1,o){let i=n+this.length;if(o&&o.from<=n+this.length&&o.more){let s=[],a=Math.max(n,o.from),l=-1;for(o.from>n&&s.push(new go(o.from-n-1).updateHeight(e,n));a<=i&&o.more;){let d=e.doc.lineAt(a).length;s.length&&s.push(null);let h=o.heights[o.index++];l==-1?l=h:Math.abs(h-l)>=Zf&&(l=-2);let f=new oi(d,h);f.outdated=!1,s.push(f),a+=d+1}a<=i&&s.push(null,new go(i-a).updateHeight(e,a));let u=Uo.of(s);return(l<0||Math.abs(u.height-this.height)>=Zf||Math.abs(l-this.heightMetrics(e,n).perLine)>=Zf)&&(ou=!0),Np(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class P7 extends Uo{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,o){let i=r+this.left.height;return ea))return u;let d=n==jr.ByPosNoHeight?jr.ByPosNoHeight:jr.ByPos;return l?u.join(this.right.lineAt(a,d,r,s,a)):this.left.lineAt(a,d,r,o,i).join(u)}forEachLine(e,n,r,o,i,s){let a=o+this.left.height,l=i+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,a,l,s);else{let u=this.lineAt(l,jr.ByPos,r,o,i);e=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,a,l,s)}}replace(e,n,r){let o=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-o,n-o,r));let i=[];e>0&&this.decomposeLeft(e,i);let s=i.length;for(let a of r)i.push(a);if(e>0&&Bj(i,s-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,o=r+this.break;if(e>=o)return this.right.decomposeRight(e-o,n);e2*n.size||n.size>2*e.size?Uo.of(this.break?[e,null,n]:[e,n]):(this.left=Np(this.left,e),this.right=Np(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,o){let{left:i,right:s}=this,a=n+i.length+this.break,l=null;return o&&o.from<=n+i.length&&o.more?l=i=i.updateHeight(e,n,r,o):i.updateHeight(e,n,r),o&&o.from<=a+s.length&&o.more?l=s=s.updateHeight(e,a,r,o):s.updateHeight(e,a,r),l?this.balanced(i,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Bj(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof go&&(r=t[e+1])instanceof go&&t.splice(e-1,3,new go(n.length+1+r.length))}const R7=5;class xy{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof oi?o.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new oi(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=R7)&&this.addLineDeco(o,i,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new oi(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new go(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof oi)return e;let n=new oi(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let o=this.ensureLine();o.length+=r,o.collapsed+=r,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof oi)&&!this.isCovered?this.nodes.push(new oi(0,-1)):(this.writtenTod.clientHeight||d.scrollWidth>d.clientWidth)&&h.overflow!="visible"){let f=d.getBoundingClientRect();i=Math.max(i,f.left),s=Math.min(s,f.right),a=Math.max(a,f.top),l=Math.min(u==t.parentNode?o.innerHeight:l,f.bottom)}u=h.position=="absolute"||h.position=="fixed"?d.offsetParent:d.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:i-n.left,right:Math.max(i,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function z7(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Zg{constructor(e,n,r,o){this.from=e,this.to=n,this.size=r,this.displaySize=o}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new M7(n),this.stateDeco=e.facet(Pd).filter(r=>typeof r!="function"),this.heightMap=Uo.empty().applyChanges(this.stateDeco,Zn.empty,this.heightOracle.setDoc(e.doc),[new ki(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Lt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let o=r?n.head:n.anchor;if(!e.some(({from:i,to:s})=>o>=i&&o<=s)){let{from:i,to:s}=this.lineBlockAt(o);e.push(new cf(i,s))}}return this.viewports=e.sort((r,o)=>r.from-o.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?qj:new jy(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(td(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Pd).filter(d=>typeof d!="function");let o=e.changedRanges,i=ki.extendWithRanges(o,N7(r,this.stateDeco,e?e.changes:eo.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Lj(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=s||ou)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(BO)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),o=this.heightOracle,i=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Sr.RTL:Sr.LTR;let s=this.heightOracle.mustRefreshForWrapping(i),a=n.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let u=0,d=0;if(a.width&&a.height){let{scaleX:S,scaleY:w}=fO(n,a);(S>.005&&Math.abs(this.scaleX-S)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=S,this.scaleY=w,u|=8,s=l=!0)}let h=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=gO(e.scrollDOM);let m=(this.printing?z7:I7)(n,this.paddingTop),b=m.top-this.pixelViewport.top,v=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let y=a.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(S)&&(s=!0),s||o.lineWrapping&&Math.abs(y-this.contentDOMWidth)>o.charWidth){let{lineHeight:w,charWidth:_,textHeight:A}=e.docView.measureTextSize();s=w>0&&o.refresh(i,w,_,A,y/_,S),s&&(e.docView.minWidth=0,u|=8)}b>0&&v>0?d=Math.max(b,v):b<0&&v<0&&(d=Math.min(b,v)),Lj();for(let w of this.viewports){let _=w.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(w);this.heightMap=(s?Uo.empty().applyChanges(this.stateDeco,Zn.empty,this.heightOracle,[new ki(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,s,new T7(w.from,_))}ou&&(u|=2)}let k=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return k&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),u|=this.updateForViewport()),(u&2||k)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,i=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,l=new cf(o.lineAt(s-r*1e3,jr.ByHeight,i,0,0).from,o.lineAt(a+(1-r)*1e3,jr.ByHeight,i,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=o.lineAt(u,jr.ByPos,i,0,0),f;n.y=="center"?f=(h.top+h.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&u=a+Math.max(10,Math.min(r,250)))&&o>s-2*1e3&&i>1,s=o<<1;if(this.defaultTextDirection!=Sr.LTR&&!r)return[];let a=[],l=(d,h,f,p)=>{if(h-dd&&gg.from>=f.from&&g.to<=f.to&&Math.abs(g.from-d)g.fromy));if(!v){if(hk.from<=h&&k.to>=h)){let k=n.moveToLineBoundary(Ae.cursor(h),!1,!0).head;k>d&&(h=k)}let g=this.gapSize(f,d,h,p),y=r||g<2e6?g:2e6;v=new Zg(d,h,g,y)}a.push(v)},u=d=>{if(d.length2e6)for(let _ of e)_.from>=d.from&&_.fromd.from&&l(d.from,p,d,h),mn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Dn.spans(e,this.viewport.from,this.viewport.to,{span(o,i){n.push({from:o,to:i})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((o,i)=>o.from!=n[i].from||o.to!=n[i].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||td(this.heightMap.lineAt(e,jr.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||td(this.heightMap.lineAt(this.scaler.fromDOM(e),jr.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return td(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class cf{constructor(e,n){this.from=e,this.to=n}}function B7(t,e,n){let r=[],o=t,i=0;return Dn.spans(n,t,e,{span(){},point(s,a){s>o&&(r.push({from:o,to:s}),i+=s-o),o=a}},20),o=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let o=0;;o++){let{from:i,to:s}=e[o],a=s-i;if(r<=a)return i+r;r-=a}}function df(t,e){let n=0;for(let{from:r,to:o}of t.ranges){if(e<=o){n+=e-r;break}n+=o-r}return n/t.total}function F7(t,e){for(let n of t)if(e(n))return n}const qj={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class jy{constructor(e,n,r){let o=0,i=0,s=0;this.viewports=r.map(({from:a,to:l})=>{let u=n.lineAt(a,jr.ByPos,e,0,0).top,d=n.lineAt(l,jr.ByPos,e,0,0).bottom;return o+=d-u,{from:a,to:l,top:u,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(n.height-o);for(let a of this.viewports)a.domTop=s+(a.top-i)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),i=a.bottom}toDOM(e){for(let n=0,r=0,o=0;;n++){let i=nn.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function td(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new bs(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(o=>td(o,e)):t._content)}const hf=at.define({combine:t=>t.join(" ")}),q0=at.define({combine:t=>t.indexOf(!0)>-1}),U0=Va.newName(),i_=Va.newName(),s_=Va.newName(),a_={"&light":"."+i_,"&dark":"."+s_};function V0(t,e,n){return new Va(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,o=>{if(o=="&")return t;if(!n||!n[o])throw new RangeError(`Unsupported selector: ${o}`);return n[o]}):t+" "+r}})}const q7=V0("."+U0,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},a_),U7={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},ev=ct.ie&&ct.ie_version<=11;class V7{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new EL,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(ct.ie&&ct.ie_version<=11||ct.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(ct.chrome&&ct.chrome_version<126)&&(this.editContext=new W7(e),e.state.facet(ja)&&(e.contentDOM.editContext=this.editContext.editContext)),ev&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,o=this.selectionRange;if(r.state.facet(ja)?r.root.activeElement!=this.dom:!Yf(this.dom,o))return;let i=o.anchorNode&&r.docView.nearest(o.anchorNode);if(i&&i.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(ct.ie&&ct.ie_version<=11||ct.android&&ct.chrome)&&!r.state.selection.main.empty&&o.focusNode&&vd(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Md(e.root);if(!n)return!1;let r=ct.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&H7(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let o=Yf(this.dom,r);return o&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&Ic(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,o=!1;for(let i of e){let s=this.readMutation(i);s&&(s.typeOver&&(o=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:o}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),o=this.selectionChanged&&Yf(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new c7(this.view,e,n,r);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,o=GO(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),o}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=Uj(n,e.previousSibling||e.target.previousSibling,-1),o=Uj(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:o?n.posBefore(o):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ja)!=e.state.facet(ja)&&(e.view.contentDOM.editContext=e.state.facet(ja)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let o of this.scrollTargets)o.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Uj(t,e,n){for(;e;){let r=hr.get(e);if(r&&r.parent==t)return r;let o=e.parentNode;e=o!=t.dom?o:n>0?e.nextSibling:e.previousSibling}return null}function Vj(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return vd(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function H7(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Vj(t,o)}let n=null;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?Vj(t,n):null}class W7{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:o}=e.state.selection.main,i=this.toEditorPos(r.updateRangeStart),s=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:i,drifted:!1});let a={from:i,to:s,insert:Zn.of(r.text.split(` +`))};a.from==this.from&&othis.to&&(a.to=o),!(a.from==a.to&&!a.insert.length)&&(this.pendingContextChange=a,e.state.readOnly||wy(e,a,Ae.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let o=[],i=null;for(let s=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);s{let o=[];for(let i of r.getTextFormats()){let s=i.underlineStyle,a=i.underlineThickness;if(s!="None"&&a!="None"){let l=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;o.push(Lt.mark({attributes:{style:l}}).range(this.toEditorPos(i.rangeStart),this.toEditorPos(i.rangeEnd)))}}e.dispatch({effects:qO.of(Lt.set(o))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let o=Md(r.root);o&&o.rangeCount&&this.editContext.updateSelectionBounds(o.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,o=this.pendingContextChange;return e.changes.iterChanges((i,s,a,l,u)=>{if(r)return;let d=u.length-(s-i);if(o&&s>=o.to)if(o.from==i&&o.to==s&&o.insert.eq(u)){o=this.pendingContextChange=null,n+=d,this.to+=d;return}else o=null,this.revertPending(e.state);if(i+=n,s+=n,s<=this.from)this.from+=d,this.to+=d;else if(ithis.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(s),u.toString()),this.to+=d}n+=d}),o&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),o=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=o)&&this.editContext.updateSelection(r,o)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e){let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class nt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(o=>o.forEach(i=>r(i,this)))||(o=>this.update(o)),this.dispatch=this.dispatch.bind(this),this._root=e.root||AL(e.parent)||document,this.viewState=new Fj(e.state||Mn.create(e)),e.scrollTo&&e.scrollTo.is(sf)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Xu).map(o=>new Qg(o));for(let o of this.plugins)o.update(this);this.observer=new V7(this),this.inputState=new p7(this),this.inputState.ensureHandlers(this.plugins),this.docView=new jj(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Mo?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,o,i=this.state;for(let f of e){if(f.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=f.state}if(this.destroyed){this.viewState.state=i;return}let s=this.hasFocus,a=0,l=null;e.some(f=>f.annotation(t_))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,l=n_(i,s),l||(a=1));let u=this.observer.delayedAndroidKey,d=null;if(u?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(d=null)):this.observer.clear(),i.facet(Mn.phrases)!=this.state.facet(Mn.phrases))return this.setState(i);o=Rp.create(this,i,e),o.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:p}=f.state.selection;h=new zc(p.empty?p:Ae.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of f.effects)p.is(sf)&&(h=p.value.clip(this.state))}this.viewState.update(o,h),this.bidiCache=Dp.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),n=this.docView.update(o),this.state.facet(Zu)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(hf)!=o.state.facet(hf)&&(this.viewState.mustMeasureContent=!0),(n||r||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!o.empty)for(let f of this.state.facet(z0))try{f(o)}catch(p){Fo(this.state,p,"update listener")}(l||d)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),d&&!GO(this,d)&&u.force&&Ic(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Fj(e),this.plugins=e.facet(Xu).map(r=>new Qg(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new jj(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Xu),r=e.state.facet(Xu);if(n!=r){let o=[];for(let i of r){let s=n.indexOf(i);if(s<0)o.push(new Qg(i));else{let a=this.plugins[s];a.mustUpdate=e,o.push(a)}}for(let i of this.plugins)i.mustUpdate!=e&&i.destroy(this);this.plugins=o,this.pluginMap.clear()}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,o=r.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:s}=this.viewState;Math.abs(o-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(gO(r))i=-1,s=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(o);i=p.from,s=p.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let d=u.map(p=>{try{return p.read(this)}catch(m){return Fo(this.state,m),Hj}}),h=Rp.create(this,this.state,[]),f=!1;h.flags|=l,n?n.flags|=l:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h),f&&this.docViewUpdate());for(let p=0;p1||m<-1){o=o+m,r.scrollTop=o/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(z0))a(n)}get themeClasses(){return U0+" "+(this.state.facet(q0)?s_:i_)+" "+this.state.facet(hf)}updateAttrs(){let e=Wj(this,UO,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(ja)?"true":"false",class:"cm-content",style:`${ct.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Wj(this,vy,n);let r=this.observer.ignore(()=>{let o=T0(this.contentDOM,this.contentAttrs,n),i=T0(this.dom,this.editorAttrs,e);return o||i});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let o of r.effects)if(o.is(nt.announce)){n&&(this.announceDOM.textContent=""),n=!1;let i=this.announceDOM.appendChild(document.createElement("div"));i.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Zu);let e=this.state.facet(nt.cspNonce);Va.mount(this.root,this.styleModules.concat(q7).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return Xg(this,e,_j(this,e,n,r))}moveByGroup(e,n){return Xg(this,e,_j(this,e,n,r=>i7(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),o=this.textDirectionAt(e.from),i=r[n?r.length-1:0];return Ae.cursor(i.side(n,o)+e.from,i.forward(!n,o)?1:-1)}moveToLineBoundary(e,n,r=!0){return o7(this,e,n,r)}moveVertically(e,n,r){return Xg(this,e,s7(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),JO(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let o=this.state.doc.lineAt(e),i=this.bidiSpans(o),s=i[Ea.find(i,e-o.from,-1,n)];return Km(r,s.dir==Sr.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(LO)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>K7)return MO(e.length);let n=this.textDirectionAt(e.from),r;for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n&&(i.fresh||$O(i.isolates,r=xj(this,e))))return i.order;r||(r=xj(this,e));let o=qL(e.text,n,r);return this.bidiCache.push(new Dp(e.from,e.to,n,r,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ct.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{pO(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return sf.of(new zc(typeof e=="number"?Ae.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return sf.of(new zc(Ae.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ir.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ir.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Va.newName(),o=[hf.of(r),Zu.of(V0(`.${r}`,e))];return n&&n.dark&&o.push(q0.of(!0)),o}static baseTheme(e){return Gl.lowest(Zu.of(V0("."+U0,e,a_)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),o=r&&hr.get(r)||hr.get(e);return((n=o==null?void 0:o.rootView)===null||n===void 0?void 0:n.view)||null}}nt.styleModule=Zu;nt.inputHandler=IO;nt.clipboardInputFilter=my;nt.clipboardOutputFilter=gy;nt.scrollHandler=FO;nt.focusChangeEffect=zO;nt.perLineTextDirection=LO;nt.exceptionSink=DO;nt.updateListener=z0;nt.editable=ja;nt.mouseSelectionStyle=NO;nt.dragMovesSelection=RO;nt.clickAddsSelectionRange=PO;nt.decorations=Pd;nt.outerDecorations=VO;nt.atomicRanges=by;nt.bidiIsolatedRanges=HO;nt.scrollMargins=WO;nt.darkTheme=q0;nt.cspNonce=at.define({combine:t=>t.length?t[0]:""});nt.contentAttributes=vy;nt.editorAttributes=UO;nt.lineWrapping=nt.contentAttributes.of({class:"cm-lineWrapping"});nt.announce=bn.define();const K7=4096,Hj={};class Dp{constructor(e,n,r,o,i,s){this.from=e,this.to=n,this.dir=r,this.isolates=o,this.fresh=i,this.order=s}static update(e,n){if(n.empty&&!e.some(i=>i.fresh))return e;let r=[],o=e.length?e[e.length-1].dir:Sr.LTR;for(let i=Math.max(0,e.length-10);i=0;o--){let i=r[o],s=typeof i=="function"?i(t):i;s&&M0(s,n)}return n}const J7=ct.mac?"mac":ct.windows?"win":ct.linux?"linux":"key";function G7(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let o,i,s,a;for(let l=0;lr.concat(o),[]))),n}function Y7(t,e,n){return c_(l_(t.state),e,t,n)}let ka=null;const X7=4e3;function Z7(t,e=J7){let n=Object.create(null),r=Object.create(null),o=(s,a)=>{let l=r[s];if(l==null)r[s]=a;else if(l!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},i=(s,a,l,u,d)=>{var h,f;let p=n[s]||(n[s]=Object.create(null)),m=a.split(/ (?!$)/).map(g=>G7(g,e));for(let g=1;g{let S=ka={view:k,prefix:y,scope:s};return setTimeout(()=>{ka==S&&(ka=null)},X7),!0}]})}let b=m.join(" ");o(b,!1);let v=p[b]||(p[b]={preventDefault:!1,stopPropagation:!1,run:((f=(h=p._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});l&&v.run.push(l),u&&(v.preventDefault=!0),d&&(v.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of a){let d=n[u]||(n[u]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:h}=s;for(let f in d)d[f].run.push(p=>h(p,H0))}let l=s[e]||s.key;if(l)for(let u of a)i(u,l,s.run,s.preventDefault,s.stopPropagation),s.shift&&i(u,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}let H0=null;function c_(t,e,n,r){H0=e;let o=SL(e),i=bo(o,0),s=bi(i)==o.length&&o!=" ",a="",l=!1,u=!1,d=!1;ka&&ka.view==n&&ka.scope==r&&(a=ka.prefix+" ",YO.indexOf(e.keyCode)<0&&(u=!0,ka=null));let h=new Set,f=v=>{if(v){for(let g of v.run)if(!h.has(g)&&(h.add(g),g(n)))return v.stopPropagation&&(d=!0),!0;v.preventDefault&&(v.stopPropagation&&(d=!0),u=!0)}return!1},p=t[r],m,b;return p&&(f(p[a+ff(o,e,!s)])?l=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(ct.windows&&e.ctrlKey&&e.altKey)&&(m=Ha[e.keyCode])&&m!=o?(f(p[a+ff(m,e,!0)])||e.shiftKey&&(b=$d[e.keyCode])!=o&&b!=m&&f(p[a+ff(b,e,!1)]))&&(l=!0):s&&e.shiftKey&&f(p[a+ff(o,e,!0)])&&(l=!0),!l&&f(p._any)&&(l=!0)),u&&(l=!0),l&&d&&e.stopPropagation(),H0=null,l}class bh{constructor(e,n,r,o,i){this.className=e,this.left=n,this.top=r,this.width=o,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let o=e.coordsAtPos(r.head,r.assoc||1);if(!o)return[];let i=u_(e);return[new bh(n,o.left-i.left,o.top-i.top,null,o.bottom-o.top)]}else return eB(e,n,r)}}function u_(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Sr.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Jj(t,e,n,r){let o=t.coordsAtPos(e,n*2);if(!o)return r;let i=t.dom.getBoundingClientRect(),s=(o.top+o.bottom)/2,a=t.posAtCoords({x:i.left+1,y:s}),l=t.posAtCoords({x:i.right-1,y:s});return a==null||l==null?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}function eB(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),o=Math.min(n.to,t.viewport.to),i=t.textDirection==Sr.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=u_(t),u=s.querySelector(".cm-line"),d=u&&window.getComputedStyle(u),h=a.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),f=a.right-(d?parseInt(d.paddingRight):0),p=B0(t,r),m=B0(t,o),b=p.type==qo.Text?p:null,v=m.type==qo.Text?m:null;if(b&&(t.lineWrapping||p.widgetLineBreaks)&&(b=Jj(t,r,1,b)),v&&(t.lineWrapping||m.widgetLineBreaks)&&(v=Jj(t,o,-1,v)),b&&v&&b.from==v.from&&b.to==v.to)return y(k(n.from,n.to,b));{let w=b?k(n.from,null,b):S(p,!1),_=v?k(null,n.to,v):S(m,!0),A=[];return(b||p).to<(v||m).from-(b&&v?1:0)||p.widgetLineBreaks>1&&w.bottom+t.defaultLineHeight/2<_.top?A.push(g(h,w.bottom,f,_.top)):w.bottom<_.top&&t.elementAtHeight((w.bottom+_.top)/2).type==qo.Text&&(w.bottom=_.top=(w.bottom+_.top)/2),y(w).concat(A).concat(y(_))}function g(w,_,A,D){return new bh(e,w-l.left,_-l.top-.01,A-w,D-_+.01)}function y({top:w,bottom:_,horizontal:A}){let D=[];for(let E=0;EF&&pe.from=Z)break;J>re&&G(Math.max(fe,re),w==null&&fe<=F,Math.min(J,Z),_==null&&J>=se,be.dir)}if(re=he.to+1,re>=Z)break}return z.length==0&&G(F,w==null,se,_==null,t.textDirection),{top:D,bottom:E,horizontal:z}}function S(w,_){let A=a.top+(_?w.top:w.bottom);return{top:A,bottom:A,horizontal:[]}}}function tB(t,e){return t.constructor==e.constructor&&t.eq(e)}class nB{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(ep)!=e.state.facet(ep)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(ep);for(;n!tB(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let o of e)o.update&&n&&o.constructor&&this.drawn[r].constructor&&o.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(o.draw(),n);for(;n;){let o=n.nextSibling;n.remove(),n=o}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ep=at.define();function d_(t){return[Ir.define(e=>new nB(e,t)),ep.of(t)]}const h_=!ct.ios,Rd=at.define({combine(t){return ls(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function rB(t={}){return[Rd.of(t),oB,iB,sB,BO.of(!0)]}function f_(t){return t.startState.facet(Rd)!=t.state.facet(Rd)}const oB=d_({above:!0,markers(t){let{state:e}=t,n=e.facet(Rd),r=[];for(let o of e.selection.ranges){let i=o==e.selection.main;if(o.empty?!i||h_:n.drawRangeCursor){let s=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=o.empty?o:Ae.cursor(o.head,o.head>o.anchor?-1:1);for(let l of bh.forRange(t,s,a))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=f_(t);return n&&Gj(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Gj(e.state,t)},class:"cm-cursorLayer"});function Gj(t,e){e.style.animationDuration=t.facet(Rd).cursorBlinkRate+"ms"}const iB=d_({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:bh.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||f_(t)},class:"cm-selectionLayer"}),W0={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};h_&&(W0[".cm-line"].caretColor=W0[".cm-content"].caretColor="transparent !important");const sB=Gl.highest(nt.theme(W0)),p_=bn.define({map(t,e){return t==null?null:e.mapPos(t)}}),nd=po.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(p_)?r.value:n,t)}}),aB=Ir.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(nd);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(nd)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(nd),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(nd)!=t&&this.view.dispatch({effects:p_.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function lB(){return[nd,aB]}function Qj(t,e,n,r,o){e.lastIndex=0;for(let i=t.iterRange(n,r),s=n,a;!i.next().done;s+=i.value.length)if(!i.lineBreak)for(;a=e.exec(i.value);)o(s+a.index,a)}function cB(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:o,to:i}of n)o=Math.max(t.state.doc.lineAt(o).from,o-e),i=Math.min(t.state.doc.lineAt(i).to,i+e),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});return r}class uB{constructor(e){const{regexp:n,decoration:r,decorate:o,boundary:i,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,o)this.addMatch=(a,l,u,d)=>o(d,u,u+a[0].length,a,l);else if(typeof r=="function")this.addMatch=(a,l,u,d)=>{let h=r(a,l,u);h&&d(u,u+a[0].length,h)};else if(r)this.addMatch=(a,l,u,d)=>d(u,u+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=i,this.maxLength=s}createDeco(e){let n=new os,r=n.add.bind(n);for(let{from:o,to:i}of cB(e,this.maxLength))Qj(e.state.doc,this.regexp,o,i,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((i,s,a,l)=>{l>e.view.viewport.from&&a1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,n.map(e.changes),r,o):n}updateRange(e,n,r,o){for(let i of e.visibleRanges){let s=Math.max(i.from,r),a=Math.min(i.to,o);if(a>s){let l=e.state.doc.lineAt(s),u=l.tol.from;s--)if(this.boundary.test(l.text[s-1-l.from])){d=s;break}for(;af.push(g.range(b,v));if(l==u)for(this.regexp.lastIndex=d-l.from;(p=this.regexp.exec(l.text))&&p.indexthis.addMatch(v,e,b,m));n=n.update({filterFrom:d,filterTo:h,filter:(b,v)=>bh,add:f})}}return n}}const K0=/x/.unicode!=null?"gu":"g",dB=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,K0),hB={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let tv=null;function fB(){var t;if(tv==null&&typeof document<"u"&&document.body){let e=document.body.style;tv=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return tv||!1}const tp=at.define({combine(t){let e=ls(t,{render:null,specialChars:dB,addSpecialChars:null});return(e.replaceTabs=!fB())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,K0)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,K0)),e}});function pB(t={}){return[tp.of(t),mB()]}let Yj=null;function mB(){return Yj||(Yj=Ir.fromClass(class{constructor(t){this.view=t,this.decorations=Lt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(tp)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new uB({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:o}=n.state,i=bo(e[0],0);if(i==9){let s=o.lineAt(r),a=n.state.tabSize,l=ju(s.text,a,r-s.from);return Lt.replace({widget:new yB((a-l%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=Lt.replace({widget:new bB(t,i)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(tp);t.startState.facet(tp)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const gB="•";function vB(t){return t>=32?gB:t==10?"␤":String.fromCharCode(9216+t)}class bB extends Za{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=vB(this.code),r=e.state.phrase("Control character")+" "+(hB[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,r,n);if(o)return o;let i=document.createElement("span");return i.textContent=n,i.title=r,i.setAttribute("aria-label",r),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class yB extends Za{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function wB(){return jB}const xB=Lt.line({class:"cm-activeLine"}),jB=Ir.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let o=t.lineBlockAt(r.head);o.from>e&&(n.push(xB.range(o.from)),e=o.from)}return Lt.set(n)}},{decorations:t=>t.decorations}),J0=2e3;function kB(t,e,n){let r=Math.min(e.line,n.line),o=Math.max(e.line,n.line),i=[];if(e.off>J0||n.off>J0||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let l=r;l<=o;l++){let u=t.doc.line(l);u.length<=a&&i.push(Ae.range(u.from+s,u.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let l=r;l<=o;l++){let u=t.doc.line(l),d=S0(u.text,s,t.tabSize,!0);if(d<0)i.push(Ae.cursor(u.to));else{let h=S0(u.text,a,t.tabSize);i.push(Ae.range(u.from+d,u.from+h))}}}return i}function SB(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Xj(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),o=n-r.from,i=o>J0?-1:o==r.length?SB(t,e.clientX):ju(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}function CB(t,e){let n=Xj(t,e),r=t.state.selection;return n?{update(o){if(o.docChanged){let i=o.changes.mapPos(o.startState.doc.line(n.line).from),s=o.state.doc.lineAt(i);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(o.changes)}},get(o,i,s){let a=Xj(t,o);if(!a)return r;let l=kB(t.state,n,a);return l.length?s?Ae.create(l.concat(r.ranges)):Ae.create(l):r}}:null}function OB(t){let e=n=>n.altKey&&n.button==0;return nt.mouseSelectionStyle.of((n,r)=>e(r)?CB(n,r):null)}const _B={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},EB={style:"cursor: crosshair"};function AB(t={}){let[e,n]=_B[t.key||"Alt"],r=Ir.fromClass(class{constructor(o){this.view=o,this.isDown=!1}set(o){this.isDown!=o&&(this.isDown=o,this.view.update([]))}},{eventObservers:{keydown(o){this.set(o.keyCode==e||n(o))},keyup(o){(o.keyCode==e||!n(o))&&this.set(!1)},mousemove(o){this.set(n(o))}}});return[r,nt.contentAttributes.of(o=>{var i;return!((i=o.plugin(r))===null||i===void 0)&&i.isDown?EB:null})]}const Fu="-10000px";class m_{constructor(e,n,r,o){this.facet=n,this.createTooltipView=r,this.removeTooltipView=o,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let i=null;this.tooltipViews=this.tooltips.map(s=>i=r(s,i))}update(e,n){var r;let o=e.state.facet(this.facet),i=o.filter(l=>l);if(o===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let s=[],a=n?[]:null;for(let l=0;ln[u]=l),n.length=a.length),this.input=o,this.tooltips=i,this.tooltipViews=s,!0}}function $B(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const nv=at.define({combine:t=>{var e,n,r;return{position:ct.ios?"absolute":((e=t.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(o=>o.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(o=>o.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||$B}}}),Zj=new WeakMap,ky=Ir.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(nv);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new m_(t,Qm,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(nv);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let o=document.createElement("div");o.className="cm-tooltip-arrow",n.dom.appendChild(o)}return n.dom.style.position=this.position,n.dom.style.top=Fu,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(ct.gecko)n=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Fu&&i.style.left=="0px"){let s=i.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(t=i.width/this.parent.offsetWidth,e=i.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),o=yy(this.view);return{visible:{left:r.left+o.left,top:r.top+o.top,right:r.right-o.right,bottom:r.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((i,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(nv).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:o,scaleY:i}=t,s=[];for(let a=0;a=Math.min(n.bottom,r.bottom)||h.rightMath.min(n.right,r.right)+.1)){d.style.top=Fu;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,b=f.right-f.left,v=(e=Zj.get(u))!==null&&e!==void 0?e:f.bottom-f.top,g=u.offset||TB,y=this.view.textDirection==Sr.LTR,k=f.width>r.right-r.left?y?r.left:r.right-f.width:y?Math.max(r.left,Math.min(h.left-(p?14:0)+g.x,r.right-b)):Math.min(Math.max(r.left,h.left-b+(p?14:0)-g.x),r.right-b),S=this.above[a];!l.strictSide&&(S?h.top-v-m-g.yr.bottom)&&S==r.bottom-h.bottom>h.top-r.top&&(S=this.above[a]=!S);let w=(S?h.top-r.top:r.bottom-h.bottom)-m;if(wk&&D.top<_+v&&D.bottom>_&&(_=S?D.top-v-2-m:D.bottom+m+2);if(this.position=="absolute"?(d.style.top=(_-t.parent.top)/i+"px",d.style.left=(k-t.parent.left)/o+"px"):(d.style.top=_/i+"px",d.style.left=k/o+"px"),p){let D=h.left+(y?g.x:-g.x)-(k+14-7);p.style.left=D/o+"px"}u.overlap!==!0&&s.push({left:k,top:_,right:A,bottom:_+v}),d.classList.toggle("cm-tooltip-above",S),d.classList.toggle("cm-tooltip-below",!S),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Fu}},{eventObservers:{scroll(){this.maybeMeasure()}}}),MB=nt.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),TB={x:0,y:0},Qm=at.define({enables:[ky,MB]}),zp=at.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Ym{static create(e){return new Ym(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new m_(e,zp,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let o=r[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const PB=Qm.compute([zp],t=>{let e=t.facet(zp);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Ym.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class RB{constructor(e,n,r,o,i){this.view=e,this.source=n,this.field=r,this.setHover=o,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(o)).find(d=>d.from<=o&&d.to>=o),u=l&&l.dir==Sr.RTL?-1:1;i=n.x{this.pending==a&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Fo(e.state,l,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(ky),n=e?e.manager.tooltips.findIndex(r=>r.create==Ym.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:o,tooltip:i}=this;if(o.length&&i&&!NB(i.dom,e)||this.pending){let{pos:s}=o[0]||this.pending,a=(r=(n=o[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!DB(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const pf=4;function NB(t,e){let{left:n,right:r,top:o,bottom:i}=t.getBoundingClientRect(),s;if(s=t.querySelector(".cm-tooltip-arrow")){let a=s.getBoundingClientRect();o=Math.min(a.top,o),i=Math.max(a.bottom,i)}return e.clientX>=n-pf&&e.clientX<=r+pf&&e.clientY>=o-pf&&e.clientY<=i+pf}function DB(t,e,n,r,o,i){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.righto||Math.min(s.bottom,a)=e&&l<=n}function IB(t,e={}){let n=bn.define(),r=po.define({create(){return[]},update(o,i){if(o.length&&(e.hideOnChange&&(i.docChanged||i.selection)?o=[]:e.hideOn&&(o=o.filter(s=>!e.hideOn(i,s))),i.docChanged)){let s=[];for(let a of o){let l=i.changes.mapPos(a.pos,-1,Lo.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),a);u.pos=l,u.end!=null&&(u.end=i.changes.mapPos(u.end)),s.push(u)}}o=s}for(let s of i.effects)s.is(n)&&(o=s.value),s.is(zB)&&(o=[]);return o},provide:o=>zp.from(o)});return{active:r,extension:[r,Ir.define(o=>new RB(o,t,r,n,e.hoverTime||300)),PB]}}function g_(t,e){let n=t.plugin(ky);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const zB=bn.define(),e2=at.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Nd(t,e){let n=t.plugin(v_),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const v_=Ir.fromClass(class{constructor(t){this.input=t.state.facet(Dd),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(e2);this.top=new mf(t,!0,e.topContainer),this.bottom=new mf(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(e2);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new mf(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new mf(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Dd);if(n!=this.input){let r=n.filter(l=>l),o=[],i=[],s=[],a=[];for(let l of r){let u=this.specs.indexOf(l),d;u<0?(d=l(t.view),a.push(d)):(d=this.panels[u],d.update&&d.update(t)),o.push(d),(d.top?i:s).push(d)}this.specs=r,this.panels=o,this.top.sync(i),this.bottom.sync(s);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>nt.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class mf{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=t2(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=t2(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function t2(t){let e=t.nextSibling;return t.remove(),e}const Dd=at.define({enables:v_});class Ts extends Nl{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ts.prototype.elementClass="";Ts.prototype.toDOM=void 0;Ts.prototype.mapMode=Lo.TrackBefore;Ts.prototype.startSide=Ts.prototype.endSide=-1;Ts.prototype.point=!0;const np=at.define(),LB=at.define(),BB={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Dn.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},yd=at.define();function b_(t){return[y_(),yd.of(Object.assign(Object.assign({},BB),t))]}const n2=at.define({combine:t=>t.some(e=>e)});function y_(t){return[FB]}const FB=Ir.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(yd).map(e=>new o2(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(n2),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(n2)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Dn.iter(this.view.state.facet(np),this.view.viewport.from),r=[],o=this.gutters.map(i=>new qB(i,this.view.viewport,-this.view.documentPadding.top));for(let i of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(i.type)){let s=!0;for(let a of i.type)if(a.type==qo.Text&&s){G0(n,r,a.from);for(let l of o)l.line(this.view,a,r);s=!1}else if(a.widget)for(let l of o)l.widget(this.view,a)}else if(i.type==qo.Text){G0(n,r,i.from);for(let s of o)s.line(this.view,i,r)}else if(i.widget)for(let s of o)s.widget(this.view,i);for(let i of o)i.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(yd),n=t.state.facet(yd),r=t.docChanged||t.heightChanged||t.viewportChanged||!Dn.eq(t.startState.facet(np),t.state.facet(np),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let o of this.gutters)o.update(t)&&(r=!0);else{r=!0;let o=[];for(let i of n){let s=e.indexOf(i);s<0?o.push(new o2(this.view,i)):(this.gutters[s].update(t),o.push(this.gutters[s]))}for(let i of this.gutters)i.dom.remove(),o.indexOf(i)<0&&i.destroy();for(let i of o)this.dom.appendChild(i.dom);this.gutters=o}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>nt.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==Sr.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function r2(t){return Array.isArray(t)?t:[t]}function G0(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class qB{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Dn.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:o}=this,i=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==o.elements.length){let a=new w_(e,s,i,r);o.elements.push(a),o.dom.appendChild(a.dom)}else o.elements[this.i].update(e,s,i,r);this.height=n.bottom,this.i++}line(e,n,r){let o=[];G0(this.cursor,o,n.from),r.length&&(o=o.concat(r));let i=this.gutter.config.lineMarker(e,n,o);i&&o.unshift(i);let s=this.gutter;o.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,o)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),o=r?[r]:null;for(let i of e.state.facet(LB)){let s=i(e,n.widget,n);s&&(o||(o=[])).push(s)}o&&this.addElement(e,n,o)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class o2{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,o=>{let i=o.target,s;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let l=i.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=o.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,o)&&o.preventDefault()});this.markers=r2(n.markers(e)),n.initialSpacer&&(this.spacer=new w_(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=r2(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let r=e.view.viewport;return!Dn.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class w_{constructor(e,n,r,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,o)}update(e,n,r,o){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),UB(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,n){let r="cm-gutterElement",o=this.dom.firstChild;for(let i=0,s=0;;){let a=s,l=ii(a,l,u)||s(a,l,u):s}return r}})}});class rv extends Ts{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function ov(t,e){return t.state.facet(xc).formatNumber(e,t.state)}const WB=yd.compute([xc],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(VB)},lineMarker(e,n,r){return r.some(o=>o.toDOM)?null:new rv(ov(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let o of e.state.facet(HB)){let i=o(e,n,r);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(xc)!=e.state.facet(xc),initialSpacer(e){return new rv(ov(e,i2(e.state.doc.lines)))},updateSpacer(e,n){let r=ov(n.view,i2(n.view.state.doc.lines));return r==e.number?e:new rv(r)},domEventHandlers:t.facet(xc).domEventHandlers}));function KB(t={}){return[xc.of(t),y_(),WB]}function i2(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let o=t.doc.lineAt(r.head).from;o>n&&(n=o,e.push(JB.range(o)))}return Dn.of(e)});function QB(){return GB}const x_=1024;let YB=0;class iv{constructor(e,n){this.from=e,this.to=n}}class _n{constructor(e={}){this.id=YB++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Zo.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}_n.closedBy=new _n({deserialize:t=>t.split(" ")});_n.openedBy=new _n({deserialize:t=>t.split(" ")});_n.group=new _n({deserialize:t=>t.split(" ")});_n.isolate=new _n({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});_n.contextHash=new _n({perNode:!0});_n.lookAhead=new _n({perNode:!0});_n.mounted=new _n({perNode:!0});class Lp{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[_n.mounted.id]}}const XB=Object.create(null);class Zo{constructor(e,n,r,o=0){this.name=e,this.props=n,this.id=r,this.flags=o}static define(e){let n=e.props&&e.props.length?Object.create(null):XB,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new Zo(e.name||"",n,e.id,r);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(o)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(_n.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let o of r.split(" "))n[o]=e[r];return r=>{for(let o=r.prop(_n.group),i=-1;i<(o?o.length:0);i++){let s=n[i<0?r.name:o[i]];if(s)return s}}}}Zo.none=new Zo("",Object.create(null),0,8);class Sy{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(s|co.IncludeAnonymous);;){let u=!1;if(l.from<=i&&l.to>=o&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:_y(Zo.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,o)=>new no(this.type,n,r,o,this.propValues),e.makeTree||((n,r,o)=>new no(Zo.none,n,r,o)))}static build(e){return nF(e)}}no.empty=new no(Zo.none,[],[],0);class Cy{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Cy(this.buffer,this.index)}}class Ka{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Zo.none}toString(){let e=[];for(let n=0;n0));l=s[l+3]);return a}slice(e,n,r){let o=this.buffer,i=new Uint16Array(n-e),s=0;for(let a=e,l=0;a=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Id(t,e,n,r){for(var o;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?a.length:-1;e!=u;e+=n){let d=a[e],h=l[e]+s.from;if(j_(o,r,h,h+d.length)){if(d instanceof Ka){if(i&co.ExcludeBuffers)continue;let f=d.findChild(0,d.buffer.length,n,r-h,o);if(f>-1)return new Aa(new ZB(s,d,e,h),null,f)}else if(i&co.IncludeAnonymous||!d.type.isAnonymous||Oy(d)){let f;if(!(i&co.IgnoreMounts)&&(f=Lp.get(d))&&!f.overlay)return new Si(f.tree,h,e,s);let p=new Si(d,h,e,s);return i&co.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?d.children.length-1:0,n,r,o)}}}if(i&co.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let o;if(!(r&co.IgnoreOverlays)&&(o=Lp.get(this._tree))&&o.overlay){let i=e-this.from;for(let{from:s,to:a}of o.overlay)if((n>0?s<=i:s=i:a>i))return new Si(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function a2(t,e,n,r){let o=t.cursor(),i=[];if(!o.firstChild())return i;if(n!=null){for(let s=!1;!s;)if(s=o.type.is(n),!o.nextSibling())return i}for(;;){if(r!=null&&o.type.is(r))return i;if(o.type.is(e)&&i.push(o.node),!o.nextSibling())return r==null?i:[]}}function Q0(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class ZB{constructor(e,n,r,o){this.parent=e,this.buffer=n,this.index=r,this.start=o}}class Aa extends k_{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:o}=this.context,i=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.context.start,r);return i<0?null:new Aa(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&co.ExcludeBuffers)return null;let{buffer:o}=this.context,i=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return i<0?null:new Aa(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Aa(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Aa(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,o=this.index+4,i=r.buffer[this.index+3];if(i>o){let s=r.buffer[this.index+1];e.push(r.slice(o,i,s)),n.push(0)}return new no(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function S_(t){if(!t.length)return null;let e=0,n=t[0];for(let i=1;in.from||s.to=e){let a=new Si(s.tree,s.overlay[0].from+i.from,-1,i);(o||(o=[r])).push(Id(a,e,n,!1))}}return o?S_(o):r}class Y0{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Si)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:o}=this.buffer;return this.type=n||o.set.types[o.buffer[e]],this.from=r+o.buffer[e+1],this.to=r+o.buffer[e+2],!0}yield(e){return e?e instanceof Si?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:o}=this.buffer,i=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.buffer.start,r);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&co.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&co.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&co.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let o=r<0?0:this.stack[r]+4;if(this.index!=o)return this.yieldBuf(n.findChild(o,this.index,-1,0,4))}else{let o=n.buffer[this.index+3];if(o<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(o)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:o}=this;if(o){if(e>0){if(this.index-1)for(let i=n+e,s=e<0?-1:r._tree.children.length;i!=s;i+=e){let a=r._tree.children[i];if(this.mode&co.IncludeAnonymous||a instanceof Ka||!a.type.isAnonymous||Oy(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==o){if(o==this.index)return s;n=s,r=i+1;break e}o=this.stack[--i]}for(let o=r;o=0;i--){if(i<0)return Q0(this._tree,e,o);let s=r[n.buffer[this.stack[i]]];if(!s.isAnonymous){if(e[o]&&e[o]!=s.name)return!1;o--}}return!0}}function Oy(t){return t.children.some(e=>e instanceof Ka||!e.type.isAnonymous||Oy(e))}function nF(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:o=x_,reused:i=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new Cy(n,n.length):n,l=r.types,u=0,d=0;function h(w,_,A,D,E,z){let{id:G,start:F,end:se,size:pe}=a,re=d,Z=u;for(;pe<0;)if(a.next(),pe==-1){let I=i[G];A.push(I),D.push(F-w);return}else if(pe==-3){u=G;return}else if(pe==-4){d=G;return}else throw new RangeError(`Unrecognized record size: ${pe}`);let he=l[G],be,fe,J=F-w;if(se-F<=o&&(fe=v(a.pos-_,E))){let I=new Uint16Array(fe.size-fe.skip),Q=a.pos-fe.size,M=I.length;for(;a.pos>Q;)M=g(fe.start,I,M);be=new Ka(I,se-fe.start,r),J=fe.start-w}else{let I=a.pos-pe;a.next();let Q=[],M=[],C=G>=s?G:-1,$=0,oe=se;for(;a.pos>I;)C>=0&&a.id==C&&a.size>=0?(a.end<=oe-o&&(m(Q,M,F,$,a.end,oe,C,re,Z),$=Q.length,oe=a.end),a.next()):z>2500?f(F,I,Q,M):h(F,I,Q,M,C,z+1);if(C>=0&&$>0&&$-1&&$>0){let _e=p(he,Z);be=_y(he,Q,M,0,Q.length,0,se-F,_e,_e)}else be=b(he,Q,M,se-F,re-se,Z)}A.push(be),D.push(J)}function f(w,_,A,D){let E=[],z=0,G=-1;for(;a.pos>_;){let{id:F,start:se,end:pe,size:re}=a;if(re>4)a.next();else{if(G>-1&&se=0;pe-=3)F[re++]=E[pe],F[re++]=E[pe+1]-se,F[re++]=E[pe+2]-se,F[re++]=re;A.push(new Ka(F,E[2]-se,r)),D.push(se-w)}}function p(w,_){return(A,D,E)=>{let z=0,G=A.length-1,F,se;if(G>=0&&(F=A[G])instanceof no){if(!G&&F.type==w&&F.length==E)return F;(se=F.prop(_n.lookAhead))&&(z=D[G]+F.length+se)}return b(w,A,D,E,z,_)}}function m(w,_,A,D,E,z,G,F,se){let pe=[],re=[];for(;w.length>D;)pe.push(w.pop()),re.push(_.pop()+A-E);w.push(b(r.types[G],pe,re,z-E,F-z,se)),_.push(E-A)}function b(w,_,A,D,E,z,G){if(z){let F=[_n.contextHash,z];G=G?[F].concat(G):[F]}if(E>25){let F=[_n.lookAhead,E];G=G?[F].concat(G):[F]}return new no(w,_,A,D,G)}function v(w,_){let A=a.fork(),D=0,E=0,z=0,G=A.end-o,F={size:0,start:0,skip:0};e:for(let se=A.pos-w;A.pos>se;){let pe=A.size;if(A.id==_&&pe>=0){F.size=D,F.start=E,F.skip=z,z+=4,D+=4,A.next();continue}let re=A.pos-pe;if(pe<0||re=s?4:0,he=A.start;for(A.next();A.pos>re;){if(A.size<0)if(A.size==-3)Z+=4;else break e;else A.id>=s&&(Z+=4);A.next()}E=he,D+=pe,z+=Z}return(_<0||D==w)&&(F.size=D,F.start=E,F.skip=z),F.size>4?F:void 0}function g(w,_,A){let{id:D,start:E,end:z,size:G}=a;if(a.next(),G>=0&&D4){let se=a.pos-(G-4);for(;a.pos>se;)A=g(w,_,A)}_[--A]=F,_[--A]=z-w,_[--A]=E-w,_[--A]=D}else G==-3?u=D:G==-4&&(d=D);return A}let y=[],k=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,y,k,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:y.length?k[0]+y[0].length:0;return new no(l[t.topID],y.reverse(),k.reverse(),S)}const l2=new WeakMap;function rp(t,e){if(!t.isAnonymous||e instanceof Ka||e.type!=t)return 1;let n=l2.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof no)){n=1;break}n+=rp(t,r)}l2.set(e,n)}return n}function _y(t,e,n,r,o,i,s,a,l){let u=0;for(let m=r;m=d)break;_+=A}if(k==S+1){if(_>d){let A=m[S];p(A.children,A.positions,0,A.children.length,b[S]+y);continue}h.push(m[S])}else{let A=b[k-1]+m[k-1].length-w;h.push(_y(t,m,b,S,k,w,A,null,l))}f.push(w+y-i)}}return p(e,n,r,o,0),(a||l)(h,f,s)}class kl{constructor(e,n,r,o,i=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=o,this.open=(i?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let o=[new kl(0,e.length,e,0,!1,r)];for(let i of n)i.to>e.length&&o.push(i);return o}static applyChanges(e,n,r=128){if(!n.length)return e;let o=[],i=1,s=e.length?e[0]:null;for(let a=0,l=0,u=0;;a++){let d=a=r)for(;s&&s.from=f.from||h<=f.to||u){let p=Math.max(f.from,l)-u,m=Math.min(f.to,h)-u;f=p>=m?null:new kl(p,m,f.tree,f.offset+u,a>0,!!d)}if(f&&o.push(f),s.to>h)break;s=inew iv(o.from,o.to)):[new iv(0,0)]:[new iv(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let o=this.startParse(e,n,r);for(;;){let i=o.advance();if(i)return i}}}class rF{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new _n({perNode:!0});let oF=0;class vi{constructor(e,n,r,o){this.name=e,this.set=n,this.base=r,this.modified=o,this.id=oF++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof vi&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let o=new vi(r,[],null,[]);if(o.set.push(o),n)for(let i of n.set)o.set.push(i);return o}static defineModifier(e){let n=new Bp(e);return r=>r.modified.indexOf(n)>-1?r:Bp.get(r.base||r,r.modified.concat(n).sort((o,i)=>o.id-i.id))}}let iF=0;class Bp{constructor(e){this.name=e,this.instances=[],this.id=iF++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&sF(n,a.modified));if(r)return r;let o=[],i=new vi(e.name,o,e,n);for(let a of n)a.instances.push(i);let s=aF(n);for(let a of e.set)if(!a.modified.length)for(let l of s)o.push(Bp.get(a,l));return i}}function sF(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function aF(t){let e=[[]];for(let n=0;nr.length-n.length)}function O_(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let o of n.split(" "))if(o){let i=[],s=2,a=o;for(let h=0;;){if(a=="..."&&h>0&&h+3==o.length){s=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!f)throw new RangeError("Invalid path: "+o);if(i.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==o.length)break;let p=o[h++];if(h==o.length&&p=="!"){s=0;break}if(p!="/")throw new RangeError("Invalid path: "+o);a=o.slice(h)}let l=i.length-1,u=i[l];if(!u)throw new RangeError("Invalid path: "+o);let d=new Fp(r,s,l>0?i.slice(0,l):null);e[u]=d.sort(e[u])}}return __.add(e)}const __=new _n;class Fp{constructor(e,n,r,o){this.tags=e,this.mode=n,this.context=r,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=o;for(let a of i)for(let l of a.set){let u=n[l.id];if(u){s=s?s+" "+u:u;break}}return s},scope:r}}function lF(t,e){let n=null;for(let r of t){let o=r.style(e);o&&(n=n?n+" "+o:o)}return n}function cF(t,e,n,r=0,o=t.length){let i=new uF(r,Array.isArray(e)?e:[e],n);i.highlightRange(t.cursor(),r,o,"",i.highlighters),i.flush(o)}class uF{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,o,i){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(i=this.highlighters.filter(p=>!p.scope||p.scope(s)));let u=o,d=dF(e)||Fp.empty,h=lF(i,d.tags);if(h&&(u&&(u+=" "),u+=h,d.mode==1&&(o+=(o?" ":"")+h)),this.startSpan(Math.max(n,a),u),d.opaque)return;let f=e.tree&&e.tree.prop(_n.mounted);if(f&&f.overlay){let p=e.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(v=>!v.scope||v.scope(f.tree.type)),b=e.firstChild();for(let v=0,g=a;;v++){let y=v=k||!e.nextSibling())););if(!y||k>r)break;g=y.to+a,g>n&&(this.highlightRange(p.cursor(),Math.max(n,y.from+a),Math.min(r,g),"",m),this.startSpan(Math.min(r,g),u))}b&&e.parent()}else if(e.firstChild()){f&&(o="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,o,i),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function dF(t){let e=t.type.prop(__);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Xe=vi.define,vf=Xe(),ya=Xe(),c2=Xe(ya),u2=Xe(ya),wa=Xe(),bf=Xe(wa),sv=Xe(wa),ms=Xe(),cl=Xe(ms),fs=Xe(),ps=Xe(),X0=Xe(),qu=Xe(X0),yf=Xe(),Be={comment:vf,lineComment:Xe(vf),blockComment:Xe(vf),docComment:Xe(vf),name:ya,variableName:Xe(ya),typeName:c2,tagName:Xe(c2),propertyName:u2,attributeName:Xe(u2),className:Xe(ya),labelName:Xe(ya),namespace:Xe(ya),macroName:Xe(ya),literal:wa,string:bf,docString:Xe(bf),character:Xe(bf),attributeValue:Xe(bf),number:sv,integer:Xe(sv),float:Xe(sv),bool:Xe(wa),regexp:Xe(wa),escape:Xe(wa),color:Xe(wa),url:Xe(wa),keyword:fs,self:Xe(fs),null:Xe(fs),atom:Xe(fs),unit:Xe(fs),modifier:Xe(fs),operatorKeyword:Xe(fs),controlKeyword:Xe(fs),definitionKeyword:Xe(fs),moduleKeyword:Xe(fs),operator:ps,derefOperator:Xe(ps),arithmeticOperator:Xe(ps),logicOperator:Xe(ps),bitwiseOperator:Xe(ps),compareOperator:Xe(ps),updateOperator:Xe(ps),definitionOperator:Xe(ps),typeOperator:Xe(ps),controlOperator:Xe(ps),punctuation:X0,separator:Xe(X0),bracket:qu,angleBracket:Xe(qu),squareBracket:Xe(qu),paren:Xe(qu),brace:Xe(qu),content:ms,heading:cl,heading1:Xe(cl),heading2:Xe(cl),heading3:Xe(cl),heading4:Xe(cl),heading5:Xe(cl),heading6:Xe(cl),contentSeparator:Xe(ms),list:Xe(ms),quote:Xe(ms),emphasis:Xe(ms),strong:Xe(ms),link:Xe(ms),monospace:Xe(ms),strikethrough:Xe(ms),inserted:Xe(),deleted:Xe(),changed:Xe(),invalid:Xe(),meta:yf,documentMeta:Xe(yf),annotation:Xe(yf),processingInstruction:Xe(yf),definition:vi.defineModifier("definition"),constant:vi.defineModifier("constant"),function:vi.defineModifier("function"),standard:vi.defineModifier("standard"),local:vi.defineModifier("local"),special:vi.defineModifier("special")};for(let t in Be){let e=Be[t];e instanceof vi&&(e.name=t)}E_([{tag:Be.link,class:"tok-link"},{tag:Be.heading,class:"tok-heading"},{tag:Be.emphasis,class:"tok-emphasis"},{tag:Be.strong,class:"tok-strong"},{tag:Be.keyword,class:"tok-keyword"},{tag:Be.atom,class:"tok-atom"},{tag:Be.bool,class:"tok-bool"},{tag:Be.url,class:"tok-url"},{tag:Be.labelName,class:"tok-labelName"},{tag:Be.inserted,class:"tok-inserted"},{tag:Be.deleted,class:"tok-deleted"},{tag:Be.literal,class:"tok-literal"},{tag:Be.string,class:"tok-string"},{tag:Be.number,class:"tok-number"},{tag:[Be.regexp,Be.escape,Be.special(Be.string)],class:"tok-string2"},{tag:Be.variableName,class:"tok-variableName"},{tag:Be.local(Be.variableName),class:"tok-variableName tok-local"},{tag:Be.definition(Be.variableName),class:"tok-variableName tok-definition"},{tag:Be.special(Be.variableName),class:"tok-variableName2"},{tag:Be.definition(Be.propertyName),class:"tok-propertyName tok-definition"},{tag:Be.typeName,class:"tok-typeName"},{tag:Be.namespace,class:"tok-namespace"},{tag:Be.className,class:"tok-className"},{tag:Be.macroName,class:"tok-macroName"},{tag:Be.propertyName,class:"tok-propertyName"},{tag:Be.operator,class:"tok-operator"},{tag:Be.comment,class:"tok-comment"},{tag:Be.meta,class:"tok-meta"},{tag:Be.invalid,class:"tok-invalid"},{tag:Be.punctuation,class:"tok-punctuation"}]);var av;const jc=new _n;function hF(t){return at.define({combine:t?e=>e.concat(t):void 0})}const fF=new _n;class Hi{constructor(e,n,r=[],o=""){this.data=e,this.name=o,Mn.prototype.hasOwnProperty("tree")||Object.defineProperty(Mn.prototype,"tree",{get(){return No(this)}}),this.parser=n,this.extension=[Ja.of(this),Mn.languageData.of((i,s,a)=>{let l=d2(i,s,a),u=l.type.prop(jc);if(!u)return[];let d=i.facet(u),h=l.type.prop(fF);if(h){let f=l.resolve(s-l.from,a);for(let p of h)if(p.test(f,i)){let m=i.facet(p.facet);return p.type=="replace"?m:m.concat(d)}}return d})].concat(r)}isActiveAt(e,n,r=-1){return d2(e,n,r).type.prop(jc)==this.data}findRegions(e){let n=e.facet(Ja);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],o=(i,s)=>{if(i.prop(jc)==this.data){r.push({from:s,to:s+i.length});return}let a=i.prop(_n.mounted);if(a){if(a.tree.prop(jc)==this.data){if(a.overlay)for(let l of a.overlay)r.push({from:l.from+s,to:l.to+s});else r.push({from:s,to:s+i.length});return}else if(a.overlay){let l=r.length;if(o(a.tree,a.overlay[0].from+s),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new qp(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function No(t){let e=t.field(Hi.state,!1);return e?e.tree:no.empty}class pF{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Uu=null;class Up{constructor(e,n,r=[],o,i,s,a,l){this.parser=e,this.state=n,this.fragments=r,this.tree=o,this.treeLen=i,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Up(e,n,[],no.empty,0,r,[],null)}startParse(){return this.parser.startParse(new pF(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=no.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(kl.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Uu;Uu=this;try{return e()}finally{Uu=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=h2(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:o,treeLen:i,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,d,h,f)=>l.push({fromA:u,toA:d,fromB:h,toB:f})),r=kl.applyChanges(r,l),o=no.empty,i=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let u of this.skipped){let d=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);de.from&&(this.fragments=h2(this.fragments,o,i),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends C_{createParse(n,r,o){let i=o[0].from,s=o[o.length-1].to;return{parsedPos:i,advance(){let l=Uu;if(l){for(let u of o)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=s,new no(Zo.none,[],[],s-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Uu}}function h2(t,e,n){return kl.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class iu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new iu(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Up.create(e.facet(Ja).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new iu(r)}}Hi.state=po.define({create:iu.init,update(t,e){for(let n of e.effects)if(n.is(Hi.setState))return n.value;return e.startState.facet(Ja)!=e.state.facet(Ja)?iu.init(e.state):t.apply(e)}});let A_=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(A_=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const lv=typeof navigator<"u"&&(!((av=navigator.scheduling)===null||av===void 0)&&av.isInputPending)?()=>navigator.scheduling.isInputPending():null,mF=Ir.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Hi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Hi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=A_(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndo+1e3,l=i.context.work(()=>lv&&lv()||Date.now()>s,o+(a?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Hi.setState.of(new iu(i.context))})),this.chunkBudget>0&&!(l&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Fo(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ja=at.define({combine(t){return t.length?t[0]:null},enables:t=>[Hi.state,mF,nt.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class gF{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const vF=at.define(),Xm=at.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ga(t){let e=t.facet(Xm);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function zd(t,e){let n="",r=t.tabSize,o=t.facet(Xm)[0];if(o==" "){for(;e>=r;)n+=" ",e-=r;o=" "}for(let i=0;i=e?bF(t,n,e):null}class Zm{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ga(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:i}=this.options;return o!=null&&o>=r.from&&o<=r.to?i&&o==e?{text:"",from:e}:(n<0?o-1&&(i+=s-this.countColumn(r,r.search(/\S|$/))),i}countColumn(e,n=e.length){return ju(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:o}=this.lineAt(e,n),i=this.options.overrideIndentation;if(i){let s=i(o);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const $_=new _n;function bF(t,e,n){let r=e.resolveStack(n),o=r.node.enterUnfinishedNodesBefore(n);if(o!=r.node){let i=[];for(let s=o;s!=r.node;s=s.parent)i.push(s);for(let s=i.length-1;s>=0;s--)r={node:i[s],next:r}}return M_(r,t,n)}function M_(t,e,n){for(let r=t;r;r=r.next){let o=wF(r.node);if(o)return o(Ay.create(e,n,r))}return 0}function yF(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function wF(t){let e=t.type.prop($_);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(_n.closedBy))){let o=t.lastChild,i=o&&r.indexOf(o.name)>-1;return s=>SF(s,!0,1,void 0,i&&!yF(s)?o.from:void 0)}return t.parent==null?xF:null}function xF(){return 0}class Ay extends Zm{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new Ay(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(jF(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return M_(this.context.next,this.base,this.pos)}}function jF(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function kF(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let o=t.options.simulateBreak,i=t.state.doc.lineAt(n.from),s=o==null||o<=i.from?i.to:Math.min(i.to,o);for(let a=n.to;;){let l=e.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=s)return null;let u=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+u}}a=l.to}}function SF(t,e,n,r,o){let i=t.textAfter,s=i.match(/^\s*/)[0].length,a=o==t.pos+s,l=kF(t);return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}function f2({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const CF=200;function OF(){return Mn.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,o=n.lineAt(r);if(r>o.from+CF)return t;let i=n.sliceString(o.from,r);if(!e.some(u=>u.test(i)))return t;let{state:s}=t,a=-1,l=[];for(let{head:u}of s.selection.ranges){let d=s.doc.lineAt(u);if(d.from==a)continue;a=d.from;let h=Ey(s,d.from);if(h==null)continue;let f=/^\s*/.exec(d.text)[0],p=zd(s,h);f!=p&&l.push({from:d.from,to:d.from+f.length,insert:p})}return l.length?[t,{changes:l,sequential:!0}]:t})}const _F=at.define(),T_=new _n;function EF(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(i&&a.from=e&&u.to>n&&(i=u)}}return i}function $F(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Vp(t,e,n){for(let r of t.facet(_F)){let o=r(t,e,n);if(o)return o}return AF(t,e,n)}function P_(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const eg=bn.define({map:P_}),yh=bn.define({map:P_});function R_(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Ll=po.define({create(){return Lt.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(eg)&&!MF(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(I_),o=r?Lt.replace({widget:new zF(r(e.state,n.value))}):p2;t=t.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(yh)&&(t=t.update({filter:(r,o)=>n.value.from!=r||n.value.to!=o,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(o,i)=>{or&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(o,i)=>i<=r||o>=r}))}return t},provide:t=>nt.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,o)=>{n.push(r,o)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!o||o.from>i)&&(o={from:i,to:s})}),o}function MF(t,e,n){let r=!1;return t.between(e,e,(o,i)=>{o==e&&i==n&&(r=!0)}),r}function N_(t,e){return t.field(Ll,!1)?e:e.concat(bn.appendConfig.of(z_()))}const TF=t=>{for(let e of R_(t)){let n=Vp(t.state,e.from,e.to);if(n)return t.dispatch({effects:N_(t.state,[eg.of(n),D_(t,n)])}),!0}return!1},PF=t=>{if(!t.state.field(Ll,!1))return!1;let e=[];for(let n of R_(t)){let r=Hp(t.state,n.from,n.to);r&&e.push(yh.of(r),D_(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function D_(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,o=t.state.doc.lineAt(e.to).number;return nt.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${o}.`)}const RF=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(Ll,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,o)=>{n.push(yh.of({from:r,to:o}))}),t.dispatch({effects:n}),!0},DF=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:TF},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:PF},{key:"Ctrl-Alt-[",run:RF},{key:"Ctrl-Alt-]",run:NF}],IF={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},I_=at.define({combine(t){return ls(t,IF)}});function z_(t){return[Ll,FF]}function L_(t,e){let{state:n}=t,r=n.facet(I_),o=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),l=Hp(t.state,a.from,a.to);l&&t.dispatch({effects:yh.of(l)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,o,e);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const p2=Lt.replace({widget:new class extends Za{toDOM(t){return L_(t,null)}}});class zF extends Za{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return L_(e,this.value)}}const LF={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class cv extends Ts{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function BF(t={}){let e=Object.assign(Object.assign({},LF),t),n=new cv(e,!0),r=new cv(e,!1),o=Ir.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Ja)!=s.state.facet(Ja)||s.startState.field(Ll,!1)!=s.state.field(Ll,!1)||No(s.startState)!=No(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new os;for(let l of s.viewportLineBlocks){let u=Hp(s.state,l.from,l.to)?r:Vp(s.state,l.from,l.to)?n:null;u&&a.add(l.from,l.from,u)}return a.finish()}}),{domEventHandlers:i}=e;return[o,b_({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(o))===null||a===void 0?void 0:a.markers)||Dn.empty},initialSpacer(){return new cv(e,!1)},domEventHandlers:Object.assign(Object.assign({},i),{click:(s,a,l)=>{if(i.click&&i.click(s,a,l))return!0;let u=Hp(s.state,a.from,a.to);if(u)return s.dispatch({effects:yh.of(u)}),!0;let d=Vp(s.state,a.from,a.to);return d?(s.dispatch({effects:eg.of(d)}),!0):!1}})}),z_()]}const FF=nt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class wh{constructor(e,n){this.specs=e;let r;function o(a){let l=Va.newName();return(r||(r=Object.create(null)))["."+l]=a,l}const i=typeof n.all=="string"?n.all:n.all?o(n.all):void 0,s=n.scope;this.scope=s instanceof Hi?a=>a.prop(jc)==s.data:s?a=>a==s:void 0,this.style=E_(e.map(a=>({tag:a.tag,class:a.class||o(Object.assign({},a,{tag:null}))})),{all:i}).style,this.module=r?new Va(r):null,this.themeType=n.themeType}static define(e,n){return new wh(e,n||{})}}const Z0=at.define(),B_=at.define({combine(t){return t.length?[t[0]]:null}});function uv(t){let e=t.facet(Z0);return e.length?e:t.facet(B_)}function F_(t,e){let n=[UF],r;return t instanceof wh&&(t.module&&n.push(nt.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(B_.of(t)):r?n.push(Z0.computeN([nt.darkTheme],o=>o.facet(nt.darkTheme)==(r=="dark")?[t]:[])):n.push(Z0.of(t)),n}class qF{constructor(e){this.markCache=Object.create(null),this.tree=No(e.state),this.decorations=this.buildDeco(e,uv(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=No(e.state),r=uv(e.state),o=r!=uv(e.startState),{viewport:i}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||o)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=i.to)}buildDeco(e,n){if(!n||!this.tree.length)return Lt.none;let r=new os;for(let{from:o,to:i}of e.visibleRanges)cF(this.tree,n,(s,a,l)=>{r.add(s,a,this.markCache[l]||(this.markCache[l]=Lt.mark({class:l})))},o,i);return r.finish()}}const UF=Gl.high(Ir.fromClass(qF,{decorations:t=>t.decorations})),VF=wh.define([{tag:Be.meta,color:"#404740"},{tag:Be.link,textDecoration:"underline"},{tag:Be.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Be.emphasis,fontStyle:"italic"},{tag:Be.strong,fontWeight:"bold"},{tag:Be.strikethrough,textDecoration:"line-through"},{tag:Be.keyword,color:"#708"},{tag:[Be.atom,Be.bool,Be.url,Be.contentSeparator,Be.labelName],color:"#219"},{tag:[Be.literal,Be.inserted],color:"#164"},{tag:[Be.string,Be.deleted],color:"#a11"},{tag:[Be.regexp,Be.escape,Be.special(Be.string)],color:"#e40"},{tag:Be.definition(Be.variableName),color:"#00f"},{tag:Be.local(Be.variableName),color:"#30a"},{tag:[Be.typeName,Be.namespace],color:"#085"},{tag:Be.className,color:"#167"},{tag:[Be.special(Be.variableName),Be.macroName],color:"#256"},{tag:Be.definition(Be.propertyName),color:"#00c"},{tag:Be.comment,color:"#940"},{tag:Be.invalid,color:"#f00"}]),HF=nt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),q_=1e4,U_="()[]{}",V_=at.define({combine(t){return ls(t,{afterCursor:!0,brackets:U_,maxScanDistance:q_,renderMatch:JF})}}),WF=Lt.mark({class:"cm-matchingBracket"}),KF=Lt.mark({class:"cm-nonmatchingBracket"});function JF(t){let e=[],n=t.matched?WF:KF;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const GF=po.define({create(){return Lt.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(V_);for(let o of e.state.selection.ranges){if(!o.empty)continue;let i=js(e.state,o.head,-1,r)||o.head>0&&js(e.state,o.head-1,1,r)||r.afterCursor&&(js(e.state,o.head,1,r)||o.headnt.decorations.from(t)}),QF=[GF,HF];function YF(t={}){return[V_.of(t),QF]}const XF=new _n;function eb(t,e,n){let r=t.prop(e<0?_n.openedBy:_n.closedBy);if(r)return r;if(t.name.length==1){let o=n.indexOf(t.name);if(o>-1&&o%2==(e<0?1:0))return[n[o+e]]}return null}function tb(t){let e=t.type.prop(XF);return e?e(t.node):t}function js(t,e,n,r={}){let o=r.maxScanDistance||q_,i=r.brackets||U_,s=No(t),a=s.resolveInner(e,n);for(let l=a;l;l=l.parent){let u=eb(l.type,n,i);if(u&&l.from0?e>=d.from&&ed.from&&e<=d.to))return ZF(t,e,n,l,d,u,i)}}return eq(t,e,n,s,a.type,o,i)}function ZF(t,e,n,r,o,i,s){let a=r.parent,l={from:o.from,to:o.to},u=0,d=a==null?void 0:a.cursor();if(d&&(n<0?d.childBefore(r.from):d.childAfter(r.to)))do if(n<0?d.to<=r.from:d.from>=r.to){if(u==0&&i.indexOf(d.type.name)>-1&&d.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},d=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let f=0;!d.next().done&&f<=i;){let p=d.value;n<0&&(f+=p.length);let m=e+f*n;for(let b=n>0?0:p.length-1,v=n>0?p.length:-1;b!=v;b+=n){let g=s.indexOf(p[b]);if(!(g<0||r.resolveInner(m+b,1).type!=o))if(g%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:m+b,to:m+b+1},matched:g>>1==l>>1};h--}}n>0&&(f+=p.length)}return d.done?{start:u,matched:!1}:null}const tq=Object.create(null),m2=[Zo.none],g2=[],v2=Object.create(null),nq=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])nq[t]=rq(tq,e);function dv(t,e){g2.indexOf(t)>-1||(g2.push(t),console.warn(e))}function rq(t,e){let n=[];for(let a of e.split(" ")){let l=[];for(let u of a.split(".")){let d=t[u]||Be[u];d?typeof d=="function"?l.length?l=l.map(d):dv(u,`Modifier ${u} used at start of tag`):l.length?dv(u,`Tag ${u} used as modifier`):l=Array.isArray(d)?d:[d]:dv(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),o=r+" "+n.map(a=>a.id),i=v2[o];if(i)return i.id;let s=v2[o]=Zo.define({id:m2.length,name:r,props:[O_({[r]:n})]});return m2.push(s),s.id}Sr.RTL,Sr.LTR;const oq=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=My(t.state,n.from);return r.line?iq(t):r.block?aq(t):!1};function $y(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=t(e,n);return o?(r(n.update(o)),!0):!1}}const iq=$y(uq,0),sq=$y(H_,0),aq=$y((t,e)=>H_(t,e,cq(e)),0);function My(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Vu=50;function lq(t,{open:e,close:n},r,o){let i=t.sliceDoc(r-Vu,r),s=t.sliceDoc(o,o+Vu),a=/\s*$/.exec(i)[0].length,l=/^\s*/.exec(s)[0].length,u=i.length-a;if(i.slice(u-e.length,u)==e&&s.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:o+l,margin:l&&1}};let d,h;o-r<=2*Vu?d=h=t.sliceDoc(r,o):(d=t.sliceDoc(r,r+Vu),h=t.sliceDoc(o-Vu,o));let f=/^\s*/.exec(d)[0].length,p=/\s*$/.exec(h)[0].length,m=h.length-p-n.length;return d.slice(f,f+e.length)==e&&h.slice(m,m+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(d.charAt(f+e.length))?1:0},close:{pos:o-p-n.length,margin:/\s/.test(h.charAt(m-1))?1:0}}:null}function cq(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),o=n.to<=r.to?r:t.doc.lineAt(n.to);o.from>r.from&&o.from==n.to&&(o=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let i=e.length-1;i>=0&&e[i].to>r.from?e[i].to=o.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return e}function H_(t,e,n=e.selection.ranges){let r=n.map(i=>My(e,i.from).block);if(!r.every(i=>i))return null;let o=n.map((i,s)=>lq(e,r[s],i.from,i.to));if(t!=2&&!o.every(i=>i))return{changes:e.changes(n.map((i,s)=>o[s]?[]:[{from:i.from,insert:r[s].open+" "},{from:i.to,insert:" "+r[s].close}]))};if(t!=1&&o.some(i=>i)){let i=[];for(let s=0,a;so&&(i==s||s>h.from)){o=h.from;let f=/^\s*/.exec(h.text)[0].length,p=f==h.length,m=h.text.slice(f,f+u.length)==u?f:-1;fi.comment<0&&(!i.empty||i.single))){let i=[];for(let{line:a,token:l,indent:u,empty:d,single:h}of r)(h||!d)&&i.push({from:a.from+u,insert:l+" "});let s=e.changes(i);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(i=>i.comment>=0)){let i=[];for(let{line:s,comment:a,token:l}of r)if(a>=0){let u=s.from+a,d=u+l.length;s.text[d-s.from]==" "&&d++,i.push({from:u,to:d})}return{changes:i}}return null}function ku(t,e){return Ae.create(t.ranges.map(e),t.mainIndex)}function Is(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function cs({state:t,dispatch:e},n){let r=ku(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Is(t,r)),!0)}function tg(t,e){return Ae.cursor(e?t.to:t.from)}function W_(t,e){return cs(t,n=>n.empty?t.moveByChar(n,e):tg(n,e))}function Do(t){return t.textDirectionAt(t.state.selection.main.head)==Sr.LTR}const K_=t=>W_(t,!Do(t)),J_=t=>W_(t,Do(t));function G_(t,e){return cs(t,n=>n.empty?t.moveByGroup(n,e):tg(n,e))}const dq=t=>G_(t,!Do(t)),hq=t=>G_(t,Do(t));function fq(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function ng(t,e,n){let r=No(t).resolveInner(e.head),o=n?_n.closedBy:_n.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;fq(t,u,o)?r=u:l=n?u.to:u.from}let i=r.type.prop(o),s,a;return i&&(s=n?js(t,r.from,1):js(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,Ae.cursor(a,n?-1:1)}const pq=t=>cs(t,e=>ng(t.state,e,!Do(t))),mq=t=>cs(t,e=>ng(t.state,e,Do(t)));function Q_(t,e){return cs(t,n=>{if(!n.empty)return tg(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const Y_=t=>Q_(t,!1),X_=t=>Q_(t,!0);function Z_(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):tg(s,e));if(o.eq(r.selection))return!1;let i;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,u=a.bottom-n.marginBottom;s&&s.top>l&&s.bottomeE(t,!1),nb=t=>eE(t,!0);function el(t,e,n){let r=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,n);if(o.head==e.head&&o.head!=(n?r.to:r.from)&&(o=t.moveToLineBoundary(e,n,!1)),!n&&o.head==r.from&&r.length){let i=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;i&&e.head!=r.from+i&&(o=Ae.cursor(r.from+i))}return o}const gq=t=>cs(t,e=>el(t,e,!0)),vq=t=>cs(t,e=>el(t,e,!1)),bq=t=>cs(t,e=>el(t,e,!Do(t))),yq=t=>cs(t,e=>el(t,e,Do(t))),wq=t=>cs(t,e=>Ae.cursor(t.lineBlockAt(e.head).from,1)),xq=t=>cs(t,e=>Ae.cursor(t.lineBlockAt(e.head).to,-1));function jq(t,e,n){let r=!1,o=ku(t.selection,i=>{let s=js(t,i.head,-1)||js(t,i.head,1)||i.head>0&&js(t,i.head-1,1)||i.headjq(t,e);function Mi(t,e){let n=ku(t.state.selection,r=>{let o=e(r);return Ae.range(r.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Is(t.state,n)),!0)}function tE(t,e){return Mi(t,n=>t.moveByChar(n,e))}const nE=t=>tE(t,!Do(t)),rE=t=>tE(t,Do(t));function oE(t,e){return Mi(t,n=>t.moveByGroup(n,e))}const Sq=t=>oE(t,!Do(t)),Cq=t=>oE(t,Do(t)),Oq=t=>Mi(t,e=>ng(t.state,e,!Do(t))),_q=t=>Mi(t,e=>ng(t.state,e,Do(t)));function iE(t,e){return Mi(t,n=>t.moveVertically(n,e))}const sE=t=>iE(t,!1),aE=t=>iE(t,!0);function lE(t,e){return Mi(t,n=>t.moveVertically(n,e,Z_(t).height))}const y2=t=>lE(t,!1),w2=t=>lE(t,!0),Eq=t=>Mi(t,e=>el(t,e,!0)),Aq=t=>Mi(t,e=>el(t,e,!1)),$q=t=>Mi(t,e=>el(t,e,!Do(t))),Mq=t=>Mi(t,e=>el(t,e,Do(t))),Tq=t=>Mi(t,e=>Ae.cursor(t.lineBlockAt(e.head).from)),Pq=t=>Mi(t,e=>Ae.cursor(t.lineBlockAt(e.head).to)),x2=({state:t,dispatch:e})=>(e(Is(t,{anchor:0})),!0),j2=({state:t,dispatch:e})=>(e(Is(t,{anchor:t.doc.length})),!0),k2=({state:t,dispatch:e})=>(e(Is(t,{anchor:t.selection.main.anchor,head:0})),!0),S2=({state:t,dispatch:e})=>(e(Is(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Rq=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Nq=({state:t,dispatch:e})=>{let n=rg(t).map(({from:r,to:o})=>Ae.range(r,Math.min(o+1,t.doc.length)));return e(t.update({selection:Ae.create(n),userEvent:"select"})),!0},Dq=({state:t,dispatch:e})=>{let n=ku(t.selection,r=>{let o=No(t),i=o.resolveStack(r.from,1);if(r.empty){let s=o.resolveStack(r.from,-1);s.node.from>=i.node.from&&s.node.to<=i.node.to&&(i=s)}for(let s=i;s;s=s.next){let{node:a}=s;if((a.from=r.to||a.to>r.to&&a.from<=r.from)&&s.next)return Ae.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Is(t,n)),!0)},Iq=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Ae.create([n.main]):n.main.empty||(r=Ae.create([Ae.cursor(n.main.head)])),r?(e(Is(t,r)),!0):!1};function xh(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,o=r.changeByRange(i=>{let{from:s,to:a}=i;if(s==a){let l=e(i);ls&&(n="delete.forward",l=wf(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=wf(t,s,!1),a=wf(t,a,!0);return s==a?{range:i}:{changes:{from:s,to:a},range:Ae.cursor(s,so(t)))r.between(e,e,(o,i)=>{oe&&(e=n?i:o)});return e}const cE=(t,e,n)=>xh(t,r=>{let o=r.from,{state:i}=t,s=i.doc.lineAt(o),a,l;if(n&&!e&&o>s.from&&ocE(t,!1,!0),uE=t=>cE(t,!0,!1),dE=(t,e)=>xh(t,n=>{let r=n.head,{state:o}=t,i=o.doc.lineAt(r),s=o.charCategorizer(r);for(let a=null;;){if(r==(e?i.to:i.from)){r==n.head&&i.number!=(e?o.doc.lines:1)&&(r+=e?1:-1);break}let l=xo(i.text,r-i.from,e)+i.from,u=i.text.slice(Math.min(r,l)-i.from,Math.max(r,l)-i.from),d=s(u);if(a!=null&&d!=a)break;(u!=" "||r!=n.head)&&(a=d),r=l}return r}),hE=t=>dE(t,!1),zq=t=>dE(t,!0),Lq=t=>xh(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headxh(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Fq=t=>xh(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Zn.of(["",""])},range:Ae.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Uq=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let o=r.from,i=t.doc.lineAt(o),s=o==i.from?o-1:xo(i.text,o-i.from,!1)+i.from,a=o==i.to?o+1:xo(i.text,o-i.from,!0)+i.from;return{changes:{from:s,to:a,insert:t.doc.slice(o,a).append(t.doc.slice(s,o))},range:Ae.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function rg(t){let e=[],n=-1;for(let r of t.selection.ranges){let o=t.doc.lineAt(r.from),i=t.doc.lineAt(r.to);if(!r.empty&&r.to==i.from&&(i=t.doc.lineAt(r.to-1)),n>=o.number){let s=e[e.length-1];s.to=i.to,s.ranges.push(r)}else e.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return e}function fE(t,e,n){if(t.readOnly)return!1;let r=[],o=[];for(let i of rg(t)){if(n?i.to==t.doc.length:i.from==0)continue;let s=t.doc.lineAt(n?i.to+1:i.from-1),a=s.length+1;if(n){r.push({from:i.to,to:s.to},{from:i.from,insert:s.text+t.lineBreak});for(let l of i.ranges)o.push(Ae.range(Math.min(t.doc.length,l.anchor+a),Math.min(t.doc.length,l.head+a)))}else{r.push({from:s.from,to:i.from},{from:i.to,insert:t.lineBreak+s.text});for(let l of i.ranges)o.push(Ae.range(l.anchor-a,l.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Ae.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Vq=({state:t,dispatch:e})=>fE(t,e,!1),Hq=({state:t,dispatch:e})=>fE(t,e,!0);function pE(t,e,n){if(t.readOnly)return!1;let r=[];for(let o of rg(t))n?r.push({from:o.from,insert:t.doc.slice(o.from,o.to)+t.lineBreak}):r.push({from:o.to,insert:t.lineBreak+t.doc.slice(o.from,o.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Wq=({state:t,dispatch:e})=>pE(t,e,!1),Kq=({state:t,dispatch:e})=>pE(t,e,!0),Jq=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(rg(e).map(({from:o,to:i})=>(o>0?o--:i{let i;if(t.lineWrapping){let s=t.lineBlockAt(o.head),a=t.coordsAtPos(o.head,o.assoc||1);a&&(i=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(o,!0,i)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Gq(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=No(t).resolveInner(e),r=n.childBefore(e),o=n.childAfter(e),i;return r&&o&&r.to<=e&&o.from>=e&&(i=r.type.prop(_n.closedBy))&&i.indexOf(o.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(r.to,o.from))?{from:r.to,to:o.from}:null}const C2=mE(!1),Qq=mE(!0);function mE(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(o=>{let{from:i,to:s}=o,a=e.doc.lineAt(i),l=!t&&i==s&&Gq(e,i);t&&(i=s=(s<=a.to?a:e.doc.lineAt(s)).to);let u=new Zm(e,{simulateBreak:i,simulateDoubleBreak:!!l}),d=Ey(u,i);for(d==null&&(d=ju(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));sa.from&&i{let o=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,o,r),n=a.number),s=a.to+1}let i=t.changes(o);return{changes:o,range:Ae.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}})}const Yq=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Zm(t,{overrideIndentation:i=>{let s=n[i];return s??-1}}),o=Ty(t,(i,s,a)=>{let l=Ey(r,i.from);if(l==null)return;/\S/.test(i.text)||(l=0);let u=/^\s*/.exec(i.text)[0],d=zd(t,l);(u!=d||a.fromt.readOnly?!1:(e(t.update(Ty(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Xm)})}),{userEvent:"input.indent"})),!0),vE=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(Ty(t,(n,r)=>{let o=/^\s*/.exec(n.text)[0];if(!o)return;let i=ju(o,t.tabSize),s=0,a=zd(t,Math.max(0,i-Ga(t)));for(;s(t.setTabFocusMode(),!0),Zq=[{key:"Ctrl-b",run:K_,shift:nE,preventDefault:!0},{key:"Ctrl-f",run:J_,shift:rE},{key:"Ctrl-p",run:Y_,shift:sE},{key:"Ctrl-n",run:X_,shift:aE},{key:"Ctrl-a",run:wq,shift:Tq},{key:"Ctrl-e",run:xq,shift:Pq},{key:"Ctrl-d",run:uE},{key:"Ctrl-h",run:rb},{key:"Ctrl-k",run:Lq},{key:"Ctrl-Alt-h",run:hE},{key:"Ctrl-o",run:qq},{key:"Ctrl-t",run:Uq},{key:"Ctrl-v",run:nb}],eU=[{key:"ArrowLeft",run:K_,shift:nE,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:dq,shift:Sq,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:bq,shift:$q,preventDefault:!0},{key:"ArrowRight",run:J_,shift:rE,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:hq,shift:Cq,preventDefault:!0},{mac:"Cmd-ArrowRight",run:yq,shift:Mq,preventDefault:!0},{key:"ArrowUp",run:Y_,shift:sE,preventDefault:!0},{mac:"Cmd-ArrowUp",run:x2,shift:k2},{mac:"Ctrl-ArrowUp",run:b2,shift:y2},{key:"ArrowDown",run:X_,shift:aE,preventDefault:!0},{mac:"Cmd-ArrowDown",run:j2,shift:S2},{mac:"Ctrl-ArrowDown",run:nb,shift:w2},{key:"PageUp",run:b2,shift:y2},{key:"PageDown",run:nb,shift:w2},{key:"Home",run:vq,shift:Aq,preventDefault:!0},{key:"Mod-Home",run:x2,shift:k2},{key:"End",run:gq,shift:Eq,preventDefault:!0},{key:"Mod-End",run:j2,shift:S2},{key:"Enter",run:C2,shift:C2},{key:"Mod-a",run:Rq},{key:"Backspace",run:rb,shift:rb},{key:"Delete",run:uE},{key:"Mod-Backspace",mac:"Alt-Backspace",run:hE},{key:"Mod-Delete",mac:"Alt-Delete",run:zq},{mac:"Mod-Backspace",run:Bq},{mac:"Mod-Delete",run:Fq}].concat(Zq.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),tU=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:pq,shift:Oq},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:mq,shift:_q},{key:"Alt-ArrowUp",run:Vq},{key:"Shift-Alt-ArrowUp",run:Wq},{key:"Alt-ArrowDown",run:Hq},{key:"Shift-Alt-ArrowDown",run:Kq},{key:"Escape",run:Iq},{key:"Mod-Enter",run:Qq},{key:"Alt-l",mac:"Ctrl-l",run:Nq},{key:"Mod-i",run:Dq,preventDefault:!0},{key:"Mod-[",run:vE},{key:"Mod-]",run:gE},{key:"Mod-Alt-\\",run:Yq},{key:"Shift-Mod-k",run:Jq},{key:"Shift-Mod-\\",run:kq},{key:"Mod-/",run:oq},{key:"Alt-A",run:sq},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Xq}].concat(eU),nU={key:"Tab",run:gE,shift:vE};function gr(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];typeof o=="string"?t.setAttribute(r,o):o!=null&&(t[r]=o)}e++}for(;eh.from-f.from||h.to-f.to),a=new os,l=[],u=0;for(let h=0;;){let f=h==s.length?null:s[h];if(!f&&!l.length)break;let p,m;for(l.length?(p=u,m=l.reduce((v,g)=>Math.min(v,g.to),f&&f.from>p?f.from:1e8)):(p=f.from,m=f.to,l.push(f),h++);hv.from||v.to==p))l.push(v),h++,m=Math.min(v.to,m);else{m=Math.min(v.from,m);break}}let b=CE(l);if(l.some(v=>v.from==v.to||v.from==v.to-1&&r.doc.lineAt(v.from).to==v.from))a.add(p,p,Lt.widget({widget:new hU(b),diagnostics:l.slice()}));else{let v=l.reduce((g,y)=>y.markClass?g+" "+y.markClass:g,"");a.add(p,m,Lt.mark({class:"cm-lintRange cm-lintRange-"+b+v,diagnostics:l.slice(),inclusiveEnd:l.some(g=>g.to>m)}))}u=m;for(let v=0;v{if(!(e&&s.diagnostics.indexOf(e)<0))if(!r)r=new O2(o,i,e||s.diagnostics[0]);else{if(s.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new O2(r.from,i,r.diagnostic)}}),r}function yE(t,e){let n=e.pos,r=e.end||n,o=t.state.facet(ks).hideOn(t,n,r);if(o!=null)return o;let i=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(og))||t.changes.touchesRange(i.from,Math.max(i.to,r)))}function wE(t,e){return t.field(li,!1)?e:e.concat(bn.appendConfig.of(EE))}function rU(t,e){return{effects:wE(t,[og.of(e)])}}const og=bn.define(),Py=bn.define(),xE=bn.define(),li=po.define({create(){return new vl(Lt.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,o=t.panel;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=su(n,t.selected.diagnostic,i)||su(n,null,i)}!n.size&&o&&e.state.facet(ks).autoPanel&&(o=null),t=new vl(n,o,r)}for(let n of e.effects)if(n.is(og)){let r=e.state.facet(ks).autoPanel?n.value.length?Ld.open:null:t.panel;t=vl.init(n.value,r,e.state)}else n.is(Py)?t=new vl(t.diagnostics,n.value?Ld.open:null,t.selected):n.is(xE)&&(t=new vl(t.diagnostics,t.panel,n.value));return t},provide:t=>[Dd.from(t,e=>e.panel),nt.decorations.from(t,e=>e.diagnostics)]}),oU=Lt.mark({class:"cm-lintRange cm-lintRange-active"});function iU(t,e,n){let{diagnostics:r}=t.state.field(li),o,i=-1,s=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:d})=>{if(e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eSE(t,n,!1)))}const sU=t=>{let e=t.state.field(li,!1);(!e||!e.panel)&&t.dispatch({effects:wE(t.state,[Py.of(!0)])});let n=Nd(t,Ld.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},_2=t=>{let e=t.state.field(li,!1);return!e||!e.panel?!1:(t.dispatch({effects:Py.of(!1)}),!0)},aU=t=>{let e=t.state.field(li,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},lU=[{key:"Mod-Shift-m",run:sU,preventDefault:!0},{key:"F8",run:aU}],cU=Ir.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(ks);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(tPromise.resolve(r(this.view))),r=>{this.view.state.doc==e.doc&&this.view.dispatch(rU(this.view.state,r.reduce((o,i)=>o.concat(i))))},r=>{Fo(this.view.state,r)})}}update(t){let e=t.state.facet(ks);(t.docChanged||e!=t.startState.facet(ks)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});function uU(t,e,n){let r=[],o=-1;for(let i of t)i.then(s=>{r.push(s),clearTimeout(o),r.length==t.length?e(r):o=setTimeout(()=>e(r),200)},n)}const ks=at.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},ls(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function dU(t,e={}){return[ks.of({source:t,config:e}),cU,EE]}function kE(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ri.toLowerCase()==o.toLowerCase())){e.push(o);continue e}}e.push("")}return e}function SE(t,e,n){var r;let o=n?kE(e.actions):[];return gr("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},gr("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((i,s)=>{let a=!1,l=f=>{if(f.preventDefault(),a)return;a=!0;let p=su(t.state.field(li).diagnostics,e);p&&i.apply(t,p.from,p.to)},{name:u}=i,d=o[s]?u.indexOf(o[s]):-1,h=d<0?u:[u.slice(0,d),gr("u",u.slice(d,d+1)),u.slice(d+1)];return gr("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${d<0?"":` (access key "${o[s]})"`}.`},h)}),e.source&&gr("div",{class:"cm-diagnosticSource"},e.source))}class hU extends Za{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return gr("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class E2{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=SE(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ld{constructor(e){this.view=e,this.items=[];let n=o=>{if(o.keyCode==27)_2(this.view),this.view.focus();else if(o.keyCode==38||o.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(o.keyCode==40||o.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(o.keyCode==36)this.moveSelection(0);else if(o.keyCode==35)this.moveSelection(this.items.length-1);else if(o.keyCode==13)this.view.focus();else if(o.keyCode>=65&&o.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:i}=this.items[this.selectedIndex],s=kE(i.actions);for(let a=0;a{for(let i=0;i_2(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(li).selected;if(!e)return-1;for(let n=0;n{for(let d of u.diagnostics){if(s.has(d))continue;s.add(d);let h=-1,f;for(let p=r;pr&&(this.items.splice(r,h-r),o=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),i=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:l})=>{let u=l.height/this.list.offsetHeight;a.topl.bottom&&(this.list.scrollTop+=(a.bottom-l.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(li),r=su(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:xE.of(r)})}static open(e){return new Ld(e)}}function op(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function xf(t){return op(``,'width="6" height="3"')}const fU=nt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:xf("#d11")},".cm-lintRange-warning":{backgroundImage:xf("orange")},".cm-lintRange-info":{backgroundImage:xf("#999")},".cm-lintRange-hint":{backgroundImage:xf("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function pU(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function CE(t){let e="hint",n=1;for(let r of t){let o=pU(r.severity);o>n&&(n=o,e=r.severity)}return e}class OE extends Ts{constructor(e){super(),this.diagnostics=e,this.severity=CE(e)}toDOM(e){let n=document.createElement("div");n.className="cm-lint-marker cm-lint-marker-"+this.severity;let r=this.diagnostics,o=e.state.facet(ig).tooltipFilter;return o&&(r=o(r,e.state)),r.length&&(n.onmouseover=()=>gU(e,n,r)),n}}function mU(t,e){let n=r=>{let o=e.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientXo.top-10&&r.clientYe.getBoundingClientRect()}}})}),e.onmouseout=e.onmousemove=null,mU(t,e)}let{hoverTime:o}=t.state.facet(ig),i=setTimeout(r,o);e.onmouseout=()=>{clearTimeout(i),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(i),i=setTimeout(r,o)}}function vU(t,e){let n=Object.create(null);for(let o of e){let i=t.lineAt(o.from);(n[i.from]||(n[i.from]=[])).push(o)}let r=[];for(let o in n)r.push(new OE(n[o]).range(+o));return Dn.of(r,!0)}const bU=b_({class:"cm-gutter-lint",markers:t=>t.state.field(ob),widgetMarker:(t,e,n)=>{let r=[];return t.state.field(ob).between(n.from,n.to,(o,i,s)=>{o>n.from&&or.is(Ry)?r.value:n,t)},provide:t=>Qm.from(t)}),yU=nt.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:op('')},".cm-lint-marker-warning":{content:op('')},".cm-lint-marker-error":{content:op('')}}),EE=[li,nt.decorations.compute([li],t=>{let{selected:e,panel:n}=t.field(li);return!e||!n||e.from==e.to?Lt.none:Lt.set([oU.range(e.from,e.to)])}),IB(iU,{hideOn:yE}),fU],ig=at.define({combine(t){return ls(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function wU(t={}){return[ig.of(t),ob,bU,yU,_E]}var A2={};class Wp{constructor(e,n,r,o,i,s,a,l,u,d=0,h){this.p=e,this.stack=n,this.state=r,this.reducePos=o,this.pos=i,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=u,this.lookAhead=d,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let o=e.parser.context;return new Wp(e,[],n,r,r,0,[],0,o?new $2(o,o.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,o=e&65535,{parser:i}=this.p,s=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[o])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(o,u)}storeNode(e,n,r,o=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!i||this.pos==r)this.buffer.push(e,n,r,o);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let l=s;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,o>4&&(o-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=o}}shift(e,n,r,o){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=o,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,o,4);else{let i=e,{parser:s}=this.p;(o>this.pos||n<=s.maxNode)&&(this.pos=o,s.stateFlag(i,1)||(this.reducePos=o)),this.pushState(i,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,o,4)}}apply(e,n,r,o){e&65536?this.reduce(e):this.shift(e,n,r,o)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let o=this.pos;this.reducePos=this.pos=o+e.length,this.pushState(n,o),this.buffer.push(r,o,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),o=e.bufferBase+n;for(;e&&o==e.bufferBase;)e=e.parent;return new Wp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,o,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new xU(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let o=[];for(let i=0,s;il&1&&a==s)||o.push(n[i],s)}n=o}let r=[];for(let o=0;o>19,o=n&65535,i=this.stack.length-r*3;if(i<0||e.getGoto(this.stack[i],o,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(o,i)=>{if(!n.includes(o))return n.push(o),e.allActions(o,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-i;if(a>1){let l=s&65535,u=this.stack.length-a*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return a<<19|65536|l}}else{let a=r(s,i+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class $2{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class xU{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let o=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=o}}class Kp{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Kp(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Kp(this.stack,this.pos,this.index)}}function jf(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,o=0;r=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),i+=l,a)break;i*=46}n?n[o++]=i:n=new e(i)}return n}class ip{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const M2=new ip;class jU{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=M2,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,o=this.rangeIndex,i=this.pos+e;for(;ir.to:i>=r.to;){if(o==this.ranges.length-1)return null;let s=this.ranges[++o];i+=s.from-r.to,r=s}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,o;if(n>=0&&n=this.chunk2Pos&&ra.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),o=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),o}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=M2,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let o of this.ranges){if(o.from>=n)break;o.to>e&&(r+=this.input.read(Math.max(o.from,e),Math.min(o.to,n)))}return r}}class Lc{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;kU(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Lc.prototype.contextual=Lc.prototype.fallback=Lc.prototype.extend=!1;Lc.prototype.fallback=Lc.prototype.extend=!1;function kU(t,e,n,r,o,i){let s=0,a=1<0){let m=t[p];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||SU(m,e.token.value,o,i))){e.acceptToken(m);break}}let d=e.next,h=0,f=t[s+2];if(e.next<0&&f>h&&t[u+f*3-3]==65535){s=t[u+f*3-1];continue e}for(;h>1,m=u+p+(p<<1),b=t[m],v=t[m+1]||65536;if(d=v)h=p+1;else{s=t[m+2],e.advance();continue e}}break}}function T2(t,e,n){for(let r=e,o;(o=t[r])!=65535;r++)if(o==n)return r-e;return-1}function SU(t,e,n,r){let o=T2(n,r,e);return o<0||T2(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class CU{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?P2(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?P2(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(i instanceof no){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+i.length}}}class OU{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new ip)}getActions(e){let n=0,r=null,{parser:o}=e.p,{tokenizers:i}=o,s=o.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let u=0;uh.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let f=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!d.extend&&(r=h,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new ip,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new ip,{pos:r,p:o}=e;return n.start=r,n.end=Math.min(r+1,o.stream.end),n.value=r==o.stream.end?o.parser.eofTerm:0,n}updateCachedToken(e,n,r){let o=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(o,e),r),e.value>-1){let{parser:i}=r.p;for(let s=0;s=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(o+1)}putAction(e,n,r,o){for(let i=0;ie.bufferLength*4?new CU(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],o,i;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sn)r.push(a);else{if(this.advanceStack(a,r,e))continue;{o||(o=[],i=[]),o.push(a);let l=this.tokens.getMainToken(a);i.push(l.value,l.end)}}break}}if(!r.length){let s=o&&AU(o);if(s)return ti&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw ti&&o&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&o){let s=this.stoppedAt!=null&&o[0].pos>this.stoppedAt?o[0]:this.runRecovery(o,i,r);if(s)return ti&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,l)=>l.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s500&&u.buffer.length>500)if((a.score-u.score||a.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&o>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,d=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(o);h;){let f=this.parser.nodeSet.types[h.type.id]==h.type?i.getGoto(e.state,h.type.id):-1;if(f>-1&&h.length&&(!u||(h.prop(_n.contextHash)||0)==d))return e.useNode(h,f),ti&&console.log(s+this.stackID(e)+` (via reuse of ${i.getName(h.type.id)})`),!0;if(!(h instanceof no)||h.children.length==0||h.positions[0]>0)break;let p=h.children[0];if(p instanceof no&&h.positions[0]==0)h=p;else break}}let a=i.stateSlot(e.state,4);if(a>0)return e.reduce(a),ti&&console.log(s+this.stackID(e)+` (via always-reduce ${i.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;uo?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return R2(e,n),!0}}runRecovery(e,n,r){let o=null,i=!1;for(let s=0;s ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),ti&&console.log(d+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let h=a.split(),f=d;for(let p=0;h.forceReduce()&&p<10&&(ti&&console.log(f+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,r));p++)ti&&(f=this.stackID(h)+" -> ");for(let p of a.recoverByInsert(l))ti&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,r);this.stream.end>a.pos?(u==a.pos&&(u++,l=0),a.recoverByDelete(l,u),ti&&console.log(d+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),R2(a,r)):(!o||o.scoree.topRules[a][1]),o=[];for(let a=0;a=0)i(d,l,a[u++]);else{let h=a[u+-d];for(let f=-d;f>0;f--)i(a[u++],l,h);u++}}}this.nodeSet=new Sy(n.map((a,l)=>Zo.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:o[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=x_;let s=jf(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;atypeof a=="number"?new Lc(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let o=new _U(this,e,n,r);for(let i of this.wrappers)o=i(o,e,n,r);return o}getGoto(e,n,r=!1){let o=this.goto;if(n>=o[0])return-1;for(let i=o[n+1];;){let s=o[i++],a=s&1,l=o[i++];if(a&&r)return l;for(let u=i+(s>>1);i0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),o=r?n(r):void 0;for(let i=this.stateSlot(e,1);o==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Bs(this.data,i+2);else break;o=n(Bs(this.data,i+1))}return o}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Bs(this.data,r+2);else break;if(!(this.data[r+2]&1)){let o=this.data[r+1];n.some((i,s)=>s&1&&i==o)||n.push(this.data[r],o)}}return n}configure(e){let n=Object.assign(Object.create(Jp.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let o=e.tokenizers.find(i=>i.from==r);return o?o.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,o)=>{let i=e.specializers.find(a=>a.from==r.external);if(!i)return r;let s=Object.assign(Object.assign({},r),{external:i.to});return n.specializers[o]=N2(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let i of e.split(" ")){let s=n.indexOf(i);s>=0&&(r[s]=!0)}let o=null;for(let i=0;ir)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const $U=O_({String:Be.string,Number:Be.number,"True False":Be.bool,PropertyName:Be.propertyName,Null:Be.null,",":Be.separator,"[ ]":Be.squareBracket,"{ }":Be.brace}),MU=Jp.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[$U],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),TU=qp.define({name:"json",parser:MU.configure({props:[$_.add({Object:f2({except:/^\s*\}/}),Array:f2({except:/^\s*\]/})}),T_.add({"Object Array":EF})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function PU(){return new gF(TU)}const D2=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class au{constructor(e,n,r=0,o=e.length,i,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,o),this.bufferStart=r,this.normalize=i?a=>i(D2(a)):D2,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return bo(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=cy(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=bi(e);let o=this.normalize(n);if(o.length)for(let i=0,s=r;;i++){let a=o.charCodeAt(i),l=this.match(a,s,this.bufferPos+this.bufferStart);if(i==o.length-1){if(l)return this.value=l,this;break}s==r&&ithis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,o=r+n[0].length;if(this.matchPos=Gp(this.text,o+(r==o?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,o,n)))return this.value={from:r,to:o,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||o.to<=n){let a=new Bc(n,e.sliceString(n,r));return fv.set(e,a),a}if(o.from==n&&o.to==r)return o;let{text:i,from:s}=o;return s>n&&(i=e.sliceString(n,s)+i,s=n),o.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,o=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,o,n)))return this.value={from:r,to:o,match:n},this.matchPos=Gp(this.text,o+(r==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Bc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&($E.prototype[Symbol.iterator]=ME.prototype[Symbol.iterator]=function(){return this});function RU(t){try{return new RegExp(t,Ny),!0}catch{return!1}}function Gp(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function ib(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=gr("input",{class:"cm-textfield",name:"line",value:e}),r=gr("form",{class:"cm-gotoLine",onkeydown:i=>{i.keyCode==27?(i.preventDefault(),t.dispatch({effects:Qp.of(!1)}),t.focus()):i.keyCode==13&&(i.preventDefault(),o())},onsubmit:i=>{i.preventDefault(),o()}},gr("label",t.state.phrase("Go to line"),": ",n)," ",gr("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function o(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!i)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,l,u,d,h]=i,f=d?+d.slice(1):0,p=u?+u:a.number;if(u&&h){let v=p/100;l&&(v=v*(l=="-"?-1:1)+a.number/s.doc.lines),p=Math.round(s.doc.lines*v)}else u&&l&&(p=p*(l=="-"?-1:1)+a.number);let m=s.doc.line(Math.max(1,Math.min(s.doc.lines,p))),b=Ae.cursor(m.from+Math.max(0,Math.min(f,m.length)));t.dispatch({effects:[Qp.of(!1),nt.scrollIntoView(b.from,{y:"center"})],selection:b}),t.focus()}return{dom:r}}const Qp=bn.define(),I2=po.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Qp)&&(t=n.value);return t},provide:t=>Dd.from(t,e=>e?ib:null)}),NU=t=>{let e=Nd(t,ib);if(!e){let n=[Qp.of(!0)];t.state.field(I2,!1)==null&&n.push(bn.appendConfig.of([I2,DU])),t.dispatch({effects:n}),e=Nd(t,ib)}return e&&e.dom.querySelector("input").select(),!0},DU=nt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),IU={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zU=at.define({combine(t){return ls(t,IU,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function LU(t){return[VU,UU]}const BU=Lt.mark({class:"cm-selectionMatch"}),FU=Lt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function z2(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Ar.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Ar.Word)}function qU(t,e,n,r){return t(e.sliceDoc(n,n+1))==Ar.Word&&t(e.sliceDoc(r-1,r))==Ar.Word}const UU=Ir.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(zU),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Lt.none;let o=r.main,i,s=null;if(o.empty){if(!e.highlightWordAroundCursor)return Lt.none;let l=n.wordAt(o.head);if(!l)return Lt.none;s=n.charCategorizer(o.head),i=n.sliceDoc(l.from,l.to)}else{let l=o.to-o.from;if(l200)return Lt.none;if(e.wholeWords){if(i=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!(z2(s,n,o.from,o.to)&&qU(s,n,o.from,o.to)))return Lt.none}else if(i=n.sliceDoc(o.from,o.to),!i)return Lt.none}let a=[];for(let l of t.visibleRanges){let u=new au(n.doc,i,l.from,l.to);for(;!u.next().done;){let{from:d,to:h}=u.value;if((!s||z2(s,n,d,h))&&(o.empty&&d<=o.from&&h>=o.to?a.push(FU.range(d,h)):(d>=o.to||h<=o.from)&&a.push(BU.range(d,h)),a.length>e.maxMatches))return Lt.none}}return Lt.set(a)}},{decorations:t=>t.decorations}),VU=nt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),HU=({state:t,dispatch:e})=>{let{selection:n}=t,r=Ae.create(n.ranges.map(o=>t.wordAt(o.head)||Ae.cursor(o.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function WU(t,e){let{main:n,ranges:r}=t.selection,o=t.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let s=!1,a=new au(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new au(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(l=>l.from==a.value.from))continue;if(i){let l=t.wordAt(a.value.from);if(!l||l.from!=a.value.from||l.to!=a.value.to)continue}return a.value}}const KU=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(i=>i.from===i.to))return HU({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(i=>t.sliceDoc(i.from,i.to)!=r))return!1;let o=WU(t,r);return o?(e(t.update({selection:t.selection.addRange(Ae.range(o.from,o.to),!1),effects:nt.scrollIntoView(o.to)})),!0):!1},Ql=at.define({combine(t){return ls(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new sV(e),scrollToMatch:e=>nt.scrollIntoView(e)})}});function JU(t){return t?[Ql.of(t),ab]:ab}class TE{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||RU(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new XU(this):new QU(this)}getCursor(e,n=0,r){let o=e.doc?e:Mn.create({doc:e});return r==null&&(r=o.doc.length),this.regexp?vc(this,o,n,r):gc(this,o,n,r)}}class PE{constructor(e){this.spec=e}}function gc(t,e,n,r){return new au(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:o=>o.toLowerCase(),t.wholeWord?GU(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function GU(t,e){return(n,r,o,i)=>((i>n||i+o.length=n)return null;o.push(r.value)}return o}highlight(e,n,r,o){let i=gc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)o(i.value.from,i.value.to)}}function vc(t,e,n,r){return new $E(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?YU(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Yp(t,e){return t.slice(xo(t,e,!1),e)}function Xp(t,e){return t.slice(e,xo(t,e))}function YU(t){return(e,n,r)=>!r[0].length||(t(Yp(r.input,r.index))!=Ar.Word||t(Xp(r.input,r.index))!=Ar.Word)&&(t(Xp(r.input,r.index+r[0].length))!=Ar.Word||t(Yp(r.input,r.index+r[0].length))!=Ar.Word)}class XU extends PE{nextMatch(e,n,r){let o=vc(this.spec,e,r,e.doc.length).next();return o.done&&(o=vc(this.spec,e,0,n).next()),o.done?null:o.value}prevMatchInRange(e,n,r){for(let o=1;;o++){let i=Math.max(n,r-o*1e4),s=vc(this.spec,e,i,r),a=null;for(;!s.next().done;)a=s.value;if(a&&(i==n||a.from>i+10))return a;if(i==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=n)return null;o.push(r.value)}return o}highlight(e,n,r,o){let i=vc(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!i.next().done;)o(i.value.from,i.value.to)}}const Bd=bn.define(),Dy=bn.define(),Pa=po.define({create(t){return new pv(sb(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Bd)?t=new pv(n.value.create(),t.panel):n.is(Dy)&&(t=new pv(t.query,n.value?Iy:null));return t},provide:t=>Dd.from(t,e=>e.panel)});class pv{constructor(e,n){this.query=e,this.panel=n}}const ZU=Lt.mark({class:"cm-searchMatch"}),eV=Lt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),tV=Ir.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Pa))}update(t){let e=t.state.field(Pa);(e!=t.startState.field(Pa)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Lt.none;let{view:n}=this,r=new os;for(let o=0,i=n.visibleRanges,s=i.length;oi[o+1].from-2*250;)l=i[++o].to;t.highlight(n.state,a,l,(u,d)=>{let h=n.state.selection.ranges.some(f=>f.from==u&&f.to==d);r.add(u,d,h?eV:ZU)})}return r.finish()}},{decorations:t=>t.decorations});function jh(t){return e=>{let n=e.state.field(Pa,!1);return n&&n.query.spec.valid?t(e,n):zy(e)}}const Zp=jh((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let o=Ae.single(r.from,r.to),i=t.state.facet(Ql);return t.dispatch({selection:o,effects:[By(t,r),i.scrollToMatch(o.main,t)],userEvent:"select.search"}),NE(t),!0}),em=jh((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,o=e.prevMatch(n,r,r);if(!o)return!1;let i=Ae.single(o.from,o.to),s=t.state.facet(Ql);return t.dispatch({selection:i,effects:[By(t,o),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),NE(t),!0}),nV=jh((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Ae.create(n.map(r=>Ae.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),rV=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:o}=n.main,i=[],s=0;for(let a=new au(t.doc,t.sliceDoc(r,o));!a.next().done;){if(i.length>1e3)return!1;a.value.from==r&&(s=i.length),i.push(Ae.range(a.value.from,a.value.to))}return e(t.update({selection:Ae.create(i,s),userEvent:"select.search.matches"})),!0},L2=jh((t,{query:e})=>{let{state:n}=t,{from:r,to:o}=n.selection.main;if(n.readOnly)return!1;let i=e.nextMatch(n,r,r);if(!i)return!1;let s=i,a=[],l,u,d=[];if(s.from==r&&s.to==o&&(u=n.toText(e.getReplacement(s)),a.push({from:s.from,to:s.to,insert:u}),s=e.nextMatch(n,s.from,s.to),d.push(nt.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),s){let h=a.length==0||a[0].from>=i.to?0:i.to-i.from-u.length;l=Ae.single(s.from-h,s.to-h),d.push(By(t,s)),d.push(n.facet(Ql).scrollToMatch(l.main,t))}return t.dispatch({changes:a,selection:l,effects:d,userEvent:"input.replace"}),!0}),oV=jh((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(o=>{let{from:i,to:s}=o;return{from:i,to:s,insert:e.getReplacement(o)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:nt.announce.of(r),userEvent:"input.replace.all"}),!0});function Iy(t){return t.state.facet(Ql).createPanel(t)}function sb(t,e){var n,r,o,i,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let u=t.facet(Ql);return new TE({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(o=e==null?void 0:e.literal)!==null&&o!==void 0?o:u.literal,regexp:(i=e==null?void 0:e.regexp)!==null&&i!==void 0?i:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function RE(t){let e=Nd(t,Iy);return e&&e.dom.querySelector("[main-field]")}function NE(t){let e=RE(t);e&&e==t.root.activeElement&&e.select()}const zy=t=>{let e=t.state.field(Pa,!1);if(e&&e.panel){let n=RE(t);if(n&&n!=t.root.activeElement){let r=sb(t.state,e.query.spec);r.valid&&t.dispatch({effects:Bd.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Dy.of(!0),e?Bd.of(sb(t.state,e.query.spec)):bn.appendConfig.of(ab)]});return!0},Ly=t=>{let e=t.state.field(Pa,!1);if(!e||!e.panel)return!1;let n=Nd(t,Iy);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Dy.of(!1)}),!0},iV=[{key:"Mod-f",run:zy,scope:"editor search-panel"},{key:"F3",run:Zp,shift:em,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Zp,shift:em,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ly,scope:"editor search-panel"},{key:"Mod-Shift-l",run:rV},{key:"Mod-Alt-g",run:NU},{key:"Mod-d",run:KU,preventDefault:!0}];class sV{constructor(e){this.view=e;let n=this.query=e.state.field(Pa).query.spec;this.commit=this.commit.bind(this),this.searchField=gr("input",{value:n.search,placeholder:ni(e,"Find"),"aria-label":ni(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=gr("input",{value:n.replace,placeholder:ni(e,"Replace"),"aria-label":ni(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=gr("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=gr("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=gr("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(o,i,s){return gr("button",{class:"cm-button",name:o,onclick:i,type:"button"},s)}this.dom=gr("div",{onkeydown:o=>this.keydown(o),class:"cm-search"},[this.searchField,r("next",()=>Zp(e),[ni(e,"next")]),r("prev",()=>em(e),[ni(e,"previous")]),r("select",()=>nV(e),[ni(e,"all")]),gr("label",null,[this.caseField,ni(e,"match case")]),gr("label",null,[this.reField,ni(e,"regexp")]),gr("label",null,[this.wordField,ni(e,"by word")]),...e.state.readOnly?[]:[gr("br"),this.replaceField,r("replace",()=>L2(e),[ni(e,"replace")]),r("replaceAll",()=>oV(e),[ni(e,"replace all")])],gr("button",{name:"close",onclick:()=>Ly(e),"aria-label":ni(e,"close"),type:"button"},["×"])])}commit(){let e=new TE({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Bd.of(e)}))}keydown(e){Y7(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?em:Zp)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),L2(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(Bd)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ql).top}}function ni(t,e){return t.state.phrase(e)}const kf=30,Sf=/[\s\.,:;?!]/;function By(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(n).to,i=Math.max(r.from,e-kf),s=Math.min(o,n+kf),a=t.state.sliceDoc(i,s);if(i!=r.from){for(let l=0;la.length-kf;l--)if(!Sf.test(a[l-1])&&Sf.test(a[l])){a=a.slice(0,l);break}}return nt.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const aV=nt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ab=[Pa,Gl.low(tV),aV];class DE{constructor(e,n,r,o){this.state=e,this.pos=n,this.explicit=r,this.view=o,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=No(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),o=n.text.slice(r-n.from,this.pos-n.from),i=o.search(IE(e,!1));return i<0?null:{from:r+i,to:this.pos,text:o.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function B2(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function lV(t){let e=Object.create(null),n=Object.create(null);for(let{label:o}of t){e[o[0]]=!0;for(let i=1;itypeof o=="string"?{label:o}:o),[n,r]=e.every(o=>/^\w+$/.test(o.label))?[/\w*$/,/\w+$/]:lV(e);return o=>{let i=o.matchBefore(r);return i||o.explicit?{from:i?i.from:o.pos,options:e,validFor:n}:null}}class F2{constructor(e,n,r,o){this.completion=e,this.source=n,this.match=r,this.score=o}}function Sl(t){return t.selection.main.from}function IE(t,e){var n;let{source:r}=t,o=e&&r[0]!="^",i=r[r.length-1]!="$";return!o&&!i?t:new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const zE=Xa.define();function uV(t,e,n,r){let{main:o}=t.selection,i=n-o.from,s=r-o.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=o&&n!=r&&t.sliceDoc(a.from+i,a.from+s)!=t.sliceDoc(n,r))return{range:a};let l=t.toText(e);return{changes:{from:a.from+i,to:r==o.from?a.to:a.from+s,insert:l},range:Ae.cursor(a.from+i+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const q2=new WeakMap;function dV(t){if(!Array.isArray(t))return t;let e=q2.get(t);return e||q2.set(t,e=cV(t)),e}const tm=bn.define(),Fd=bn.define();class hV{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(_=cy(w))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!y||A==1&&v||S==0&&A!=0)&&(n[h]==w||r[h]==w&&(f=!0)?s[h++]=y:s.length&&(g=!1)),S=A,y+=bi(w)}return h==l&&s[0]==0&&g?this.result(-100+(f?-200:0),s,e):p==l&&m==0?this.ret(-200-e.length+(b==e.length?0:-100),[0,b]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==l?this.ret(-900-e.length,[m,b]):h==l?this.result(-100+(f?-200:0)+-700+(g?0:-1100),s,e):n.length==2?null:this.result((o[0]?-700:0)+-200+-1100,o,e)}result(e,n,r){let o=[],i=0;for(let s of n){let a=s+(this.astral?bi(bo(r,s)):1);i&&o[i-1]==s?o[i-1]=a:(o[i++]=s,o[i++]=a)}return this.ret(e-r.length,o)}}class fV{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:pV,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>U2(e(r),n(r)),optionClass:(e,n)=>r=>U2(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function U2(t,e){return t?e?t+" "+e:t:e}function pV(t,e,n,r,o,i){let s=t.textDirection==Sr.RTL,a=s,l=!1,u="top",d,h,f=e.left-o.left,p=o.right-e.right,m=r.right-r.left,b=r.bottom-r.top;if(a&&f=b||y>e.top?d=n.bottom-e.top:(u="bottom",d=e.bottom-n.top)}let v=(e.bottom-e.top)/i.offsetHeight,g=(e.right-e.left)/i.offsetWidth;return{style:`${u}: ${d/v}px; max-width: ${h/g}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}function mV(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(o=>"cm-completionIcon-"+o)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,o,i){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let u=0;ul&&s.appendChild(document.createTextNode(a.slice(l,d)));let f=s.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(a.slice(d,h))),f.className="cm-completionMatchedText",l=h}return ln.position-r.position).map(n=>n.render)}function mv(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let o=Math.floor(e/n);return{from:o*n,to:(o+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class gV{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let o=e.state.field(n),{options:i,selected:s}=o.open,a=e.state.facet(uo);this.optionContent=mV(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=mv(i.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let d=l.target,h;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(h=/-(\d+)$/.exec(d.id))&&+h[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(uo).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Fd.of(null)})}),this.showOptions(i,o.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=o){let{options:i,selected:s,disabled:a}=r.open;(!o.open||o.open.options!=i)&&(this.range=mv(i.length,s,e.state.facet(uo).maxRenderedOptions),this.showOptions(i,r.id)),this.updateSel(),a!=((n=o.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=mv(n.options.length,n.selected,this.view.state.facet(uo).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:o}=r;if(!o)return;let i=typeof o=="string"?document.createTextNode(o):o(r);if(!i)return;"then"in i?i.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>Fo(this.view.state,s,"completion info")):this.addInfoPane(i,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:o,destroy:i}=e;r.appendChild(o),this.infoDestroy=i||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,o=this.range.from;r;r=r.nextSibling,o++)r.nodeName!="LI"||!r.id?o--:o==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&bV(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),i=this.space;if(!i){let s=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return o.top>Math.min(i.bottom,n.bottom)-10||o.bottomr.from||r.from==0))if(i=f,typeof u!="string"&&u.header)o.appendChild(u.header(u));else{let p=o.appendChild(document.createElement("completion-section"));p.textContent=f}}const d=o.appendChild(document.createElement("li"));d.id=n+"-"+s,d.setAttribute("role","option");let h=this.optionClass(a);h&&(d.className=h);for(let f of this.optionContent){let p=f(a,this.view.state,this.view,l);p&&d.appendChild(p)}}return r.from&&o.classList.add("cm-completionListIncompleteTop"),r.tonew gV(n,t,e)}function bV(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/o)}function V2(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function yV(t,e){let n=[],r=null,o=u=>{n.push(u);let{section:d}=u.completion;if(d){r||(r=[]);let h=typeof d=="string"?d:d.name;r.some(f=>f.name==h)||r.push(typeof d=="string"?{name:h}:d)}},i=e.facet(uo);for(let u of t)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let h of u.result.options)o(new F2(h,u.source,d?d(h):[],1e9-n.length));else{let h=e.sliceDoc(u.from,u.to),f,p=i.filterStrict?new fV(h):new hV(h);for(let m of u.result.options)if(f=p.match(m.label)){let b=m.displayLabel?d?d(m,f.matched):[]:f.matched;o(new F2(m,u.source,b,f.score+(m.boost||0)))}}}if(r){let u=Object.create(null),d=0,h=(f,p)=>{var m,b;return((m=f.rank)!==null&&m!==void 0?m:1e9)-((b=p.rank)!==null&&b!==void 0?b:1e9)||(f.nameh.score-d.score||l(d.completion,h.completion))){let d=u.completion;!a||a.label!=d.label||a.detail!=d.detail||a.type!=null&&d.type!=null&&a.type!=d.type||a.apply!=d.apply||a.boost!=d.boost?s.push(u):V2(u.completion)>V2(a)&&(s[s.length-1]=u),a=u.completion}return s}class kc{constructor(e,n,r,o,i,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=o,this.selected=i,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new kc(this.options,H2(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,o,i,s){if(o&&!s&&e.some(u=>u.isPending))return o.setDisabled();let a=yV(e,n);if(!a.length)return o&&e.some(u=>u.isPending)?o.setDisabled():null;let l=n.facet(uo).selectOnOpen?0:-1;if(o&&o.selected!=l&&o.selected!=-1){let u=o.options[o.selected].completion;for(let d=0;dd.hasResult()?Math.min(u,d.from):u,1e8),create:CV,above:i.aboveCursor},o?o.timestamp:Date.now(),l,!1)}map(e){return new kc(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new kc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class nm{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new nm(kV,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(uo),i=(r.override||n.languageDataAt("autocomplete",Sl(n)).map(dV)).map(l=>(this.active.find(d=>d.source==l)||new wi(l,this.active.some(d=>d.state!=0)?1:0)).update(e,r));i.length==this.active.length&&i.every((l,u)=>l==this.active[u])&&(i=this.active);let s=this.open,a=e.effects.some(l=>l.is(Fy));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||i.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!wV(i,this.active)||a?s=kc.build(i,n,this.id,s,r,a):s&&s.disabled&&!i.some(l=>l.isPending)&&(s=null),!s&&i.every(l=>!l.isPending)&&i.some(l=>l.hasResult())&&(i=i.map(l=>l.hasResult()?new wi(l.source,0):l));for(let l of e.effects)l.is(BE)&&(s=s&&s.setSelected(l.value,this.id));return i==this.active&&s==this.open?this:new nm(i,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xV:jV}}function wV(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const kV=[];function LE(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(zE);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class wi{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=LE(e,n),o=this;(r&8||r&16&&this.touches(e))&&(o=new wi(o.source,0)),r&4&&o.state==0&&(o=new wi(this.source,1)),o=o.updateFor(e,r);for(let i of e.effects)if(i.is(tm))o=new wi(o.source,1,i.value);else if(i.is(Fd))o=new wi(o.source,0);else if(i.is(Fy))for(let s of i.value)s.source==o.source&&(o=s);return o}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Sl(e.state))}}class Fc extends wi{constructor(e,n,r,o,i,s){super(e,3,n),this.limit=r,this.result=o,this.from=i,this.to=s}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let o=this.result;o.map&&!e.changes.empty&&(o=o.map(o,e.changes));let i=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=Sl(e.state);if(a>s||!o||n&2&&(Sl(e.startState)==this.from||an.map(e))}}),BE=bn.define(),Yo=po.define({create(){return nm.start()},update(t,e){return t.update(e)},provide:t=>[Qm.from(t,e=>e.tooltip),nt.contentAttributes.from(t,e=>e.attrs)]});function qy(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Yo).active.find(o=>o.source==e.source);return r instanceof Fc?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},uV(t.state,n,r.from,r.to)),{annotations:zE.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const CV=vV(Yo,qy);function Cf(t,e="option"){return n=>{let r=n.state.field(Yo,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:BE.of(a)}),!0}}const OV=t=>{let e=t.state.field(Yo,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Yo,!1)?(t.dispatch({effects:tm.of(!0)}),!0):!1,_V=t=>{let e=t.state.field(Yo,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Fd.of(null)}),!0)};class EV{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const AV=50,$V=1e3,MV=Ir.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Yo).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Yo),n=t.state.facet(uo);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Yo)==e)return;let r=t.transactions.some(i=>{let s=LE(i,n);return s&8||(i.selection||i.docChanged)&&!(s&3)});for(let i=0;iAV&&Date.now()-s.time>$V){for(let a of s.context.abortListeners)try{a()}catch(l){Fo(this.view.state,l)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(i=>i.effects.some(s=>s.is(tm)))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(i=>i.isPending&&!this.running.some(s=>s.active.source==i.source))?setTimeout(()=>this.startUpdate(),o):-1,this.composing!=0)for(let i of t.transactions)i.isUserEvent("input.type")?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Yo);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(uo).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Sl(e),r=new DE(e,n,t.explicit,this.view),o=new EV(t,r);this.running.push(o),Promise.resolve(t.source(r)).then(i=>{o.context.aborted||(o.done=i||null,this.scheduleAccept())},i=>{this.view.dispatch({effects:Fd.of(null)}),Fo(this.view.state,i)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(uo).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(uo),r=this.view.state.field(Yo);for(let o=0;oa.source==i.active.source);if(s&&s.isPending)if(i.done==null){let a=new wi(i.active.source,0);for(let l of i.updates)a=a.update(l,n);a.isPending||e.push(a)}else this.startQuery(s)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Fy.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Yo,!1);if(e&&e.tooltip&&this.view.state.facet(uo).closeOnBlur){let n=e.open&&g_(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Fd.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:tm.of(!1)}),20),this.composing=0}}}),TV=typeof navigator=="object"&&/Win/.test(navigator.platform),PV=Gl.highest(nt.domEventHandlers({keydown(t,e){let n=e.state.field(Yo,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(TV&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],o=n.active.find(s=>s.source==r.source),i=r.completion.commitCharacters||o.result.commitCharacters;return i&&i.indexOf(t.key)>-1&&qy(e,r),!1}})),RV=nt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),qd={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},wl=bn.define({map(t,e){let n=e.mapPos(t,-1,Lo.TrackAfter);return n??void 0}}),Uy=new class extends Nl{};Uy.startSide=1;Uy.endSide=-1;const FE=po.define({create(){return Dn.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(wl)&&(t=t.update({add:[Uy.range(n.value,n.value+1)]}));return t}});function NV(){return[IV,FE]}const gv="()[]{}<>";function qE(t){for(let e=0;e{if((DV?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(r.length>2||r.length==2&&bi(bo(r,0))==1||e!=o.from||n!=o.to)return!1;let i=BV(t.state,r);return i?(t.dispatch(i),!0):!1}),zV=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=UE(t,t.selection.main.head).brackets||qd.brackets,o=null,i=t.changeByRange(s=>{if(s.empty){let a=FV(t.doc,s.head);for(let l of r)if(l==a&&sg(t.doc,s.head)==qE(bo(l,0)))return{changes:{from:s.head-l.length,to:s.head+l.length},range:Ae.cursor(s.head-l.length)}}return{range:o=s}});return o||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!o},LV=[{key:"Backspace",run:zV}];function BV(t,e){let n=UE(t,t.selection.main.head),r=n.brackets||qd.brackets;for(let o of r){let i=qE(bo(o,0));if(e==o)return i==o?VV(t,o,r.indexOf(o+o+o)>-1,n):qV(t,o,i,n.before||qd.before);if(e==i&&VE(t,t.selection.main.from))return UV(t,o,i)}return null}function VE(t,e){let n=!1;return t.field(FE).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function sg(t,e){let n=t.sliceString(e,e+2);return n.slice(0,bi(bo(n,0)))}function FV(t,e){let n=t.sliceString(e-2,e);return bi(bo(n,0))==n.length?n:n.slice(1)}function qV(t,e,n,r){let o=null,i=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:wl.of(s.to+e.length),range:Ae.range(s.anchor+e.length,s.head+e.length)};let a=sg(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:wl.of(s.head+e.length),range:Ae.cursor(s.head+e.length)}:{range:o=s}});return o?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function UV(t,e,n){let r=null,o=t.changeByRange(i=>i.empty&&sg(t.doc,i.head)==n?{changes:{from:i.head,to:i.head+n.length,insert:n},range:Ae.cursor(i.head+n.length)}:r={range:i});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function VV(t,e,n,r){let o=r.stringPrefixes||qd.stringPrefixes,i=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:wl.of(a.to+e.length),range:Ae.range(a.anchor+e.length,a.head+e.length)};let l=a.head,u=sg(t.doc,l),d;if(u==e){if(K2(t,l))return{changes:{insert:e+e,from:l},effects:wl.of(l+e.length),range:Ae.cursor(l+e.length)};if(VE(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:Ae.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(d=J2(t,l-2*e.length,o))>-1&&K2(t,d))return{changes:{insert:e+e+e+e,from:l},effects:wl.of(l+e.length),range:Ae.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=Ar.Word&&J2(t,l,o)>-1&&!HV(t,l,e,o))return{changes:{insert:e+e,from:l},effects:wl.of(l+e.length),range:Ae.cursor(l+e.length)}}return{range:i=a}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function K2(t,e){let n=No(t).resolveInner(e+1);return n.parent&&n.from==e}function HV(t,e,n,r){let o=No(t).resolveInner(e,-1),i=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),l=a.indexOf(n);if(!l||l>-1&&r.indexOf(a.slice(0,l))>-1){let d=o.firstChild;for(;d&&d.from==o.from&&d.to-d.from>n.length+l;){if(t.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let u=o.to==e&&o.parent;if(!u)break;o=u}return!1}function J2(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Ar.Word)return e;for(let o of n){let i=e-o.length;if(t.sliceDoc(i,e)==o&&r(t.sliceDoc(i-1,i))!=Ar.Word)return i}return-1}function WV(t={}){return[PV,Yo,uo.of(t),MV,KV,RV]}const HE=[{key:"Ctrl-Space",run:W2},{mac:"Alt-`",run:W2},{key:"Escape",run:_V},{key:"ArrowDown",run:Cf(!0)},{key:"ArrowUp",run:Cf(!1)},{key:"PageDown",run:Cf(!0,"page")},{key:"PageUp",run:Cf(!1,"page")},{key:"Enter",run:OV}],KV=Gl.highest(Ip.computeN([uo],t=>t.facet(uo).defaultKeymap?[HE]:[]));function JV(t,e=t.state){const n=new Set;for(const{from:r,to:o}of t.visibleRanges){let i=r;for(;i<=o;){const s=e.doc.lineAt(i);n.has(s)||n.add(s),i=s.to+1}}return n}function lb(t){const e=t.selection.main.head;return t.doc.lineAt(e)}function G2(t,e){let n=0;e:for(let r=0;r=i.level&&this.markerType!=="codeOnly"?this.set(e,0,o.level):o.empty&&o.level===0&&i.level!==0?this.set(e,0,0):i.level>o.level?this.set(e,0,o.level+1):this.set(e,0,i.level)}const n=G2(e.text,this.state.tabSize),r=Math.floor(n/this.unitWidth);return this.set(e,n,r)}closestNonEmpty(e,n){let r=e.number+n;for(;n===-1?r>=1:r<=this.state.doc.lines;){if(this.has(r)){const s=this.get(r);if(!s.empty)return s}const i=this.state.doc.line(r);if(i.text.trim().length){const s=G2(i.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(i,s,a)}r+=n}const o=this.state.doc.line(n===-1?1:this.state.doc.lines);return this.set(o,0,0)}findAndSetActiveLines(){const e=lb(this.state);if(!this.has(e))return;let n=this.get(e);if(this.has(n.line.number+1)){const i=this.get(n.line.number+1);i.level>n.level&&(n=i)}if(this.has(n.line.number-1)){const i=this.get(n.line.number-1);i.level>n.level&&(n=i)}if(n.level===0)return;n.active=n.level;let r,o;for(r=n.line.number;r>1;r--){if(!this.has(r-1))continue;const i=this.get(r-1);if(i.level0&&l.push(Of("--indent-marker-bg-color",r,e,a,u)),l.push(Of("--indent-marker-active-bg-color",o,e,s-1,1)),s!==i&&l.push(Of("--indent-marker-bg-color",r,e,s,i-s))}else l.push(Of("--indent-marker-bg-color",r,e,a,i-a));return l.join(",")}class XV{constructor(e){this.view=e,this.unitWidth=Ga(e.state),this.currentLineNumber=lb(e.state).number,this.generate(e.state)}update(e){const n=Ga(e.state),r=n!==this.unitWidth;r&&(this.unitWidth=n);const o=lb(e.state).number,i=o!==this.currentLineNumber;this.currentLineNumber=o;const s=e.state.facet(rm).highlightActiveBlock&&i;(e.docChanged||e.viewportChanged||r||s)&&this.generate(e.state)}generate(e){const n=new os,r=JV(this.view,e),{hideFirstIndent:o,markerType:i,thickness:s,activeThickness:a}=e.facet(rm),l=new GV(r,e,this.unitWidth,i);for(const u of r){const d=l.get(u.number);if(!(d!=null&&d.level))continue;const h=YV(d,this.unitWidth,o,s,a);n.add(u.from,u.from,Lt.line({class:"cm-indent-markers",attributes:{style:`--indent-markers: ${h}`}}))}this.decorations=n.finish()}}function ZV(t={}){return[rm.of(t),QV(t.colors),Ir.fromClass(XV,{decorations:e=>e.decorations})]}class eH{constructor(e){this.view=e,this.indentUnit=Ga(e.state),this.initialPaddingLeft=null,this.isChrome=window==null?void 0:window.navigator.userAgent.includes("Chrome"),this.generate(e.state)}update(e){const n=Ga(e.state);(n!==this.indentUnit||e.docChanged||e.viewportChanged)&&(this.indentUnit=n,this.generate(e.state))}generate(e){const n=new os;this.initialPaddingLeft?this.addStyleToBuilder(n,e,this.initialPaddingLeft):this.view.requestMeasure({read:r=>{const o=r.contentDOM.querySelector(".cm-line");o&&(this.initialPaddingLeft=window.getComputedStyle(o).getPropertyValue("padding-left"),this.addStyleToBuilder(n,r.state,this.initialPaddingLeft)),this.decorations=n.finish()}}),this.decorations=n.finish()}addStyleToBuilder(e,n,r){const o=this.getVisibleLines(n);for(const i of o){const{numColumns:s,containsTab:a}=this.numColumns(i.text,n.tabSize),l=`calc(${s+this.indentUnit}ch + ${r})`,u=this.isChrome?`calc(-${s+this.indentUnit}ch - ${a?1:0}px)`:`-${s+this.indentUnit}ch`;e.add(i.from,i.from,Lt.line({attributes:{style:`padding-left: ${l}; text-indent: ${u};`}}))}}getVisibleLines(e){const n=new Set;let r=null;for(const{from:o,to:i}of this.view.visibleRanges){let s=o;for(;s<=i;){const a=e.doc.lineAt(s);r!==a&&(n.add(a),r=a),s=a.to+1}}return n}numColumns(e,n){let r=0,o=!1;e:for(let i=0;it.decorations})];var Q2,lc,nH=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],rH=["mainAxis","crossAxis","limiter"];function WE(t,e){if(t==null)return{};var n,r,o=function(s,a){if(s==null)return{};var l={};for(var u in s)if({}.hasOwnProperty.call(s,u)){if(a.includes(u))continue;l[u]=s[u]}return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r1&&arguments[1]!==void 0&&arguments[1],o=Jo(t);return r||(o.equals=Hy),Su&&On!==null&&On.l!==null&&((n=(e=On.l).s)!==null&&n!==void 0?n:e.s=[]).push(o),o}function U(t){return function(e){return sr!==null&&2&sr.f&&(_s===null?_s=[e]:_s.push(e)),e}(Wy(t,arguments.length>1&&arguments[1]!==void 0&&arguments[1]))}function si(t,e){return j(t,_i(()=>c(t))),e}function j(t,e){return sr!==null&&Ah()&&18&sr.f&&(_s===null||!_s.includes(t))&&function(){if(Nt){var n=new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`");throw n.name="Svelte error",n}throw new Error("state_unsafe_mutation")}(),fb(t,e)}function fb(t,e){if(!t.equals(e)&&(t.v=e,t.version=pA(),XE(t,lu),Ah()&&Fn!==null&&Fn.f&ei&&!(Fn.f&Yl)&&(Oo!==null&&Oo.includes(t)?(Ei(Fn,lu),dg(Fn)):Na===null?function(i){Na=i}([t]):Na.push(t)),Nt&&qc.size>0)){var n=Array.from(qc),r=Cl;am(!0);try{for(var o of n)o.f&ei&&Ei(o,Cu),Zl(o)&&Eu(o)}finally{am(r)}qc.clear()}return e}function XE(t,e){var n=t.reactions;if(n!==null)for(var r=Ah(),o=n.length,i=0;ir.line)return i.component}else if(n===0)return null}return null}var Xs,ZE,eA,bv=Symbol("ADD_OWNER");function vH(t,e){var n=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t&&!(arguments.length>2&&arguments[2]!==void 0&&arguments[2])){var r=Da,o=t[Sc];if(o&&!Ky(o,r)){var i=Jy(o);e[Ui]===r[Ui]||n||function(s,a,l){Nt?console.warn(`%c[svelte] ownership_invalid_binding +%c`.concat(s," passed a value to ").concat(a," with `bind:`, but the value is owned by ").concat(l,". Consider creating a binding between ").concat(l," and ").concat(s),kh,Sh):console.warn("ownership_invalid_binding")}(r[Ui],e[Ui],i[Ui])}}pb(t,e,new Set)}function nk(t,e){if(e.owners!==null)for(;t;){if(t.owners===null){e.owners=null;break}for(var n of t.owners)e.owners.add(n);t=t.parent}}function pb(t,e,n){var r=t==null?void 0:t[Sc];if(r)"owners"in r&&r.owners!=null&&r.owners.add(e);else if(t&&typeof t=="object"){if(n.has(t))return;if(n.add(t),bv in t&&t[bv])Xl(()=>{t[bv](e)});else{var o=Ud(t);if(o===Object.prototype)for(var i in t)pb(t[i],e,n);else if(o===Array.prototype)for(var s=0;s1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t!="object"||t===null||Os in t)return t;var n=Ud(t);if(n!==sH&&n!==aH)return t;var r,o=new Map,i=Ch(t),s=Jo(0);return i&&o.set("length",Jo(t.length)),Nt&&((r={parent:e,owners:null}).owners=e===null?On!==null?new Set([On.function]):null:new Set),new Proxy(t,{defineProperty(a,l,u){"value"in u&&u.configurable!==!1&&u.enumerable!==!1&&u.writable!==!1||function(){if(Nt){var h=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.");throw h.name="Svelte error",h}throw new Error("state_descriptors_fixed")}();var d=o.get(l);return d===void 0?(d=Jo(u.value),o.set(l,d)):j(d,bc(u.value,r)),!0},deleteProperty(a,l){var u=o.get(l);if(u===void 0)l in a&&o.set(l,Jo(Wo));else{if(i&&typeof l=="string"){var d=o.get("length"),h=Number(l);Number.isInteger(h)&&h=y.v&&j(y,k+1)}rk(s)}return!0},ownKeys(a){c(s);var l=Reflect.ownKeys(a).filter(h=>{var f=o.get(h);return f===void 0||f.v!==Wo});for(var[u,d]of o)d.v===Wo||u in a||l.push(u);return l},setPrototypeOf(){(function(){if(Nt){var a=new Error("state_prototype_fixed\nCannot set prototype of `$state` object");throw a.name="Svelte error",a}throw new Error("state_prototype_fixed")})()}})}function rk(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;j(t,t.v+e)}function cc(t){return t!==null&&typeof t=="object"&&Os in t?t[Os]:t}function bH(){if(Xs===void 0){Xs=window;var t=Element.prototype,e=Node.prototype;ZE=Ys(e,"firstChild").get,eA=Ys(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0,Nt&&(t.__svelte_meta=null,function(){var n=Array.prototype,r=Array.__svelte_cleanup;r&&r();var{indexOf:o,lastIndexOf:i,includes:s}=n;n.indexOf=function(a,l){var u=o.call(this,a,l);return u===-1&&o.call(cc(this),cc(a),l)!==-1&&vv("array.indexOf(...)"),u},n.lastIndexOf=function(a,l){var u=i.call(this,a,l??this.length-1);return u===-1&&i.call(cc(this),cc(a),l??this.length-1)!==-1&&vv("array.lastIndexOf(...)"),u},n.includes=function(a,l){var u=s.call(this,a,l);return u||s.call(cc(this),cc(a),l)&&vv("array.includes(...)"),u},Array.__svelte_cleanup=()=>{n.indexOf=o,n.lastIndexOf=i,n.includes=s}}())}}function lg(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return document.createTextNode(t)}function ai(t){return ZE.call(t)}function cg(t){return eA.call(t)}function V(t,e){return ai(t)}function tt(t,e){var n=ai(t);return n instanceof Comment&&n.data===""?cg(n):n}function ee(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=t;e--;)n=cg(n);return n}function om(t){var e=2050;Fn===null?e|=Oh:Fn.f|=GE;var n,r=sr!==null&&2&sr.f?sr:null,o={children:null,ctx:On,deps:null,equals:YE,f:e,fn:t,reactions:null,v:null,version:0,parent:r??Fn};return r!==null&&((n=r.children)!==null&&n!==void 0?n:r.children=[]).push(o),o}function Fe(t){var e=om(t);return e.equals=Hy,e}function mb(t){var e=t.children;if(e!==null){t.children=null;for(var n=0;n3&&arguments[3]!==void 0)||arguments[3],o=!!(64&t),i=Fn;if(Nt)for(;i!==null&&i.f&JE;)i=i.parent;var s={ctx:On,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|lu,first:null,fn:e,last:null,next:null,parent:o?null:i,prev:null,teardown:null,transitions:null,version:0};if(Nt&&(s.component_function=Da),n){var a=Cl;try{am(!0),Eu(s),s.f|=32768}catch(d){throw tl(s),d}finally{am(a)}}else e!==null&&dg(s);if(!(n&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&!(s.f&GE))&&!o&&r&&(i!==null&&function(d,h){var f=h.last;f===null?h.last=h.first=d:(f.next=d,d.prev=f,h.last=d)}(s,i),sr!==null&&2&sr.f)){var l,u=sr;((l=u.children)!==null&&l!==void 0?l:u.children=[]).push(s)}return s}function oA(t){var e=Ou(8,null,!1);return Ei(e,ei),e.teardown=t,e}function gb(t){rA("$effect");var e=Fn!==null&&!!(Fn.f&Yl)&&On!==null&&!On.m;if(Nt&&Ra(t,"name",{value:"$effect"}),!e)return ho(t);var n,r=On;((n=r.e)!==null&&n!==void 0?n:r.e=[]).push({fn:t,effect:Fn,reaction:sr})}function ho(t){return Ou(4,t,!1)}function ie(t,e,n,r){var o=On,i={effect:null,ran:!1};if(o.l.r1.push(i),Nt&&n!==void 0)var s=function(l,u){var d;if(!(!Nt||l===void 0)){var h=(d=Da)===null||d===void 0?void 0:d[Ui],f=h&&"".concat(h,":").concat(l,":").concat(u);return function(p){return p==null?void 0:p.replace(/\//g,"/​")}(f)}}(n,r),a=ck(t);i.effect=Xl(()=>{if(t(),!i.ran)if(i.ran=!0,j(o.l.r2,!0),Nt&&s){var l=ck(()=>_i(e));for(var u of l)a.has(u)||iH(s)}else _i(e)})}function En(){var t=On;Xl(()=>{if(c(t.l.r2)){for(var e of t.l.r1){var n=e.effect;n.f&ei&&Ei(n,Cu),Zl(n)&&Eu(n),e.ran=!1}t.l.r2.v=!1}})}function Xl(t){return Ou(8,t,!0)}function $e(t){return Nt&&Ra(t,"name",{value:"{expression}"}),_u(t)}function _u(t){return Ou(24|(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0),t,!0)}function Qa(t){return Ou(40,t,!0,!(arguments.length>1&&arguments[1]!==void 0)||arguments[1])}function iA(t){var e=t.teardown;if(e!==null){var n=Yy,r=sr;ik(!0),Ya(null);try{e.call(null)}finally{ik(n),Ya(r)}}}function sA(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var n=0;n1&&arguments[1]!==void 0&&arguments[1],n=t.first;for(t.first=t.last=null;n!==null;){var r=n.next;tl(n,e),n=r}}function tl(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=!1;if((e||524288&t.f)&&t.nodes_start!==null){for(var r=t.nodes_start,o=t.nodes_end;r!==null;){var i=r===o?null:cg(r);r.remove(),r=i}n=!0}aA(t,e&&!n),sA(t),Jd(t,0),Ei(t,_h);var s=t.transitions;if(s!==null)for(var a of s)a.stop();iA(t);var l=t.parent;l!==null&&l.first!==null&&lA(t),Nt&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function lA(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Vd(t,e){var n=[];Qy(t,n,!0),cA(n,()=>{tl(t),e&&e()})}function cA(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function Qy(t,e,n){if(!(t.f&qs)){if(t.f^=qs,t.transitions!==null)for(var r of t.transitions)(r.is_global||n)&&e.push(r);for(var o=t.first;o!==null;){var i=o.next;Qy(o,e,!!(o.f&ag||o.f&Yl)&&n),o=i}}}function im(t){uA(t,!0)}function uA(t,e){if(t.f&qs){Zl(t)&&Eu(t),t.f^=qs;for(var n=t.first;n!==null;){var r=n.next;uA(n,!!(n.f&ag||n.f&Yl)&&e),n=r}if(t.transitions!==null)for(var o of t.transitions)(o.is_global||e)&&o.in()}}var sm=!1,vb=[];function dA(){sm=!1;var t=vb.slice();vb=[],db(t)}function ug(t){sm||(sm=!0,queueMicrotask(dA)),vb.push(t)}function Eh(t){if(Nt){var e=new Error("lifecycle_outside_component\n`".concat(t,"(...)` can only be used during component initialisation"));throw e.name="Svelte error",e}throw new Error("lifecycle_outside_component")}var hA=0,ok=new WeakSet,sp=!1,ap=hA,Hd=!1,Uc=null,Cl=!1,Yy=!1;function am(t){Cl=t}function ik(t){Yy=t}var xl=[],Vc=0,Wd=[],sr=null;function Ya(t){sr=t}var Fn=null;function Qi(t){Fn=t}var _s=null,Oo=null,ri=0,Na=null,fA=0,Cc=!1,jl=null,On=null,Da=null;function pA(){return++fA}function Ah(){return!Su||On!==null&&On.l===null}function Zl(t){var e=t.f;if(e&lu)return!0;if(e&Cu){var n=t.deps,r=!!(e&Oh);if(n!==null){var o;if(e&hb){for(o=0;ot.version)return!0}}r||Ei(t,ei)}return!1}function sk(t,e){for(var n=e;n!==null;){if(128&n.f)try{return void n.fn(t)}catch{n.f^=128}n=n.parent}throw sp=!1,t}function ak(t){return!(t.f&_h||t.parent!==null&&128&t.parent.f)}function Kd(t,e,n,r){var o;if(sp){if(n===null&&(sp=!1),ak(e))throw t}else if(n!==null&&(sp=!0),Nt&&r!==null&&t instanceof Error&&!ok.has(t)){ok.add(t);var i=[],s=(o=e.fn)===null||o===void 0?void 0:o.name;s&&i.push(s);for(var a=r;a!==null;){if(Nt){var l,u=(l=a.function)===null||l===void 0?void 0:l[Ui];if(u){var d=u.split("/").pop();i.push(d)}}a=a.p}var h=/Firefox/.test(navigator.userAgent)?" ":" ";Ra(t,"message",{value:t.message+` +`.concat(i.map(g=>` +`.concat(h,"in ").concat(g)).join(""),` +`)}),Ra(t,"component_stack",{value:i});var f=t.stack;if(f){for(var p=f.split(` +`),m=[],b=0;b0)for(d.length=ri+Oo.length,h=0;ht.fn)),Wd=[]}function mA(){if(Vc>1e3){Vc=0;try{(function(){if(Nt){var t=new Error(`effect_update_depth_exceeded +Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops`);throw t.name="Svelte error",t}throw new Error("effect_update_depth_exceeded")})()}catch(t){if(Nt&&Ra(t,"stack",{value:""}),Uc===null)throw Nt&&lk(),t;if(Nt)try{Kd(t,Uc,null,null)}catch(e){throw lk(),e}else Kd(t,Uc,null,null)}}Vc++}function gA(t){var e=t.length;if(e!==0){mA();var n=Cl;Cl=!0;try{for(var r=0;r1001)){var t=xl;xl=[],gA(t),Hd||(Vc=0,Uc=null,Nt&&(Wd=[]))}}function dg(t){ap===hA&&(Hd||(Hd=!0,queueMicrotask(xH))),Uc=t;for(var e=t;e.parent!==null;){var n=(e=e.parent).f;if(96&n){if(!(n&ei))return;e.f^=ei}}xl.push(e)}function vA(t,e){var n=t.first,r=[];e:for(;n!==null;){var o=n.f,i=!!(o&Yl),s=i&&!!(o&ei),a=n.next;if(!(s||o&qs))if(8&o){if(i)n.f^=ei;else try{Zl(n)&&Eu(n)}catch(f){Kd(f,n,null,n.ctx)}var l=n.first;if(l!==null){n=l;continue}}else 4&o&&r.push(n);if(a===null)for(var u=n.parent;u!==null;){if(t===u)break e;var d=u.next;if(d!==null){n=d;continue e}u=u.parent}n=a}for(var h=0;h0||r.length>0)&&bA(),Vc=0,Uc=null,Nt&&(Wd=[]),o}finally{ap=e,xl=n}}function Pr(){return yA.apply(this,arguments)}function yA(){return(yA=gt(function*(){yield Promise.resolve(),bA()})).apply(this,arguments)}function c(t){var e=t.f,n=!!(2&e);if(n&&e&_h){var r=tA(t);return Gy(t),r}if(jl!==null&&jl.add(t),sr!==null){_s!==null&&_s.includes(t)&&function(){if(Nt){var f=new Error("state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state");throw f.name="Svelte error",f}throw new Error("state_unsafe_local_read")}();var o=sr.deps;Oo===null&&o!==null&&o[ri]===t?ri++:Oo===null?Oo=[t]:Oo.push(t),Na!==null&&Fn!==null&&Fn.f&ei&&!(Fn.f&Yl)&&Na.includes(t)&&(Ei(Fn,lu),dg(Fn))}else if(n&&t.deps===null)for(var i=t,s=i.parent,a=i;s!==null;){if(!(2&s.f)){var l,u,d,h=s;((l=h.deriveds)===null||l===void 0||!l.includes(a))&&((d=(u=h).deriveds)!==null&&d!==void 0?d:u.deriveds=[]).push(a);break}a=s,s=s.parent}return n&&Zl(i=t)&&nA(i),t.v}function ck(t){var e,n=jl,r=jl=new Set;try{if(_i(t),n!==null)for(e of jl)n.add(e)}finally{jl=n}return r}function _i(t){var e=sr;try{return sr=null,t()}finally{sr=e}}var jH=-7169;function Ei(t,e){t.f=t.f&jH|e}function nl(t){var e=wA("getContext").get(t);if(Nt){var n=On.function;n&&vH(e,n,!0)}return e}function wA(t){var e,n;return On===null&&Eh(t),(n=(e=On).c)!==null&&n!==void 0?n:e.c=new Map(function(r){for(var o=r.p;o!==null;){var i=o.c;if(i!==null)return i;o=o.p}return null}(On)||void 0)}function uk(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=c(t),r=e===1?n++:n--;return j(t,n),r}function xt(t){var e=arguments.length>2?arguments[2]:void 0;On={p:On,c:null,e:null,m:!1,s:t,x:null,l:null},Su&&!(arguments.length>1&&arguments[1]!==void 0&&arguments[1])&&(On.l={s:null,u:null,r1:[],r2:Jo(!1)}),Nt&&(On.function=e,Da=e)}function jt(t){var e=On;if(e!==null){t!==void 0&&(e.x=t);var n,r,o=e.e;if(o!==null){var i=Fn,s=sr;e.e=null;try{for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:new Set;if(!(typeof t!="object"||t===null||t instanceof EventTarget||e.has(t))){for(var n in e.add(t),t instanceof Date&&t.getTime(),t)try{yb(t[n],e)}catch{}var r=Ud(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){var o=KE(r);for(var i in o){var s=o[i].get;if(s)try{s.call(t)}catch{}}}}}if(Nt){let t=function(e){var n;e in globalThis||Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(n!==void 0)return n;(function(r){if(Nt){var o=new Error("rune_outside_svelte\nThe `".concat(r,"` rune is only available inside `.svelte` and `.svelte.js/ts` files"));throw o.name="Svelte error",o}throw new Error("rune_outside_svelte")})(e)},set:r=>{n=r}})};t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var dk=!1;function xA(t){var e=sr,n=Fn;Ya(null),Qi(null);try{return t()}finally{Ya(e),Qi(n)}}function kH(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;t.addEventListener(e,()=>xA(n));var o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),dk||(dk=!0,document.addEventListener("reset",i=>{Promise.resolve().then(()=>{if(!i.defaultPrevented)for(var s of i.target.elements){var a;(a=s.__on_r)===null||a===void 0||a.call(s)}})},{capture:!0}))}var jA=new Set,wb=new Set;function kA(t,e,n,r){function o(i){if(r.capture||rd.call(e,i),!i.cancelBubble)return xA(()=>n.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?ug(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Oe(t,e,n,r,o){var i={capture:r,passive:o},s=kA(t,e,n,i);e!==document.body&&e!==window&&e!==document||oA(()=>{e.removeEventListener(t,s,i)})}function rd(t){var e,n=this,r=n.ownerDocument,o=t.type,i=((e=t.composedPath)===null||e===void 0?void 0:e.call(t))||[],s=i[0]||t.target,a=0,l=t.__root;if(l){var u=i.indexOf(l);if(u!==-1&&(n===document||n===window))return void(t.__root=n);var d=i.indexOf(n);if(d===-1)return;u<=d&&(a=u)}if((s=i[a]||t.target)!==n){Ra(t,"currentTarget",{configurable:!0,get:()=>s||r});var h=sr,f=Fn;Ya(null),Qi(null);try{for(var p,m=[];s!==null;){var b=s.assignedSlot||s.parentNode||s.host||null;try{var v=s["__"+o];if(v!==void 0&&!s.disabled)if(Ch(v)){var[g,...y]=v;g.apply(s,[t,...y])}else v.call(s,t)}catch(w){p?m.push(w):p=w}if(t.cancelBubble||b===n||b===null)break;s=b}if(p){var k=function(w){queueMicrotask(()=>{throw w})};for(var S of m)k(S);throw p}}finally{t.__root=n,delete t.currentTarget,Ya(h),Qi(f)}}}function Xy(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function Bl(t,e){var n=Fn;n.nodes_start===null&&(n.nodes_start=t,n.nodes_end=e)}function ue(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("");return()=>{n===void 0&&(n=Xy(i?t:""+t),r||(n=ai(n)));var s=o?document.importNode(n,!0):n.cloneNode(!0);return r?Bl(ai(s),s.lastChild):Bl(s,s),s}}function rl(t,e){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"svg",o=!t.startsWith(""),i=!!(1&e),s="<".concat(r,">").concat(o?t:""+t,"");return()=>{if(!n){var a=ai(Xy(s));if(i)for(n=document.createDocumentFragment();ai(a);)n.appendChild(ai(a));else n=ai(a)}var l=n.cloneNode(!0);return i?Bl(ai(l),l.lastChild):Bl(l,l),l}}function Po(){var t=lg((arguments.length>0&&arguments[0]!==void 0?arguments[0]:"")+"");return Bl(t,t),t}function un(){var t=document.createDocumentFragment(),e=document.createComment(""),n=lg();return t.append(e,n),Bl(e,n),t}function H(t,e){t!==null&&t.before(e)}var SH=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"],CH={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject"},OH=["touchstart","touchmove"];function _H(t){return OH.includes(t)}function Mt(t,e){var n,r=e==null?"":typeof e=="object"?e+"":e;r!==((n=t.__t)!==null&&n!==void 0?n:t.__t=t.nodeValue)&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function EH(t,e){return function(n,r){var{target:o,anchor:i,props:s={},events:a,context:l,intro:u=!0}=r;bH();var d=new Set,h=m=>{for(var b=0;b{tl(b)}}(()=>{var m=i??o.appendChild(lg());return Qa(()=>{l&&(xt({}),On.c=l),a&&(s.$$events=a),f=n(m,s)||{},l&&jt()}),()=>{for(var b of d){o.removeEventListener(b,rd);var v=uc.get(b);--v==0?(document.removeEventListener(b,rd),uc.delete(b)):uc.set(b,v)}var g;wb.delete(h),xb.delete(f),m!==i&&((g=m.parentNode)===null||g===void 0||g.removeChild(m))}});return xb.set(f,p),f}(t,e)}var uc=new Map,xb=new WeakMap;function AH(t){var e=xb.get(t);e?e():Nt&&(Nt?console.warn(`%c[svelte] lifecycle_double_unmount +%cTried to unmount a component that was not mounted`,kh,Sh):console.warn("lifecycle_double_unmount"))}function ge(t,e){var n=t,r=null,o=null,i=null,s=!1,a=function(u){s=!0,l(!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],u)},l=(u,d)=>{i!==(i=u)&&(i?(r?im(r):d&&(r=Qa(()=>d(n))),o&&Vd(o,()=>{o=null})):(o?im(o):d&&(o=Qa(()=>d(n))),r&&Vd(r,()=>{r=null})))};_u(()=>{s=!1,e(a),s||l(null,null)},arguments.length>2&&arguments[2]!==void 0&&arguments[2]?ag:0)}function SA(t,e,n){var r,o=t,i=Wo,s=Ah()?dH:Vy;_u(()=>{s(i,i=e())&&(r&&Vd(r),r=Qa(()=>n(o)))})}function Dr(t,e){return e}function Or(t,e,n,r,o){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,s=t,a={flags:e,items:new Map,first:null};!(4&e)||(s=t.appendChild(lg()));var l=null,u=!1;_u(()=>{var d=n(),h=Ch(d)?d:d==null?[]:ub(d),f=h.length;u&&f===0||(u=f===0,function(p,m,b,v,g,y,k){var S,w,_,A,D,E,z=!!(8&g),G=!!(3&g),F=p.length,se=m.items,pe=m.first,re=pe,Z=null,he=[],be=[];if(z)for(E=0;E0){var L=4&g&&F===0?b:null;if(z){for(E=0;E0&&vt.length===0&&W!==null;if(Ge){var Ue=W.parentNode;Ue.textContent="",Ue.append(W),it.clear(),pa(ce,ae[0].prev,ae[rt-1].next)}cA(vt,()=>{for(var ft=0;ft{if(w!==void 0)for(D of w){var ce;(ce=D.a)===null||ce===void 0||ce.apply()}}),Fn.first=m.first&&m.first.e,Fn.last=Z&&Z.e}(h,a,s,o,e,!!(sr.f&qs),r),i!==null&&(f===0?l?im(l):l=Qa(()=>i(s)):l!==null&&Vd(l,()=>{l=null})),n())})}function $H(t,e,n,r){1&r&&fb(t.v,e),2&r?fb(t.i,n):t.i=n}function MH(t,e,n,r,o,i,s,a,l){var u=1&l?16&l?Jo(o):Wy(o):o,d=2&l?Jo(s):s,h={i:d,v:u,k:i,a:null,e:null,prev:n,next:r};try{return h.e=Qa(()=>a(t,u,d),hH),h.e.prev=n&&n.e,h.e.next=r&&r.e,n===null?e.first=h:(n.next=h,n.e.next=h.e),r!==null&&(r.prev=h,r.e.prev=h.e),h}finally{}}function hk(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==r;){var s=cg(i);o.before(i),i=s}}function pa(t,e,n){e===null?t.first=n:(e.next=n,e.e.next=n&&n.e),n!==null&&(n.prev=e,n.e.prev=e&&e.e)}function CA(t,e,n,r,o){var i,s=t,a="";_u(()=>{var l;a!==(a=(l=e())!==null&&l!==void 0?l:"")&&(i!==void 0&&(tl(i),i=void 0),a!==""&&(i=Qa(()=>{var u=a+"";n&&(u="".concat(u,""));var d=Xy(u);if((n||r)&&(d=ai(d)),Bl(ai(d),d.lastChild),n||r)for(;ai(d);)s.before(ai(d));else s.before(d)})))})}function xr(t,e,n,r,o){var i,s=(i=e.$$slots)===null||i===void 0?void 0:i[n],a=!1;s===!0&&(s=e[n==="default"?"children":n],a=!0),s===void 0?o!==null&&o(t):s(t,a?()=>r:r)}function OA(t,e,n){var r,o,i=t;_u(()=>{r!==(r=e())&&(o&&(Vd(o),o=null),r&&(o=Qa(()=>n(i,r))))},ag)}function To(t,e,n){ho(()=>{var r=_i(()=>e(t,n==null?void 0:n())||{});if(n&&r!=null&&r.update){var o=!1,i={};Xl(()=>{var s=n();B(s),o&&Vy(i,s)&&(i=s,r.update(s))}),o=!0}if(r!=null&&r.destroy)return()=>r.destroy()})}function Fl(t,e){var n,r=(n=t.__attributes)!==null&&n!==void 0?n:t.__attributes={};r.value!==(r.value=e)&&(t.value!==e||e===0&&t.nodeName==="PROGRESS")&&(t.value=e)}function Tn(t,e,n,r){var o,i=(o=t.__attributes)!==null&&o!==void 0?o:t.__attributes={};i[e]!==(i[e]=n)&&(e==="style"&&"__styles"in t&&(t.__styles={}),e==="loading"&&(t[uH]=n),n==null?t.removeAttribute(e):typeof n!="string"&&_A(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function lp(t,e,n,r){var o,i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],s=arguments.length>5&&arguments[5]!==void 0&&arguments[5],a=e||{},l=t.tagName==="OPTION";for(var u in e)u in n||(n[u]=null);r!==void 0&&(n.class=n.class?n.class+" "+r:r);var d,h,f,p,m=_A(t),b=(o=t.__attributes)!==null&&o!==void 0?o:t.__attributes={},v=function(y){var k=n[y];if(l&&y==="value"&&k==null)return t.value=t.__value="",a[y]=k,0;if(k===(d=a[y])||(a[y]=k,(h=y[0]+y[1])==="$$"))return 0;if(h==="on"){var S={},w="$$"+y,_=y.slice(2);if(f=function(A){return SH.includes(A)}(_),function(A){return A.endsWith("capture")&&A!=="gotpointercapture"&&A!=="lostpointercapture"}(_)&&(_=_.slice(0,-7),S.capture=!0),!f&&d){if(k!=null)return 0;t.removeEventListener(_,a[w],S),a[w]=null}if(k!=null)if(f)t["__".concat(_)]=k,function(A){for(var D=0;D{document.activeElement===E&&A.focus()})}}(t,!!k):y==="__value"||y==="value"&&k!=null?t.value=t[y]=t.__value=k:(p=y,i||(p=function(A){var D;return A=A.toLowerCase(),(D=CH[A])!==null&&D!==void 0?D:A}(p)),k!=null||s?m.includes(p)&&(s||typeof k!="string")?t[p]=k:typeof k!="function"&&Tn(t,p,k):(b[y]=null,t.removeAttribute(y)));y==="style"&&"__styles"in t&&(t.__styles={})};for(var g in n)v(g);return a}var fk=new Map;function _A(t){var e,n=fk.get(t.nodeName);if(n)return n;fk.set(t.nodeName,n=[]);for(var r=Ud(t),o=Element.prototype;o!==r;){for(var i in e=KE(r))e[i].set&&n.push(i);r=Ud(r)}return n}function ui(t,e){var n=t.__className,r=function(o){return o??""}(e);n!==r&&(e==null?t.removeAttribute("class"):t.className=r,t.__className=r)}function lt(t,e,n){if(n){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function Hc(t,e,n,r){var o,i=(o=t.__styles)!==null&&o!==void 0?o:t.__styles={};i[e]!==n&&(i[e]=n,n==null?t.style.removeProperty(e):t.style.setProperty(e,n,""))}function lm(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,r=Ah();kH(t,"input",o=>{Nt&&t.type==="checkbox"&&ek();var i,s=o?t.defaultValue:t.value;s=wv(t)?xv(s):s,n(s),r&&s!==(s=e())&&(t.value=(i=s)!==null&&i!==void 0?i:"")}),_i(e)==null&&t.value&&n(wv(t)?xv(t.value):t.value),Xl(()=>{Nt&&t.type==="checkbox"&&ek();var o=e();wv(t)&&o===xv(t.value)||(t.type!=="date"||o||t.value)&&o!==t.value&&(t.value=o??"")})}function wv(t){var e=t.type;return e==="number"||e==="range"}function xv(t){return t===""?null:+t}function zt(t,e,n){var r=Ys(t,e);r&&r.set&&(t[e]=n,oA(()=>{t[e]=null}))}function pk(t,e){return t===e||(t==null?void 0:t[Os])===e}function ar(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return ho(()=>{var r,o;return Xl(()=>{r=o,o=[],_i(()=>{t!==n(...o)&&(e(t,...o),r&&pk(n(...r),t)&&e(null,...r))})}),()=>{ug(()=>{o&&pk(n(...o),t)&&e(null,...o)})}}),t}function Bi(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&arguments[0]!==void 0&&arguments[0],e=On,n=e.l.u;if(n){var r,o=()=>B(e.s);if(t){var i=0,s={},a=om(()=>{var l=!1,u=e.s;for(var d in u)u[d]!==s[d]&&(s[d]=u[d],l=!0);return l&&i++,i});o=()=>c(a)}n.b.length&&(r=()=>{mk(e,o),db(n.b)},rA("$effect.pre"),Nt&&Ra(r,"name",{value:"$effect.pre"}),Xl(r)),gb(()=>{var l=_i(()=>n.m.map(lH));return()=>{for(var u of l)typeof u=="function"&&u()}}),n.a.length&&gb(()=>{mk(e,o),db(n.a)})}}function mk(t,e){if(t.l.s)for(var n of t.l.s)c(n);e()}function hg(t){var e=Jo(0);return function(){return arguments.length===1?(j(e,c(e)+1),arguments[0]):(c(e),t())}}function od(t,e){var n,r=(n=t.$$events)===null||n===void 0?void 0:n[e.type],o=Ch(r)?r.slice():r==null?[]:[r];for(var i of o)i.call(this,e)}function ko(t){On===null&&Eh("onMount"),Su&&On.l!==null?EA(On).m.push(t):gb(()=>{var e=_i(t);if(typeof e=="function")return e})}function Ai(t){On===null&&Eh("onDestroy"),ko(()=>()=>_i(t))}function TH(){var t=On;return t===null&&Eh("createEventDispatcher"),(e,n,r)=>{var o,i=(o=t.s.$$events)===null||o===void 0?void 0:o[e];if(i){var s=Ch(i)?i.slice():[i],a=function(u,d){var{bubbles:h=!1,cancelable:f=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return new CustomEvent(u,{detail:d,bubbles:h,cancelable:f})}(e,n,r);for(var l of s)l.call(t.x,a);return!a.defaultPrevented}return!0}}function PH(t){On===null&&Eh("beforeUpdate"),On.l===null&&function(e){if(Nt){var n=new Error("lifecycle_legacy_only\n`".concat(e,"(...)` cannot be used in runes mode"));throw n.name="Svelte error",n}throw new Error("lifecycle_legacy_only")}("beforeUpdate"),EA(On).b.push(t)}function EA(t){var e,n=t.l;return(e=n.u)!==null&&e!==void 0?e:n.u={a:[],b:[],m:[]}}var _f=!1,RH={get(t,e){if(!t.exclude.includes(e))return c(t.version),e in t.special?t.special[e]():t.props[e]},set:(t,e,n)=>(e in t.special||(t.special[e]=x({get[e](){return t.props[e]}},e,4)),t.special[e](n),uk(t.version),!0),getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),uk(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))};function Ef(t,e){return new Proxy({props:t,exclude:e,special:{},version:Jo(0)},RH)}var NH={get(t,e){for(var n=t.props.length;n--;){var r=t.props[n];if(Hu(r)&&(r=r()),typeof r=="object"&&r!==null&&e in r)return r[e]}},set(t,e,n){for(var r=t.props.length;r--;){var o=t.props[r];Hu(o)&&(o=o());var i=Ys(o,e);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){for(var n=t.props.length;n--;){var r=t.props[n];if(Hu(r)&&(r=r()),typeof r=="object"&&r!==null&&e in r){var o=Ys(r,e);return o&&!o.configurable&&(o.configurable=!0),o}}},has(t,e){if(e===Os||e===QE)return!1;for(var n of t.props)if(Hu(n)&&(n=n()),n!=null&&e in n)return!0;return!1},ownKeys(t){var e=[];for(var n of t.props)for(var r in Hu(n)&&(n=n()),n)e.includes(r)||e.push(r);return e}};function Ia(){for(var t=arguments.length,e=new Array(t),n=0;nt[e]):s=t[e];var f,p=Os in t||QE in t,m=(o=(i=Ys(t,e))===null||i===void 0?void 0:i.set)!==null&&o!==void 0?o:p&&u&&e in t?E=>t[e]=E:void 0,b=r,v=!0,g=!1,y=()=>(g=!0,v&&(v=!1,b=d?_i(r):r),b);if(s===void 0&&r!==void 0&&(m&&l&&function(E){if(Nt){var z=new Error("props_invalid_value\nCannot do `bind:".concat(E,"={undefined}` when `").concat(E,"` has a fallback value"));throw z.name="Svelte error",z}throw new Error("props_invalid_value")}(e),s=y(),m&&m(s)),l)f=()=>{var E=t[e];return E===void 0?y():(v=!0,g=!1,E)};else{var k=gk(()=>(a?om:Fe)(()=>t[e]));k.f|=cH,f=()=>{var E=c(k);return E!==void 0&&(b=void 0),E===void 0?b:E}}if(!(4&n))return f;if(m){var S=t.$$legacy;return function(E,z){return arguments.length>0?(l&&z&&!S&&!h||m(z?f():E),E):f()}}var w=!1,_=!1,A=Wy(s),D=gk(()=>om(()=>{var E=f(),z=c(A);return w?(w=!1,_=!0,z):(_=!1,A.v=E)}));return a||(D.equals=Hy),function(E,z){if(jl!==null&&(w=_,f(),c(A)),arguments.length>0){var G=z?c(D):l&&u?bc(E):E;return D.equals(G)||(w=!0,j(A,G),g&&b!==void 0&&(b=G),_i(()=>c(D))),E}return c(D)}}function ro(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(r){var o=function(i){try{if(typeof window<"u"&&window.localStorage!==void 0)return window.localStorage[i]}catch{}}("debug");return o!=null&&o.endsWith("*")?r.startsWith(o.slice(0,-1)):r===o}(t);if(!e)return DH;var n=function(r){for(var o=0,i=0;i9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if(typeof t=="bigint")return jb(Number(t));try{var e=t&&t.valueOf();if(e!==t)return jb(e)}catch{return!1}return!1}function AA(t){(Af=Af||window.document.createElement("div")).style.color="",Af.style.color=t;var e=Af.style.color;return e!==""?e.replace(/\s+/g,"").toLowerCase():void 0}var Af=void 0;function BH(t){return typeof t=="string"&&t.length<99&&!!AA(t)}function ew(t,e){if(typeof t=="number"||typeof t=="string"||typeof t=="boolean"||t===void 0)return typeof t;if(typeof t=="bigint")return"number";if(t===null)return"null";if(Array.isArray(t))return"array";if(In(t))return"object";var n=e.stringify(t);return n&&Zy(n)?"number":n==="true"||n==="false"?"boolean":n==="null"?"null":"unknown"}var FH=/^https?:\/\/\S+$/;function fg(t){return typeof t=="string"&&FH.test(t)}function Au(t,e){if(t==="")return"";var n=t.trim();return n==="null"?null:n==="true"||n!=="false"&&(Zy(n)?e.parse(n):t)}var qH=[];function bk(t,e){if(t.length!==e.length)return!1;for(var n=0;n1&&arguments[1]!==void 0&&arguments[1],n={};if(!Array.isArray(t))throw new TypeError("Array expected");function r(s,a){(!Array.isArray(s)&&!In(s)||e&&a.length>0)&&(n[yt(a)]=!0),In(s)&&Object.keys(s).forEach(l=>{r(s[l],a.concat(l))})}for(var o=Math.min(t.length,1e4),i=0;ie?t.slice(0,e):t}function yk(t){return De({},t)}function wk(t){return Object.values(t)}function xk(t,e,n,r){var o=t.slice(0),i=o.splice(e,n);return o.splice.apply(o,[e+r,0,...i]),o}function UH(t,e,n){return t.slice(0,e).concat(n).concat(t.slice(e))}function $h(t,e){try{return e.parse(t)}catch{return e.parse(Ss(t))}}function TA(t,e){try{return $h(t,e)}catch{return}}function pg(t,e){t=t.replace(RA,"");try{return e(t)}catch{}try{return e("{"+t+"}")}catch{}try{return e("["+t+"]")}catch{}throw new Error("Failed to parse partial JSON")}function PA(t){t=t.replace(RA,"");try{return Ss(t)}catch{}try{var e=Ss("["+t+"]");return e.substring(1,e.length-1)}catch{}try{var n=Ss("{"+t+"}");return n.substring(1,n.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var RA=/,\s*$/;function cu(t,e){var n=kk.exec(e);if(n){var r=fo(n[2]),o=function(p,m){for(var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p.length,g=0,y=b;y"line ".concat(o+1," column ").concat(i+1))}}var s=KH.exec(e),a=s?fo(s[1]):void 0,l=a!==void 0?a-1:void 0,u=JH.exec(e),d=u?fo(u[1]):void 0,h=d!==void 0?d-1:void 0,f=l!==void 0&&h!==void 0?function(p,m,b){for(var v=p.indexOf(` +`),g=1;g1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:JSON;return Gd(t)?t:{text:n.stringify(t.json,null,e)}}function jk(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:JSON;return Qd(t)?t:{json:e.parse(t.text)}}function Sb(t,e,n){return VH(t,e,n).text}function HH(t,e){return WH(t,e)>e}function WH(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0;if(Gd(t))return t.text.length;var n=t.json,r=0;return function o(i){if(Array.isArray(i)){if((r+=i.length-1+2)>e)return;for(var s=0;se)return}else if(In(i)){var a=Object.keys(i);r+=2+a.length+(a.length-1);for(var l=0;lNA(zA(String(t))),unescapeValue:t=>LA(DA(t))},XH={escapeValue:t=>zA(String(t)),unescapeValue:t=>LA(t)},ZH={escapeValue:t=>NA(String(t)),unescapeValue:t=>DA(t)},eW={escapeValue:t=>String(t),unescapeValue:t=>t};function NA(t){return t.replace(/[^\x20-\x7F]/g,e=>{var n;return e==="\b"||e==="\f"||e===` +`||e==="\r"||e===" "?e:"\\u"+("000"+((n=e.codePointAt(0))===null||n===void 0?void 0:n.toString(16))).slice(-4)})}function DA(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,e=>{try{var n=JSON.parse('"'+e+'"');return IA[n]||n}catch{return e}})}var IA={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},tW={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +`,"\\r":"\r","\\t":" "};function zA(t){return t.replace(/["\b\f\n\r\t\\]/g,e=>IA[e]||e)}function LA(t){return t.replace(/\\["bfnrt\\]/g,e=>tW[e]||e)}function mg(t){return typeof t!="string"?String(t):t.endsWith(` +`)?t+` +`:t}function BA(t,e){return $u(t,n=>n.nodeName.toUpperCase()===e.toUpperCase())}function $a(t,e,n){return $u(t,r=>function(o,i,s){return typeof o.getAttribute=="function"&&o.getAttribute(i)===s}(r,e,n))}function $u(t,e){return!!nw(t,e)}function nw(t,e){for(var n=t;n&&!e(n);)n=n.parentNode;return n}function Mh(t){var e,n;return(e=t==null||(n=t.ownerDocument)===null||n===void 0?void 0:n.defaultView)!==null&&e!==void 0?e:void 0}function rw(t){var e=Mh(t),n=e==null?void 0:e.document.activeElement;return!!n&&$u(n,r=>r===t)}function FA(t,e){return nw(t,n=>n.nodeName===e)}function kv(t){return $a(t,"data-type","selectable-key")?Gn.key:$a(t,"data-type","selectable-value")?Gn.value:$a(t,"data-type","insert-selection-area-inside")?Gn.inside:$a(t,"data-type","insert-selection-area-after")?Gn.after:Gn.multi}function Cb(t){return encodeURIComponent(yt(t))}function qA(t){var e,n=nw(t,o=>!(o==null||!o.hasAttribute)&&o.hasAttribute("data-path")),r=(e=n==null?void 0:n.getAttribute("data-path"))!==null&&e!==void 0?e:void 0;return r?ji(decodeURIComponent(r)):void 0}function nW(t){var{allElements:e,currentElement:n,direction:r,hasPrio:o=()=>!0,margin:i=10}=t,s=L6(e.filter(function(g){var y=g.getBoundingClientRect();return y.width>0&&y.height>0}),l),a=l(n);function l(g){var y=g.getBoundingClientRect();return{x:y.left+y.width/2,y:y.top+y.height/2,rect:y,element:g}}function u(g,y){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=g.x-y.x,w=(g.y-y.y)*k;return Math.sqrt(S*S+w*w)}var d=g=>u(g,a);if(r==="Left"||r==="Right"){var h=r==="Left"?s.filter(g=>{return y=a,g.rect.left+i{return y=a,g.rect.right>y.rect.right+i;var y}),f=h.filter(g=>{return y=g,k=a,Math.abs(y.y-k.y)u(g,a,10));return p==null?void 0:p.element}if(r==="Up"||r==="Down"){var m=r==="Up"?s.filter(g=>{return y=a,g.y+i{return y=a,g.y>y.y+i;var y}),b=m.filter(g=>o(g.element)),v=Kh(b,d)||Kh(m,d);return v==null?void 0:v.element}}function ow(){var t,e,n,r;return typeof navigator<"u"&&(t=(e=(n=navigator)===null||n===void 0||(n=n.platform)===null||n===void 0?void 0:n.toUpperCase().includes("MAC"))!==null&&e!==void 0?e:(r=navigator)===null||r===void 0||(r=r.userAgentData)===null||r===void 0||(r=r.platform)===null||r===void 0?void 0:r.toUpperCase().includes("MAC"))!==null&&t!==void 0&&t}function oa(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+",n=[];iw(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:ow)&&n.push("Ctrl"),t.altKey&&n.push("Alt"),t.shiftKey&&n.push("Shift");var r=t.key.length===1?t.key.toUpperCase():t.key;return r in rW||n.push(r),n.join(e)}function iw(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ow;return t.ctrlKey||t.metaKey&&e()}var rW={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0};function It(t,e){e===void 0&&(e={});var n=e.insertAt;if(t&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}It(`.jse-absolute-popup.svelte-1r8q3m8 { + position: relative; + left: 0; + top: 0; + width: 0; + height: 0; + z-index: 1001; +} +.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input:where(.svelte-1r8q3m8) { + position: fixed; + left: 0; + top: 0; + width: 0; + height: 0; + padding: 0; + margin: 0; + border: none; + outline: none; + overflow: hidden; +} +.jse-absolute-popup.svelte-1r8q3m8 .jse-absolute-popup-content:where(.svelte-1r8q3m8) { + position: absolute; +}`);var oW=ue('
'),iW=ue('
');function sW(t,e){xt(e,!1);var n=x(e,"popup",8),r=x(e,"closeAbsolutePopup",8),o=U(),i=U();function s(h){n().options&&n().options.closeOnOuterClick&&!$u(h.target,f=>f===c(o))&&r()(n().id)}function a(h){oa(h)==="Escape"&&(h.preventDefault(),h.stopPropagation(),r()(n().id))}ko(function(){c(i)&&c(i).focus()}),_t();var l=iW();Oe("mousedown",Xs,function(h){s(h)},!0),Oe("keydown",Xs,a,!0),Oe("wheel",Xs,function(h){s(h)},!0);var u=V(l),d=h=>{var f=oW(),p=Fe(()=>function(b,v){var g=b.getBoundingClientRect(),{left:y,top:k,positionAbove:S,positionLeft:w}=function(){if(v.anchor){var{anchor:_,width:A=0,height:D=0,offsetTop:E=0,offsetLeft:z=0,position:G}=v,{left:F,top:se,bottom:pe,right:re}=_.getBoundingClientRect(),Z=G==="top"||se+D>window.innerHeight&&se>D,he=G==="left"||F+A>window.innerWidth&&F>A;return{left:he?re-z:F+z,top:Z?se-E:pe+E,positionAbove:Z,positionLeft:he}}if(typeof v.left=="number"&&typeof v.top=="number"){var{left:be,top:fe,width:J=0,height:I=0}=v;return{left:be,top:fe,positionAbove:fe+I>window.innerHeight&&fe>I,positionLeft:be+J>window.innerWidth&&be>J}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}();return(S?"bottom: ".concat(g.top-k,"px;"):"top: ".concat(k-g.top,"px;"))+(w?"right: ".concat(g.left-y,"px;"):"left: ".concat(y-g.left,"px;"))}(c(o),n().options)),m=V(f);ar(m,b=>j(i,b),()=>c(i)),OA(ee(m,2),()=>n().component,(b,v)=>{v(b,Ia(()=>n().props))}),$e(()=>Tn(f,"style",c(p))),H(h,f)};ge(u,h=>{c(o)&&h(d)}),ar(l,h=>j(o,h),()=>c(o)),Oe("mousedown",l,function(h){h.stopPropagation()}),Oe("keydown",l,a),H(t,l),jt()}var aW=ue(" ",1);function Ob(t,e){xt(e,!1);var n,r,o=ro("jsoneditor:AbsolutePopup"),i=U([],!0);function s(u){var d=c(i).findIndex(f=>f.id===u);if(d!==-1){var h=c(i)[d];h.options.onClose&&h.options.onClose(),j(i,c(i).filter(f=>f.id!==u))}}n="absolute-popup",r={openAbsolutePopup:function(u,d,h){o("open...",d,h);var f={id:Oc(),component:u,props:d||{},options:h||{}};return j(i,[...c(i),f]),f.id},closeAbsolutePopup:s},wA("setContext").set(n,r),ie(()=>c(i),()=>{o("popups",c(i))}),En(),_t(!0);var a=aW(),l=tt(a);Or(l,1,()=>c(i),Dr,(u,d)=>{sW(u,{get popup(){return c(d)},closeAbsolutePopup:s})}),xr(ee(l,2),e,"default",{},null),H(t,a),jt()}function Th(t,e){for(var n=new Set(e),r=t.replace(/ \(copy( \d+)?\)$/,""),o=t,i=1;n.has(o);){var s="copy"+(i>1?" "+i:"");o="".concat(r," (").concat(s,")"),i++}return o}function Yd(t,e){var n=e-3;return t.length>e?t.substring(0,n)+"...":t}function lW(t){if(t==="")return"";var e=t.toLowerCase();if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;if(e!=="undefined"){var n=Number(t),r=parseFloat(t);return isNaN(n)||isNaN(r)?t:n}}var cW={id:"jsonquery",name:"JSONQuery",description:` +

+ Enter a JSON Query function to filter, sort, or transform the data. + You can use functions like get, filter, + sort, pick, groupBy, uniq, etcetera. + Example query: filter(.age >= 18) +

+`,createQuery:function(t,e){var{filter:n,sort:r,projection:o}=e,i=[];n&&n.path&&n.relation&&n.value&&i.push(["filter",[(s=n.relation,FC("1 ".concat(s," 1"))[0]),$f(n.path),lW(n.value)]]);var s;return r&&r.path&&r.direction&&i.push(["sort",$f(r.path),r.direction==="desc"?"desc":"asc"]),o&&o.paths&&(o.paths.length>1?i.push(["pick",...o.paths.map($f)]):i.push(["map",$f(o.paths[0])])),jR(["pipe",...i])},executeQuery:function(t,e){return e.trim()!==""?kR(t,e):t}};function $f(t){return["get",...t]}var uW=rl("");function dW(t,e){xt(e,!1);var n=870711,r=U(""),o=x(e,"data",8);function i(a){if(!a||!a.raw)return"";var l=a.raw,u={};return l=l.replace(/\s(?:xml:)?id=["']?([^"')\s]+)/g,(d,h)=>{var f="fa-".concat((n+=1).toString(16));return u[h]=f,' id="'.concat(f,'"')}),l=l.replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,(d,h,f,p)=>{var m=h||p;return m&&u[m]?"#".concat(u[m]):d}),l}ie(()=>B(o()),()=>{j(r,i(o()))}),En();var s=uW();CA(V(s),()=>c(r),!0,!1),H(t,s),jt()}It(` + .fa-icon.svelte-1mc5hvj { + display: inline-block; + fill: currentColor; + } + .fa-flip-horizontal.svelte-1mc5hvj { + transform: scale(-1, 1); + } + .fa-flip-vertical.svelte-1mc5hvj { + transform: scale(1, -1); + } + .fa-spin.svelte-1mc5hvj { + animation: svelte-1mc5hvj-fa-spin 1s 0s infinite linear; + } + .fa-inverse.svelte-1mc5hvj { + color: #fff; + } + .fa-pulse.svelte-1mc5hvj { + animation: svelte-1mc5hvj-fa-spin 1s infinite steps(8); + } + @keyframes svelte-1mc5hvj-fa-spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } +`);var hW=rl(""),fW=rl(""),pW=rl(""),mW=rl("",1);function vn(t,e){var n=Ef(e,["children","$$slots","$$events","$$legacy"]),r=Ef(n,["class","data","scale","spin","inverse","pulse","flip","label","style"]);xt(e,!1);var o=x(e,"class",8,""),i=x(e,"data",8),s=U(),a=x(e,"scale",8,1),l=x(e,"spin",8,!1),u=x(e,"inverse",8,!1),d=x(e,"pulse",8,!1),h=x(e,"flip",8,void 0),f=x(e,"label",8,""),p=x(e,"style",8,""),m=U(10),b=U(10),v=U(),g=U();function y(){var S=1;return a()!==void 0&&(S=Number(a())),isNaN(S)||S<=0?(console.warn('Invalid prop: prop "scale" should be a number over 0.'),1):1*S}function k(){return c(s)?Math.max(c(s).width,c(s).height)/16:1}ie(()=>(B(i()),B(p()),B(a())),()=>{j(s,function(S){var w;if(S){if(!("definition"in S)){if("iconName"in S&&"icon"in S){S.iconName;var[_,A,,,D]=S.icon;w={width:_,height:A,paths:(Array.isArray(D)?D:[D]).map(E=>({d:E}))}}else w=S[Object.keys(S)[0]];return w}console.error("`import faIconName from '@fortawesome/package-name/faIconName` not supported - Please use `import { faIconName } from '@fortawesome/package-name/faIconName'` instead")}}(i())),p(),a(),j(m,c(s)?c(s).width/k()*y():0),j(b,c(s)?c(s).height/k()*y():0),j(v,function(){var S="";p()!==null&&(S+=p());var w=y();return w===1?S.length===0?"":S:(S===""||S.endsWith(";")||(S+="; "),"".concat(S,"font-size: ").concat(w,"em"))}()),j(g,c(s)?"0 0 ".concat(c(s).width," ").concat(c(s).height):"0 0 ".concat(c(m)," ").concat(c(b)))}),En(),_t(),function(S,w){var _,A=Ef(w,["children","$$slots","$$events","$$legacy"]),D=Ef(A,["class","width","height","box","spin","inverse","pulse","flip","style","label"]),E=x(w,"class",8,""),z=x(w,"width",8),G=x(w,"height",8),F=x(w,"box",8,"0 0 0 0"),se=x(w,"spin",8,!1),pe=x(w,"inverse",8,!1),re=x(w,"pulse",8,!1),Z=x(w,"flip",8,"none"),he=x(w,"style",8,""),be=x(w,"label",8,""),fe=hW();xr(V(fe),w,"default",{},null),$e(()=>{var J;_=lp(fe,_,De({version:"1.1",class:"fa-icon ".concat((J=E())!==null&&J!==void 0?J:""),width:z(),height:G(),"aria-label":be(),role:be()?"img":"presentation",viewBox:F(),style:he()},D),"svelte-1mc5hvj",!0),lt(fe,"fa-spin",se()),lt(fe,"fa-pulse",re()),lt(fe,"fa-inverse",pe()),lt(fe,"fa-flip-horizontal",Z()==="horizontal"),lt(fe,"fa-flip-vertical",Z()==="vertical")}),H(S,fe)}(t,Ia({get label(){return f()},get width(){return c(m)},get height(){return c(b)},get box(){return c(g)},get style(){return c(v)},get spin(){return l()},get flip(){return h()},get inverse(){return u()},get pulse(){return d()},get class(){return o()}},()=>r,{children:(S,w)=>{var _=un();xr(tt(_),e,"default",{},A=>{var D=mW(),E=tt(D);Or(E,1,()=>{var se;return((se=c(s))===null||se===void 0?void 0:se.paths)||[]},Dr,(se,pe)=>{var re,Z=fW();$e(()=>re=lp(Z,re,De({},c(pe)),void 0,!0)),H(se,Z)});var z=ee(E);Or(z,1,()=>{var se;return((se=c(s))===null||se===void 0?void 0:se.polygons)||[]},Dr,(se,pe)=>{var re,Z=pW();$e(()=>re=lp(Z,re,De({},c(pe)),void 0,!0)),H(se,Z)});var G=ee(z),F=se=>{dW(se,{get data(){return c(s)},set data(pe){j(s,pe)},$$legacy:!0})};ge(G,se=>{var pe;(pe=c(s))!==null&&pe!==void 0&&pe.raw&&se(F)}),H(A,D)}),H(S,_)},$$slots:{default:!0}})),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-boolean-toggle.svelte-1ryp01u { + padding: 0; + margin: 1px 0 0; + vertical-align: top; + display: inline-flex; + color: var(--jse-value-color-boolean, #ff8c00); +} + +.jse-boolean-toggle.svelte-1ryp01u:not(.jse-readonly) { + cursor: pointer; +}`);var gW=ue('');function vW(t,e){xt(e,!1);var n=x(e,"path",9),r=x(e,"value",9),o=x(e,"readOnly",9),i=x(e,"onPatch",9),s=x(e,"focus",9);_t(!0);var a=gW(),l=V(a),u=Fe(()=>r()===!0?qC:UC);vn(l,{get data(){return c(u)}}),$e(()=>{Tn(a,"aria-checked",r()===!0),Tn(a,"title",o()?"Boolean value ".concat(r()):"Click to toggle this boolean value"),lt(a,"jse-readonly",o())}),Oe("mousedown",a,function(d){d.stopPropagation(),o()||(i()([{op:"replace",path:yt(n()),value:!r()}]),s()())}),H(t,a),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-color-picker-popup.svelte-s1wu8v .picker_wrapper.popup, +.jse-color-picker-popup.svelte-s1wu8v .picker_wrapper.popup .picker_arrow::before, +.jse-color-picker-popup.svelte-s1wu8v .picker_wrapper.popup .picker_arrow::after { + background: var(--jse-color-picker-background, var(--jse-panel-background, #ebebeb)); + line-height: normal; +} +.jse-color-picker-popup.svelte-s1wu8v .picker_slider, +.jse-color-picker-popup.svelte-s1wu8v .picker_sl, +.jse-color-picker-popup.svelte-s1wu8v .picker_editor input, +.jse-color-picker-popup.svelte-s1wu8v .picker_sample, +.jse-color-picker-popup.svelte-s1wu8v .picker_done button { + box-shadow: var(--jse-color-picker-border-box-shadow, #cbcbcb 0 0 0 1px); +} +.jse-color-picker-popup.svelte-s1wu8v .picker_editor input { + background: var(--jse-background-color, #fff); + color: var(--jse-text-color, #4d4d4d); +} +.jse-color-picker-popup.svelte-s1wu8v .picker_done button { + background: var(--jse-button-background, #e0e0e0); + color: var(--jse-button-color, var(--jse-text-color, #4d4d4d)); +} +.jse-color-picker-popup.svelte-s1wu8v .picker_done button:hover { + background: var(--jse-button-background-highlight, #e7e7e7); +}`);var bW=ue('
');function yW(t,e){xt(e,!1);var n=x(e,"color",8),r=x(e,"onChange",8),o=x(e,"showOnTop",8),i=U(),s=()=>{};ko(gt(function*(){var l,u=new((l=yield h3(()=>import("./vanilla-picker-B6E6ObS_.js"),[]))===null||l===void 0?void 0:l.default)({parent:c(i),color:n(),popup:o()?"top":"bottom",onDone(d){var h=d.rgba[3]===1?d.hex.substring(0,7):d.hex;r()(h)}});u.show(),s=()=>{u.destroy()}})),Ai(()=>{s()}),_t();var a=bW();ar(a,l=>j(i,l),()=>c(i)),H(t,a),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-color-picker-button.svelte-xeg9n6 { + font-size: var(--jse-font-size-mono, 14px); + width: var(--jse-color-picker-button-size, 1em); + height: var(--jse-color-picker-button-size, 1em); + box-sizing: border-box; + padding: 0; + margin: 2px 0 0 calc(0.5 * var(--jse-padding, 10px)); + display: inline-flex; + vertical-align: top; + border: 1px solid var(--jse-text-color, #4d4d4d); + border-radius: 2px; + background: inherit; + outline: none; +} + +.jse-color-picker-button.svelte-xeg9n6:not(.jse-readonly) { + cursor: pointer; +}`);var wW=ue('');function xW(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),{openAbsolutePopup:o}=nl("absolute-popup"),i=x(e,"path",9),s=x(e,"value",9),a=x(e,"readOnly",9),l=x(e,"onPatch",9),u=x(e,"focus",9);function d(p){l()([{op:"replace",path:yt(i()),value:p}]),h()}function h(){u()()}ie(()=>B(s()),()=>{j(n,AA(s()))}),ie(()=>(B(a()),B(s())),()=>{j(r,a()?"Color ".concat(s()):"Click to open a color picker")}),En(),_t(!0);var f=wW();$e(()=>{var p;Tn(f,"style","background: ".concat((p=c(n))!==null&&p!==void 0?p:"")),Tn(f,"title",c(r)),Tn(f,"aria-label",c(r)),lt(f,"jse-readonly",a())}),Oe("click",f,function(p){var m,b;if(!a()){var v=p.target,g=v.getBoundingClientRect().top,y=((m=(b=Mh(v))===null||b===void 0?void 0:b.innerHeight)!==null&&m!==void 0?m:0)-g<300&&g>300,k={color:s(),onChange:d,showOnTop:y};o(yW,k,{anchor:v,closeOnOuterClick:!0,onClose:h,offsetTop:18,offsetLeft:-8,height:300})}}),H(t,f),jt()}var Sv=1e3,Xd=100,_b=2e4,Wc=[{start:0,end:Xd}],jW=1048576,Sk=10485760,Cv="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",sw="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",Wu="hover-insert-inside",Ov="hover-insert-after",Ck="hover-collection",_v="valid",Ok="repairable",Us=336,Vs=260,id=100,_k={[zi.asc]:"ascending",[zi.desc]:"descending"};function UA(t){for(var e=iR(t,a=>a.start),n=[e[0]],r=0;r0&&arguments[0]!==void 0?arguments[0]:{expanded:!1};return{type:"array",expanded:t,visibleSections:Wc,items:[]}}function cw(){var{expanded:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{expanded:!1};return{type:"object",expanded:t,properties:{}}}var uw={createObjectDocumentState:cw,createArrayDocumentState:lw,createValueDocumentState:function(){return{type:"value"}}};function HA(t,e,n,r){var{createObjectDocumentState:o,createArrayDocumentState:i,createValueDocumentState:s}=r;return function a(l,u,d){if(Array.isArray(l)){var h=jo(u)?u:i();if(d.length===0)return h;var f=fo(d[0]),p=a(l[f],h.items[f],d.slice(1));return Go(h,["items",d[0]],p)}if(In(l)){var m=Zi(u)?u:o();if(d.length===0)return m;var b=d[0],v=a(l[b],m.properties[b],d.slice(1));return Go(m,["properties",b],v)}return aw(u)?u:s()}(t,e,n)}function ii(t,e){return Zd(t,e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],(n,r)=>{if(n!==void 0&&r!==void 0)return Array.isArray(n)?jo(r)?r:lw({expanded:!!ql(r)&&r.expanded}):In(n)?Zi(r)?r:cw({expanded:!!ql(r)&&r.expanded}):aw(r)?r:void 0},()=>!0)}function Zd(t,e,n,r,o){var i=r(t,e,n);if(Array.isArray(t)&&jo(i)&&o(i)){var s=[];return dw(t,i.visibleSections,l=>{var u=n.concat(String(l)),d=Zd(t[l],i.items[l],u,r,o);d!==void 0&&(s[l]=d)}),bk(s,i.items)?i:De(De({},i),{},{items:s})}if(In(t)&&Zi(i)&&o(i)){var a={};return Object.keys(t).forEach(l=>{var u=n.concat(l),d=Zd(t[l],i.properties[l],u,r,o);d!==void 0&&(a[l]=d)}),bk(Object.values(a),Object.values(i.properties))?i:De(De({},i),{},{properties:a})}return i}function dw(t,e,n){e.forEach(r=>{var{start:o,end:i}=r;$A(o,Math.min(t.length,i),n)})}function eh(t,e){for(var n=t,r=[],o=0;o{var h=ql(d)&&!d.expanded?De(De({},d),{},{expanded:!0}):d;return jo(h)?function(f,p){if(function(v,g){return v.some(y=>g>=y.start&&gfunction(u,d,h,f){return Zd(u,d,h,(p,m,b)=>Array.isArray(p)&&f(b)?jo(m)?m.expanded?m:De(De({},m),{},{expanded:!0}):lw({expanded:!0}):In(p)&&f(b)?Zi(m)?m.expanded?m:De(De({},m),{},{expanded:!0}):cw({expanded:!0}):m,p=>ql(p)&&p.expanded)}(a,l,[],r))}function Tk(t,e,n,r){return uu(t,e,n,(o,i)=>r?function(s,a,l){return Zd(s,a,l,(u,d)=>Pk(d),()=>!0)}(o,i,n):Pk(i))}function Pk(t){return jo(t)&&t.expanded?De(De({},t),{},{expanded:!1,visibleSections:Wc}):Zi(t)&&t.expanded?De(De({},t),{},{expanded:!1}):t}function WA(t,e,n){var r={json:t,documentState:e},o=n.reduce((i,s)=>({json:Ki(i.json,[s]),documentState:$W(i.json,i.documentState,s)}),r);return{json:o.json,documentState:ii(o.json,o.documentState)}}function $W(t,e,n){if(HS(n))return Rk(t,e,n,void 0);if(WS(n))return Nk(t,e,n);if(Zb(n)){var r=Ji(t,n.path),o=Zs(t,e,r);return o?gg(t,e,r,{type:"value",enforceString:o}):e}return Wv(n)||$c(n)?function(i,s,a){if($c(a)&&a.from===a.path)return s;var l=s,u=Ji(i,a.from),d=Ol(i,l,u);return $c(a)&&(l=Nk(i,l,{op:"remove",path:a.from})),l=Rk(i,l,{op:"add",path:a.path,value:null},d),l}(t,e,n):e}function Ol(t,e,n){try{return Ze(e,eh(t,n))}catch{return}}function hw(t,e,n,r,o){var i=HA(t,e,n,o);return n1(i,eh(t,n),s=>{var a=Ze(t,n);return r(a,s)})}function gg(t,e,n,r){return function(o,i,s,a,l){var u=HA(o,i,s,l);return Go(u,eh(o,s),a)}(t,e,n,r,uw)}function uu(t,e,n,r){return hw(t,e,n,r,uw)}function Rk(t,e,n,r){var o=Ji(t,n.path),i=e;return i=uu(t,i,jn(o),(s,a)=>{if(!jo(a))return a;var l=fo(dn(o)),{items:u,visibleSections:d}=a;return De(De({},a),{},{items:l{if(!jo(a))return a;var l=fo(dn(r)),{items:u,visibleSections:d}=a;return De(De({},a),{},{items:u.slice(0,l).concat(u.slice(l+1)),visibleSections:KA(d,l,-1)})}):function(s,a,l){var u=eh(s,l);return yi(a,u)?_m(a,eh(s,l)):a}(t,e,r)}function KA(t,e,n){return function(r){for(var o=r.slice(0),i=1;i({start:r.start>e?r.start+n:r.start,end:r.end>e?r.end+n:r.end})))}function Zs(t,e,n){var r,o=Ze(t,n),i=Ol(t,e,n),s=aw(i)?i.enforceString:void 0;return typeof s=="boolean"?s:typeof(r=o)=="string"&&typeof Au(r,JSON)!="string"}function Ph(t,e){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=t.indexOf(e);return r!==-1?n?t.slice(r):t.slice(r+1):[]}function fw(t,e){var n=[];return function r(o,i,s){n.push(s),Cr(o)&&jo(i)&&i.expanded&&dw(o,i.visibleSections,a=>{r(o[a],i.items[a],s.concat(String(a)))}),Nr(o)&&Zi(i)&&i.expanded&&Object.keys(o).forEach(a=>{r(o[a],i.properties[a],s.concat(a))})}(t,e,[]),n}function JA(t,e){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],r=[];return function o(i,s){r.push({path:s,type:Vi.value});var a=Ol(t,e,s);if(i&&ql(a)&&a.expanded){if(n&&r.push({path:s,type:Vi.inside}),Cr(i)){var l=jo(a)?a.visibleSections:Wc;dw(i,l,u=>{var d=s.concat(String(u));o(i[u],d),n&&r.push({path:d,type:Vi.after})})}Nr(i)&&Object.keys(i).forEach(u=>{var d=s.concat(u);r.push({path:d,type:Vi.key}),o(i[u],d),n&&r.push({path:d,type:Vi.after})})}}(t,[]),r}function Av(t,e,n){var r=fw(t,e),o=r.map(yt).indexOf(yt(n));if(o!==-1&&o3&&arguments[3]!==void 0?arguments[3]:10240;return Li(t,e,n,HH({json:Ze(t,n)},r)?sd:pw)}function $v(t,e,n){var r=Ol(t,e,n);return ql(r)&&r.expanded?e:Ul(t,e,n)}function sd(t){return t.length===0||t.length===1&&t[0]==="0"}function Dk(t){return t.length===0}function pw(){return!0}function up(){return!1}function xi(t){return t&&t.type===Gn.after||!1}function wo(t){return t&&t.type===Gn.inside||!1}function to(t){return t&&t.type===Gn.key||!1}function Wn(t){return t&&t.type===Gn.value||!1}function ir(t){return t&&t.type===Gn.multi||!1}function vg(t){return ir(t)&&gn(t.focusPath,t.anchorPath)}function th(t){return ir(t)||xi(t)||wo(t)||to(t)||Wn(t)}function Mv(t){return t&&t.type===Gn.text||!1}function La(t,e){var n=[];return function(r,o,i){if(o){var s=_l(o),a=ht(o);if(gn(s,a))return i(s);if(r!==void 0){var l=QA(s,a);if(s.length===l.length||a.length===l.length)return i(l);var u=Eo(s,a),d=Hs(r,u),h=Ba(r,u),f=ta(r,u,d),p=ta(r,u,h);if(!(f===-1||p===-1)){var m=Ze(r,l);if(Nr(m)){for(var b=Object.keys(m),v=f;v<=p;v++){var g=i(l.concat(b[v]));if(g!==void 0)return g}return}if(Cr(m)){for(var y=f;y<=p;y++){var k=i(l.concat(String(y)));if(k!==void 0)return k}return}throw new Error("Failed to create selection")}}}}(t,e,r=>{n.push(r)}),n}function GA(t){return wo(t)?t.path:jn(ht(t))}function Hs(t,e){if(!ir(e))return e.path;var n=ta(t,e,e.anchorPath);return ta(t,e,e.focusPath)n?e.focusPath:e.anchorPath}function Ik(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(n){var o=r?ht(n):Hs(t,n),i=function(l,u,d){var h=fw(l,u),f=h.map(yt),p=yt(d),m=f.indexOf(p);if(m!==-1&&m>0)return h[m-1]}(t,e,o);if(r)return wo(n)||xi(n)?i!==void 0?Eo(o,o):void 0:i!==void 0?Eo(_l(n),i):void 0;if(xi(n)||wo(n))return mn(o);if(to(n)){if(i===void 0||i.length===0)return;var s=jn(i),a=Ze(t,s);return Array.isArray(a)||Jn(i)?mn(i):sa(i)}return Wn(n),i!==void 0?mn(i):void 0}}function zk(t,e,n,r){if(!n)return{caret:void 0,previous:void 0,next:void 0};var o=JA(t,e,r),i=o.findIndex(s=>gn(s.path,ht(n))&&String(s.type)===String(n.type));return{caret:i!==-1?o[i]:void 0,previous:i!==-1&&i>0?o[i-1]:void 0,next:i!==-1&&in[r].length;)r++;var o=n[r];return o===void 0||o.length===0||Array.isArray(Ze(t,jn(o)))?mn(o):sa(o)}function du(t,e){if(e.length===1){var n=Ws(e);if(n.op==="replace")return mn(Ji(t,n.path))}if(!Jn(e)&&e.every(s=>s.op==="move")){var r=Ws(e),o=e.slice(1);if((Wv(r)||$c(r))&&r.from!==r.path&&o.every(s=>(Wv(s)||$c(s))&&s.from===s.path))return sa(Ji(t,r.path))}var i=e.filter(s=>s.op!=="test"&&s.op!=="remove"&&(s.op!=="move"||s.from!==s.path)&&typeof s.path=="string").map(s=>Ji(t,s.path));if(!Jn(i))return{type:Gn.multi,anchorPath:Ws(i),focusPath:dn(i)}}function QA(t,e){for(var n=0;nn.length&&e.length>n.length;return{type:Gn.multi,anchorPath:r?n.concat(t[n.length]):n,focusPath:r?n.concat(e[n.length]):n}}function YA(t,e,n,r){if(to(e))return String(dn(e.path));if(Wn(e)){var o=Ze(t,e.path);return typeof o=="string"?o:r.stringify(o,null,n)}if(ir(e)){if(Jn(e.focusPath))return r.stringify(t,null,n);var i=GA(e),s=Ze(t,i);if(Array.isArray(s)){if(vg(e)){var a=Ze(t,e.focusPath);return r.stringify(a,null,n)}return La(t,e).map(l=>{var u=Ze(t,l);return"".concat(r.stringify(u,null,n),",")}).join(` +`)}return La(t,e).map(l=>{var u=dn(l),d=Ze(t,l);return"".concat(r.stringify(u),": ").concat(r.stringify(d,null,n),",")}).join(` +`)}}function Bo(t){return(to(t)||Wn(t))&&t.edit===!0}function _c(t){return to(t)||Wn(t)||ir(t)}function Mf(t){return to(t)||Wn(t)||vg(t)}function $b(t){switch(t.type){case Vi.key:return sa(t.path);case Vi.value:return mn(t.path);case Vi.after:return ea(t.path);case Vi.inside:return aa(t.path)}}function Bk(t,e){switch(t){case Gn.key:return sa(e);case Gn.value:return mn(e);case Gn.after:return ea(e);case Gn.inside:return aa(e);case Gn.multi:case Gn.text:return Eo(e,e)}}function Fk(t,e,n){if(e)return nh(t,e,n)||ia(ir(e)?jn(e.focusPath):e.path,n)?e:void 0}function nh(t,e,n){if(t===void 0||!e)return!1;if(to(e)||wo(e)||xi(e))return gn(e.path,n);if(Wn(e))return ia(n,e.path);if(ir(e)){var r=Hs(t,e),o=Ba(t,e),i=jn(e.focusPath);if(!ia(n,i)||n.length<=i.length)return!1;var s=ta(t,e,r),a=ta(t,e,o),l=ta(t,e,n);return l!==-1&&l>=s&&l<=a}return!1}function ta(t,e,n){var r=jn(e.focusPath);if(!ia(n,r)||n.length<=r.length)return-1;var o=n[r.length],i=Ze(t,r);if(Nr(i))return Object.keys(i).indexOf(o);if(Cr(i)){var s=fo(o);if(s');function ZA(t,e){xt(e,!1);var n=ro("jsoneditor:EditableDiv"),r=x(e,"value",9),o=x(e,"initialValue",9),i=x(e,"shortText",9,!1),s=x(e,"label",9),a=x(e,"onChange",9),l=x(e,"onCancel",9),u=x(e,"onFind",9),d=x(e,"onPaste",9,Ur),h=x(e,"onValueClass",9,()=>""),f=U(void 0,!0),p=U(void 0,!0),m=!1;function b(){return c(f)?function(k){return k.replace(/\n$/,"")}(c(f).innerText):""}function v(k){c(f)&&si(f,c(f).innerText=mg(k))}ko(()=>{n("onMount",{value:r(),initialValue:o()}),v(o()!==void 0?o():r()),c(f)&&function(k){if(k.firstChild!=null){var S=document.createRange(),w=window.getSelection();S.setStart(k,1),S.collapse(!0),w==null||w.removeAllRanges(),w==null||w.addRange(S)}else k.focus()}(c(f))}),Ai(()=>{var k=b();n("onDestroy",{closed:m,value:r(),newValue:k}),m||k===r()||a()(k,za.no)}),ie(()=>(B(h()),B(r())),()=>{j(p,h()(r()))}),En(),_t(!0);var g=MW(),y=Fe(()=>{var k;return"".concat((k=Mu("jse-editable-div",c(p),{"jse-short-text":i()}))!==null&&k!==void 0?k:""," svelte-f9kmxj")});ar(g,k=>j(f,k),()=>c(f)),$e(()=>{Tn(g,"aria-label",s()),ui(g,c(y))}),Oe("input",g,function(){var k=b();k===""&&v(""),j(p,h()(k))}),Oe("keydown",g,function(k){k.stopPropagation();var S=oa(k);if(S==="Escape"&&(k.preventDefault(),m=!0,l()()),S==="Enter"||S==="Tab"){k.preventDefault(),m=!0;var w=b();a()(w,za.nextInside)}S==="Ctrl+F"&&(k.preventDefault(),u()(!1)),S==="Ctrl+H"&&(k.preventDefault(),u()(!0))}),Oe("paste",g,function(k){if(k.stopPropagation(),d()&&k.clipboardData){var S=k.clipboardData.getData("text/plain");d()(S)}}),Oe("blur",g,function(){var k=document.hasFocus(),S=b();n("handleBlur",{hasFocus:k,closed:m,value:r(),newValue:S}),document.hasFocus()&&!m&&(m=!0,S!==r()&&a()(S,za.self))}),H(t,g),jt()}function TW(t,e){xt(e,!1);var n=x(e,"path",9),r=x(e,"value",9),o=x(e,"selection",9),i=x(e,"mode",9),s=x(e,"parser",9),a=x(e,"normalization",9),l=x(e,"enforceString",9),u=x(e,"onPatch",9),d=x(e,"onPasteJson",9),h=x(e,"onSelect",9),f=x(e,"onFind",9),p=x(e,"focus",9),m=x(e,"findNextInside",9);function b(k){return l()?k:Au(k,s())}function v(){h()(mn(n())),p()()}_t(!0);var g=Fe(()=>a().escapeValue(r())),y=Fe(()=>Bo(o())?o().initialValue:void 0);ZA(t,{get value(){return c(g)},get initialValue(){return c(y)},label:"Edit value",onChange:function(k,S){u()([{op:"replace",path:yt(n()),value:b(a().unescapeValue(k))}],(w,_,A)=>{if(!A||gn(n(),ht(A)))return{state:_,selection:S===za.nextInside?m()(n()):mn(n())}}),p()()},onCancel:v,onPaste:function(k){try{var S=s().parse(k);Rr(S)&&d()({path:n(),contents:S,onPasteAsJson:()=>{v();var w=[{op:"replace",path:yt(n()),value:S}];u()(w,(_,A)=>({state:Ul(_,A,n())}))}})}catch{}},get onFind(){return f()},onValueClass:function(k){return XA(b(a().unescapeValue(k)),i(),s())}}),jt()}function Ec(t,e,n){var r=jn(e),o=Ze(t,r);if(Cr(o)){var i=fo(dn(e));return n.map((u,d)=>({op:"add",path:yt(r.concat(String(i+d))),value:u.value}))}if(Nr(o)){var s=dn(e),a=Object.keys(o),l=s!==void 0?Ph(a,s,!0):[];return[...n.map(u=>{var d=Th(u.key,a);return{op:"add",path:yt(r.concat(d)),value:u.value}}),...l.map(u=>Vl(r,u))]}throw new Error("Cannot create insert operations: parent must be an Object or Array")}function Mb(t,e,n){var r=Ze(t,e);if(Array.isArray(r)){var o=r.length;return n.map((i,s)=>({op:"add",path:yt(e.concat(String(o+s))),value:i.value}))}return n.map(i=>{var s=Th(i.key,Object.keys(r));return{op:"add",path:yt(e.concat(s)),value:i.value}})}function Rh(t,e,n,r){var o=Th(r,e.filter(s=>s!==n)),i=Ph(e,n,!1);return[{op:"move",from:yt(t.concat(n)),path:yt(t.concat(o))},...i.map(s=>Vl(t,s))]}function e$(t,e){var n=dn(e);if(Jn(n))throw new Error("Cannot duplicate root object");var r=jn(n),o=dn(n),i=Ze(t,r);if(Cr(i)){var s=dn(e),a=s?fo(dn(s))+1:0;return[...e.map((d,h)=>({op:"copy",from:yt(d),path:yt(r.concat(String(h+a)))}))]}if(Nr(i)){var l=Object.keys(i),u=o!==void 0?Ph(l,o,!1):[];return[...e.map(d=>{var h=Th(dn(d),l);return{op:"copy",from:yt(d),path:yt(r.concat(h))}}),...u.map(d=>Vl(r,d))]}throw new Error("Cannot create duplicate operations: parent must be an Object or Array")}function t$(t,e,n,r){if(to(e)){var o=TA(n,r),i=jn(e.path),s=Ze(t,i);return Rh(i,Object.keys(s),dn(e.path),typeof o=="string"?o:n)}if(Wn(e)||ir(e)&&Jn(e.focusPath))try{return[{op:"replace",path:yt(ht(e)),value:pg(n,_=>$h(_,r))}]}catch{return[{op:"replace",path:yt(ht(e)),value:n}]}if(ir(e)){var a=Tv(n,r);return function(_,A,D){var E=Ws(A),z=jn(E),G=Ze(_,z);if(Cr(G)){var F=Ws(A),se=F?fo(dn(F)):0;return[...fm(A),...D.map((I,Q)=>({op:"add",path:yt(z.concat(String(Q+se))),value:I.value}))]}if(Nr(G)){var pe=dn(A),re=jn(pe),Z=dn(pe),he=Object.keys(G),be=Z!==void 0?Ph(he,Z,!1):[],fe=new Set(A.map(I=>dn(I))),J=he.filter(I=>!fe.has(I));return[...fm(A),...D.map(I=>{var Q=Th(I.key,J);return{op:"add",path:yt(re.concat(Q)),value:I.value}}),...be.map(I=>Vl(re,I))]}throw new Error("Cannot create replace operations: parent must be an Object or Array")}(t,La(t,e),a)}if(xi(e)){var l=Tv(n,r),u=e.path,d=jn(u),h=Ze(t,d);if(Cr(h)){var f=fo(dn(u));return Ec(t,d.concat(String(f+1)),l)}if(Nr(h)){var p=String(dn(u)),m=Object.keys(h);if(Jn(m)||dn(m)===p)return Mb(t,d,l);var b=m.indexOf(p),v=m[b+1];return Ec(t,d.concat(v),l)}throw new Error("Cannot create insert operations: parent must be an Object or Array")}if(wo(e)){var g=Tv(n,r),y=e.path,k=Ze(t,y);if(Cr(k))return Ec(t,y.concat("0"),g);if(Nr(k)){var S=Object.keys(k);if(Jn(S))return Mb(t,y,g);var w=Ws(S);return Ec(t,y.concat(w),g)}throw new Error("Cannot create insert operations: parent must be an Object or Array")}throw new Error("Cannot insert: unsupported type of selection "+JSON.stringify(e))}function fm(t){return t.map(e=>({op:"remove",path:yt(e)})).reverse()}function Vl(t,e){return{op:"move",from:yt(t.concat(e)),path:yt(t.concat(e))}}function Tv(t,e){var n=/^\s*{/.test(t),r=/^\s*\[/.test(t),o=TA(t,e),i=o!==void 0?o:pg(t,s=>$h(s,e));return n&&In(i)||r&&Array.isArray(i)?[{key:"New item",value:i}]:Array.isArray(i)?i.map((s,a)=>({key:"New item "+a,value:s})):In(i)?Object.keys(i).map(s=>({key:s,value:i[s]})):[{key:"New item",value:i}]}function n$(t,e){if(to(e)){var n=jn(e.path),r=Ze(t,n),o=Rh(n,Object.keys(r),dn(e.path),"");return{operations:o,newSelection:du(t,o)}}if(Wn(e))return{operations:[{op:"replace",path:yt(e.path),value:""}],newSelection:e};if(ir(e)){var i=La(t,e),s=fm(i),a=dn(i);if(Jn(a))return{operations:[{op:"replace",path:"",value:""}],newSelection:mn([])};var l=jn(a),u=Ze(t,l);if(Cr(u)){var d=Ws(i),h=fo(dn(d));return{operations:s,newSelection:h===0?aa(l):ea(l.concat(String(h-1)))}}if(Nr(u)){var f=Object.keys(u),p=Ws(i),m=dn(p),b=f.indexOf(m),v=f[b-1];return{operations:s,newSelection:b===0?aa(l):ea(l.concat(v))}}throw new Error("Cannot create remove operations: parent must be an Object or Array")}throw new Error("Cannot remove: unsupported type of selection "+JSON.stringify(e))}function r$(t,e){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gn;return n.filter((o,i)=>{for(var s=i+1;s{if(WS(r)){var i=ji(r.path);return{revertOperations:[...o,...Pv(n,i)]}}if($c(r)){var s=ji(r.from);return{revertOperations:r.from===r.path?[r,...Pv(n,s)]:[...o,...Pv(n,s)]}}return{document:n}}}))}function Pv(t,e){var n=jn(e),r=dn(e),o=Ze(t,n);return Nr(o)?Ph(Object.keys(o),r,!1).map(i=>Vl(n,i)):[]}function qk(t){var e=t.activeIndex0?0:-1,n=t.items[e],r=t.items.map((o,i)=>De(De({},o),{},{active:i===e}));return De(De({},t),{},{items:r,activeItem:n,activeIndex:e})}function Uk(t,e){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=t.toLowerCase(),i=(n=r==null?void 0:r.maxResults)!==null&&n!==void 0?n:1/0,s=r==null?void 0:r.columns,a=[],l=[];function u(v){a.length>=i||a.push(v)}function d(v,g){if(Cr(g)){var y=l.length;l.push("0");for(var k=0;k=i)return;l.pop()}else if(Nr(g)){var S=Object.keys(g),w=l.length;for(var _ of(l.push(""),S))if(l[w]=_,Vk(_,v,l,Xi.key,u),d(v,g[_]),a.length>=i)return;l.pop()}else Vk(String(g),v,l,Xi.value,u)}if(t==="")return[];if(s){if(!Array.isArray(e))throw new Error("json must be an Array when option columns is defined");for(var h=0;hm.length+1;)l.pop();d(o,Ze(f,m))}if(a.length>=i)break}return a}return d(o,e),a}function Vk(t,e,n,r,o){var i=t.toLowerCase(),s=0,a=-1,l=-1;do(l=i.indexOf(e,a))!==-1&&(a=l+e.length,o({path:n.slice(0),field:r,fieldIndex:s,start:l,end:a}),s++);while(l!==-1)}function Tb(t,e,n,r){return t.substring(0,n)+e+t.substring(r)}function Hk(t,e,n){var r=t;return z6(n,o=>{r=Tb(r,e,o.start,o.end)}),r}function PW(t,e,n,r,o){var{field:i,path:s,start:a,end:l}=r;if(i===Xi.key){var u=jn(s),d=Ze(t,u),h=dn(s),f=Rh(u,Object.keys(d),h,Tb(h,n,a,l));return{newSelection:du(t,f),operations:f}}if(i===Xi.value){var p=Ze(t,s);if(p===void 0)throw new Error("Cannot replace: path not found ".concat(yt(s)));var m=typeof p=="string"?p:String(p),b=Zs(t,e,s),v=Tb(m,n,a,l),g=[{op:"replace",path:yt(s),value:b?v:Au(v,o)}];return{newSelection:du(t,g),operations:g}}throw new Error("Cannot replace: unknown type of search result field ".concat(i))}function Wk(t){return t.path.concat(t.field,String(t.fieldIndex))}var RW={createObjectDocumentState:()=>({type:"object",properties:{}}),createArrayDocumentState:()=>({type:"array",items:[]}),createValueDocumentState:()=>({type:"value"})};function o$(t,e){return e.reduce((n,r)=>function(o,i,s,a){return hw(o,i,s,a,RW)}(t,n,r.path,(o,i)=>De(De({},i),{},{searchResults:i.searchResults?i.searchResults.concat(r):[r]})),void 0)}function Pb(t){var e,n=(e=t==null?void 0:t.searchResults)!==null&&e!==void 0?e:[],r=Zi(t)?Object.values(t.properties).flatMap(Pb):jo(t)?t.items.flatMap(Pb):[];return n.concat(r)}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-highlight.svelte-5fb7bl { + background-color: var(--jse-search-match-color, #ffe665); + outline: var(--jse-search-match-outline, none); +} +.jse-highlight.jse-active.svelte-5fb7bl { + background-color: var(--jse-search-match-active-color, var(--jse-search-match-color, #ffe665)); + outline: var(--jse-search-match-outline, 2px solid #e0be00); +}`);var NW=ue(' ');function i$(t,e){xt(e,!1);var n=U(),r=x(e,"text",8),o=x(e,"searchResultItems",8);ie(()=>(B(r()),B(o())),()=>{j(n,function(s,a){var l=[],u=0;for(var d of a){var h=s.slice(u,d.start);h!==""&&l.push({type:"normal",text:h,active:!1});var f=s.slice(d.start,d.end);l.push({type:"highlight",text:f,active:d.active}),u=d.end}var p=dn(a);return p&&p.endc(n),Dr,(s,a)=>{var l=un(),u=tt(l),d=f=>{var p=Po();$e(()=>Mt(p,c(a).text)),H(f,p)},h=f=>{var p=NW(),m=V(p);$e(()=>Mt(m,mg(c(a).text))),$e(()=>lt(p,"jse-active",c(a).active)),H(f,p)};ge(u,f=>{c(a).type==="normal"?f(d):f(h,!1)}),H(s,l)}),H(t,i),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-value.jse-string.svelte-c0g9qz { + color: var(--jse-value-color-string, #008000); +} +.jse-value.jse-object.svelte-c0g9qz, .jse-value.jse-array.svelte-c0g9qz { + min-width: 16px; + color: var(--jse-delimiter-color, rgba(0, 0, 0, 0.38)); +} +.jse-value.jse-number.svelte-c0g9qz { + color: var(--jse-value-color-number, #ee422e); +} +.jse-value.jse-boolean.svelte-c0g9qz { + color: var(--jse-value-color-boolean, #ff8c00); +} +.jse-value.jse-null.svelte-c0g9qz { + color: var(--jse-value-color-null, #004ed0); +} +.jse-value.jse-invalid.svelte-c0g9qz { + color: var(--jse-text-color, #4d4d4d); +} +.jse-value.jse-url.svelte-c0g9qz { + color: var(--jse-value-color-url, #008000); + text-decoration: underline; +} + +.jse-value.svelte-c0g9qz { + display: inline-block; + min-width: 2em; + padding: 0 5px; + box-sizing: border-box; + outline: none; + border-radius: 1px; + vertical-align: top; + word-break: normal; + overflow-wrap: anywhere; + white-space: pre-wrap; +} +.jse-value.jse-table-cell.svelte-c0g9qz { + overflow-wrap: normal; + white-space: nowrap; +} +.jse-value.jse-empty.svelte-c0g9qz { + min-width: 4em; + outline: 1px dotted var(--jse-tag-background, rgba(0, 0, 0, 0.2)); + -moz-outline-radius: 2px; +} +.jse-value.jse-empty.svelte-c0g9qz::after { + pointer-events: none; + color: var(--jse-tag-background, rgba(0, 0, 0, 0.2)); + content: "value"; +}`);var DW=ue('
');function IW(t,e){xt(e,!1);var n=U(void 0,!0),r=x(e,"path",9),o=x(e,"value",9),i=x(e,"mode",9),s=x(e,"readOnly",9),a=x(e,"normalization",9),l=x(e,"parser",9),u=x(e,"onSelect",9),d=x(e,"searchResultItems",9);ie(()=>B(o()),()=>{j(n,fg(o()))}),En(),_t(!0);var h=DW(),f=Fe(()=>{var v;return"".concat((v=XA(o(),i(),l()))!==null&&v!==void 0?v:""," svelte-c0g9qz")}),p=V(h),m=v=>{var g=Fe(()=>a().escapeValue(o()));i$(v,{get text(){return c(g)},get searchResultItems(){return d()}})},b=v=>{var g=Po();$e(()=>Mt(g,mg(a().escapeValue(o())))),H(v,g)};ge(p,v=>{d()?v(m):v(b,!1)}),$e(()=>{ui(h,c(f)),Tn(h,"title",c(n)?"Ctrl+Click or Ctrl+Enter to open url in new window":void 0)}),Oe("click",h,function(v){typeof o()=="string"&&c(n)&&iw(v)&&(v.preventDefault(),v.stopPropagation(),window.open(o(),"_blank"))}),Oe("dblclick",h,function(v){s()||(v.preventDefault(),u()(hm(r())))}),H(t,h),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-tooltip.svelte-14y3y8t { + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + line-height: normal; + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px); + border-radius: 3px; + background: var(--jse-context-menu-background, #656565); + color: var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff)); + white-space: nowrap; + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); +}`);var zW=ue('
');function LW(t,e){var n=x(e,"text",8),r=zW(),o=V(r);$e(()=>Mt(o,n())),H(t,r)}function hu(t,e){var n,{text:r,openAbsolutePopup:o,closeAbsolutePopup:i}=e;function s(){n=o(LW,{text:r},{position:"top",width:10*r.length,offsetTop:3,anchor:t,closeOnOuterClick:!0})}function a(){i(n)}return t.addEventListener("mouseenter",s),t.addEventListener("mouseleave",a),{destroy(){t.removeEventListener("mouseenter",s),t.removeEventListener("mouseleave",a)}}}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-timestamp.svelte-1jla5ec { + padding: 0; + margin: 0; + vertical-align: middle; + display: inline-flex; + color: var(--jse-value-color-number, #ee422e); +}`);var BW=ue('
');function FW(t,e){xt(e,!1);var n=U(void 0,!0),r=nl("absolute-popup"),o=x(e,"value",9);ie(()=>B(o()),()=>{j(n,"Time: ".concat(new Date(o()).toString()))}),En(),_t(!0);var i=BW();vn(V(i),{data:OR}),To(i,(s,a)=>hu==null?void 0:hu(s,a),()=>De({text:c(n)},r)),H(t,i),jt()}function qW(t){var e=[];return!t.isEditing&&LH(t.value)&&e.push({component:vW,props:t}),!t.isEditing&&BH(t.value)&&e.push({component:xW,props:t}),t.isEditing&&e.push({component:TW,props:t}),t.isEditing||e.push({component:IW,props:t}),!t.isEditing&&jb(t.value)&&e.push({component:FW,props:t}),e}function Wi(t){return t.map((e,n)=>VW.test(e)?"["+e+"]":/[.[\]]/.test(e)||e===""?'["'+function(r){return r.replace(/"/g,'\\"')}(e)+'"]':(n>0?".":"")+e).join("")}function UW(t){for(var e=[],n=0;ni==='"',!0)),o('"')):e.push(r(i=>i==="]")),o("]")):e.push(r(i=>i==="."||i==="["));function r(i){for(var s=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a="";n({x:t,y:t}),KW={left:"right",right:"left",bottom:"top",top:"bottom"},JW={start:"end",end:"start"};function Kk(t,e,n){return El(t,pm(e,n))}function bg(t,e){return typeof t=="function"?t(e):t}function Al(t){return t.split("-")[0]}function gm(t){return t.split("-")[1]}function s$(t){return t==="x"?"y":"x"}function a$(t){return t==="y"?"height":"width"}function fu(t){return["top","bottom"].includes(Al(t))?"y":"x"}function l$(t){return s$(fu(t))}function Rv(t){return t.replace(/start|end/g,e=>JW[e])}function Pf(t){return t.replace(/left|right|bottom|top/g,e=>KW[e])}function GW(t){return typeof t!="number"?function(e){return De({top:0,right:0,bottom:0,left:0},e)}(t):{top:t,right:t,bottom:t,left:t}}function vm(t){var{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function Jk(t,e,n){var r,{reference:o,floating:i}=t,s=fu(e),a=l$(e),l=a$(a),u=Al(e),d=s==="y",h=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;switch(u){case"top":r={x:h,y:o.y-i.height};break;case"bottom":r={x:h,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(gm(e)){case"start":r[a]-=p*(n&&d?-1:1);break;case"end":r[a]+=p*(n&&d?-1:1)}return r}var QW=function(){var t=gt(function*(e,n,r){for(var{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=s.filter(Boolean),u=yield a.isRTL==null?void 0:a.isRTL(n),d=yield a.getElementRects({reference:e,floating:n,strategy:i}),{x:h,y:f}=Jk(d,o,u),p=o,m={},b=0,v=0;v"u")&&(t instanceof ShadowRoot||t instanceof ci(t).ShadowRoot)}function rh(t){var{overflow:e,overflowX:n,overflowY:r,display:o}=ts(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function YW(t){return["table","td","th"].includes(pu(t))}function bm(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Db(t){var e=gw(),n=es(t)?ts(t):t;return n.transform!=="none"||n.perspective!=="none"||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function gw(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Kc(t){return["html","body","#document"].includes(pu(t))}function ts(t){return ci(t).getComputedStyle(t)}function wg(t){return es(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ma(t){if(pu(t)==="html")return t;var e=t.assignedSlot||t.parentNode||Gk(t)&&t.host||As(t);return Gk(e)?e.host:e}function d$(t){var e=Ma(t);return Kc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ps(e)&&rh(e)?e:d$(e)}function oh(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);var o=d$(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=ci(o);if(i){var a=Ib(s);return e.concat(s,s.visualViewport||[],rh(o)?o:[],a&&n?oh(a):[])}return e.concat(o,oh(o,[],n))}function Ib(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function h$(t){var e=ts(t),n=parseFloat(e.width)||0,r=parseFloat(e.height)||0,o=Ps(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=mm(n)!==i||mm(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function vw(t){return es(t)?t:t.contextElement}function Jc(t){var e=vw(t);if(!Ps(e))return Es(1);var n=e.getBoundingClientRect(),{width:r,height:o,$:i}=h$(e),s=(i?mm(n.width):n.width)/r,a=(i?mm(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}var XW=Es(0);function f$(t){var e=ci(t);return gw()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:XW}function Hl(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);var o=t.getBoundingClientRect(),i=vw(t),s=Es(1);e&&(r?es(r)&&(s=Jc(r)):s=Jc(t));var a=function(w,_,A){return _===void 0&&(_=!1),!(!A||_&&A!==ci(w))&&_}(i,n,r)?f$(i):Es(0),l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,d=o.width/s.x,h=o.height/s.y;if(i)for(var f=ci(i),p=r&&es(r)?ci(r):r,m=f,b=Ib(m);b&&r&&p!==m;){var v=Jc(b),g=b.getBoundingClientRect(),y=ts(b),k=g.left+(b.clientLeft+parseFloat(y.paddingLeft))*v.x,S=g.top+(b.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,d*=v.x,h*=v.y,l+=k,u+=S,b=Ib(m=ci(b))}return vm({width:d,height:h,x:l,y:u})}function bw(t,e){var n=wg(t).scrollLeft;return e?e.left+n:Hl(As(t)).left+n}function p$(t,e,n){n===void 0&&(n=!1);var r=t.getBoundingClientRect();return{x:r.left+e.scrollLeft-(n?0:bw(t,r)),y:r.top+e.scrollTop}}function Qk(t,e,n){var r;if(e==="viewport")r=function(i,s){var a=ci(i),l=As(i),u=a.visualViewport,d=l.clientWidth,h=l.clientHeight,f=0,p=0;if(u){d=u.width,h=u.height;var m=gw();(!m||m&&s==="fixed")&&(f=u.offsetLeft,p=u.offsetTop)}return{width:d,height:h,x:f,y:p}}(t,n);else if(e==="document")r=function(i){var s=As(i),a=wg(i),l=i.ownerDocument.body,u=El(s.scrollWidth,s.clientWidth,l.scrollWidth,l.clientWidth),d=El(s.scrollHeight,s.clientHeight,l.scrollHeight,l.clientHeight),h=-a.scrollLeft+bw(i),f=-a.scrollTop;return ts(l).direction==="rtl"&&(h+=El(s.clientWidth,l.clientWidth)-u),{width:u,height:d,x:h,y:f}}(As(t));else if(es(e))r=function(i,s){var a=Hl(i,!0,s==="fixed"),l=a.top+i.clientTop,u=a.left+i.clientLeft,d=Ps(i)?Jc(i):Es(1);return{width:i.clientWidth*d.x,height:i.clientHeight*d.y,x:u*d.x,y:l*d.y}}(e,n);else{var o=f$(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return vm(r)}function m$(t,e){var n=Ma(t);return!(n===e||!es(n)||Kc(n))&&(ts(n).position==="fixed"||m$(n,e))}function ZW(t,e,n){var r=Ps(e),o=As(e),i=n==="fixed",s=Hl(t,!0,i,e),a={scrollLeft:0,scrollTop:0},l=Es(0);if(r||!r&&!i)if((pu(e)!=="body"||rh(o))&&(a=wg(e)),r){var u=Hl(e,!0,i,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else o&&(l.x=bw(o));var d=!o||r||i?Es(0):p$(o,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function Nv(t){return ts(t).position==="static"}function Yk(t,e){if(!Ps(t)||ts(t).position==="fixed")return null;if(e)return e(t);var n=t.offsetParent;return As(t)===n&&(n=n.ownerDocument.body),n}function Xk(t,e){var n=ci(t);if(bm(t))return n;if(!Ps(t)){for(var r=Ma(t);r&&!Kc(r);){if(es(r)&&!Nv(r))return r;r=Ma(r)}return n}for(var o=Yk(t,e);o&&YW(o)&&Nv(o);)o=Yk(o,e);return o&&Kc(o)&&Nv(o)&&!Db(o)?n:o||function(i){for(var s=Ma(i);Ps(s)&&!Kc(s);){if(Db(s))return s;if(bm(s))return null;s=Ma(s)}return null}(t)||n}var eK={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var{elements:e,rect:n,offsetParent:r,strategy:o}=t,i=o==="fixed",s=As(r),a=!!e&&bm(e.floating);if(r===s||a&&i)return n;var l={scrollLeft:0,scrollTop:0},u=Es(1),d=Es(0),h=Ps(r);if((h||!h&&!i)&&((pu(r)!=="body"||rh(s))&&(l=wg(r)),Ps(r))){var f=Hl(r);u=Jc(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}var p=!s||h||i?Es(0):p$(s,l,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}},getDocumentElement:As,getClippingRect:function(t){var{element:e,boundary:n,rootBoundary:r,strategy:o}=t,i=[...n==="clippingAncestors"?bm(e)?[]:function(l,u){var d=u.get(l);if(d)return d;for(var h=oh(l,[],!1).filter(g=>es(g)&&pu(g)!=="body"),f=null,p=ts(l).position==="fixed",m=p?Ma(l):l;es(m)&&!Kc(m);){var b=ts(m),v=Db(m);v||b.position!=="fixed"||(f=null),(p?!v&&!f:!v&&b.position==="static"&&f&&["absolute","fixed"].includes(f.position)||rh(m)&&!v&&m$(l,m))?h=h.filter(g=>g!==m):f=b,m=Ma(m)}return u.set(l,h),h}(e,this._c):[].concat(n),r],s=i[0],a=i.reduce((l,u)=>{var d=Qk(e,u,o);return l.top=El(d.top,l.top),l.right=pm(d.right,l.right),l.bottom=pm(d.bottom,l.bottom),l.left=El(d.left,l.left),l},Qk(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Xk,getElementRects:function(){var t=gt(function*(e){var n=this.getOffsetParent||Xk,r=this.getDimensions,o=yield r(e.floating);return{reference:ZW(e.reference,yield n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}});return function(e){return t.apply(this,arguments)}}(),getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){var{width:e,height:n}=h$(t);return{width:e,height:n}},getScale:Jc,isElement:es,isRTL:function(t){return ts(t).direction==="rtl"}};function tK(t,e,n,r){r===void 0&&(r={});var{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=vw(t),d=o||i?[...u?oh(u):[],...oh(e)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});var h,f=u&&a?function(v,g){var y,k=null,S=As(v);function w(){var _;clearTimeout(y),(_=k)==null||_.disconnect(),k=null}return function _(A,D){A===void 0&&(A=!1),D===void 0&&(D=1),w();var{left:E,top:z,width:G,height:F}=v.getBoundingClientRect();if(A||g(),G&&F){var se={rootMargin:-Tf(z)+"px "+-Tf(S.clientWidth-(E+G))+"px "+-Tf(S.clientHeight-(z+F))+"px "+-Tf(E)+"px",threshold:El(0,pm(1,D))||1},pe=!0;try{k=new IntersectionObserver(re,De(De({},se),{},{root:S.ownerDocument}))}catch{k=new IntersectionObserver(re,se)}k.observe(v)}function re(Z){var he=Z[0].intersectionRatio;if(he!==D){if(!pe)return _();he?_(!1,he):y=setTimeout(()=>{_(!1,1e-7)},1e3)}pe=!1}}(!0),w}(u,n):null,p=-1,m=null;s&&(m=new ResizeObserver(v=>{var[g]=v;g&&g.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));var b=l?Hl(t):null;return l&&function v(){var g=Hl(t);!b||g.x===b.x&&g.y===b.y&&g.width===b.width&&g.height===b.height||n(),b=g,h=requestAnimationFrame(v)}(),n(),()=>{var v;d.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),f==null||f(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(h)}}var nK=function(t){return t===void 0&&(t=0),{name:"offset",options:t,fn:e=>gt(function*(){var n,r,{x:o,y:i,placement:s,middlewareData:a}=e,l=yield function(u,d){return Nb.apply(this,arguments)}(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:De(De({},l),{},{placement:s})}})()}},rK=function(t){return t===void 0&&(t={}),{name:"shift",options:t,fn:e=>gt(function*(){var{x:n,y:r,placement:o}=e,i=bg(t,e),{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:k=>{var{x:S,y:w}=k;return{x:S,y:w}}}}=i,u=WE(i,rH),d={x:n,y:r},h=yield c$(e,u),f=fu(Al(o)),p=s$(f),m=d[p],b=d[f];if(s){var v=p==="y"?"bottom":"right";m=Kk(m+h[p==="y"?"top":"left"],m,m-h[v])}if(a){var g=f==="y"?"bottom":"right";b=Kk(b+h[f==="y"?"top":"left"],b,b-h[g])}var y=l.fn(De(De({},e),{},{[p]:m,[f]:b}));return De(De({},y),{},{data:{x:y.x-n,y:y.y-r,enabled:{[p]:s,[f]:a}}})})()}},oK=function(t){return t===void 0&&(t={}),{name:"flip",options:t,fn:e=>gt(function*(){var n,r,{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=e,d=bg(t,e),{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0}=d,g=WE(d,nH);if((n=i.arrow)!=null&&n.alignmentOffset)return{};var y=Al(o),k=fu(a),S=Al(a)===a,w=yield l.isRTL==null?void 0:l.isRTL(u.floating),_=p||(S||!v?[Pf(a)]:function(J){var I=Pf(J);return[Rv(J),I,Rv(I)]}(a)),A=b!=="none";!p&&A&&_.push(...function(J,I,Q,M){var C=gm(J),$=function(oe,_e,q){var K=["left","right"],L=["right","left"];switch(oe){case"top":case"bottom":return q?_e?L:K:_e?K:L;case"left":case"right":return _e?["top","bottom"]:["bottom","top"];default:return[]}}(Al(J),Q==="start",M);return C&&($=$.map(oe=>oe+"-"+C),I&&($=$.concat($.map(Rv)))),$}(a,v,b,w));var D=[a,..._],E=yield c$(e,g),z=[],G=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&z.push(E[y]),f){var F=function(J,I,Q){Q===void 0&&(Q=!1);var M=gm(J),C=l$(J),$=a$(C),oe=C==="x"?M===(Q?"end":"start")?"right":"left":M==="start"?"bottom":"top";return I.reference[$]>I.floating[$]&&(oe=Pf(oe)),[oe,Pf(oe)]}(o,s,w);z.push(E[F[0]],E[F[1]])}if(G=[...G,{placement:o,overflows:z}],!z.every(J=>J<=0)){var se,pe,re=(((se=i.flip)==null?void 0:se.index)||0)+1,Z=D[re];if(Z)return{data:{index:re,overflows:G},reset:{placement:Z}};var he=(pe=G.filter(J=>J.overflows[0]<=0).sort((J,I)=>J.overflows[1]-I.overflows[1])[0])==null?void 0:pe.placement;if(!he)switch(m){case"bestFit":var be,fe=(be=G.filter(J=>{if(A){var I=fu(J.placement);return I===k||I==="y"}return!0}).map(J=>[J.placement,J.overflows.filter(I=>I>0).reduce((I,Q)=>I+Q,0)]).sort((J,I)=>J[1]-I[1])[0])==null?void 0:be[0];fe&&(he=fe);break;case"initialPlacement":he=a}if(o!==he)return{reset:{placement:he}}}return{}})()}};function iK(t){var e,n,r={autoUpdate:!0},o=t,i=l=>De(De(De({},r),t||{}),l||{}),s=l=>{e&&n&&(o=i(l),((u,d,h)=>{var f=new Map,p=De({platform:eK},h),m=De(De({},p.platform),{},{_c:f});return QW(u,d,De(De({},p),{},{platform:m}))})(e,n,o).then(u=>{var d;Object.assign(n.style,{position:u.strategy,left:"".concat(u.x,"px"),top:"".concat(u.y,"px")}),!((d=o)===null||d===void 0)&&d.onComputed&&o.onComputed(u)}))},a=l=>{Ai(l.subscribe(u=>{e===void 0?(e=u,s()):(Object.assign(e,u),s())}))};return[l=>{if("subscribe"in l)return a(l),{};e=l,s()},(l,u)=>{var d;n=l,o=i(u),setTimeout(()=>s(u),0),s(u);var h=()=>{d&&(d(),d=void 0)},f=function(){var{autoUpdate:p}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o||{};h(),p!==!1&&Pr().then(()=>tK(e,n,()=>s(o),p===!0?{}:p))};return d=f(),{update(p){s(p),d=f(p)},destroy(){h()}}},s]}function sK(t){var{loadOptions:e,filterText:n,items:r,multiple:o,value:i,itemId:s,groupBy:a,filterSelectedItems:l,itemFilter:u,convertStringItemsToObjects:d,filterGroupedItems:h,label:f}=t;if(r&&e)return r;if(!r)return[];r&&r.length>0&&typeof r[0]!="object"&&(r=d(r));var p=r.filter(m=>{var b=u(m[f],n,m);return b&&o&&i!=null&&i.length&&(b=!i.some(v=>!!l&&v[s]===m[s])),b});return a&&(p=h(p)),p}function aK(t){return g$.apply(this,arguments)}function g$(){return(g$=gt(function*(t){var{dispatch:e,loadOptions:n,convertStringItemsToObjects:r,filterText:o}=t,i=yield n(o).catch(s=>{console.warn("svelte-select loadOptions error :>> ",s),e("error",{type:"loadOptions",details:s})});if(i&&!i.cancelled)return i?(i&&i.length>0&&typeof i[0]!="object"&&(i=r(i)),e("loaded",{items:i})):i=[],{filteredItems:i,loading:!1,focused:!0,listOpen:!0}})).apply(this,arguments)}It(` + svg.svelte-qbd276 { + width: var(--chevron-icon-width, 20px); + height: var(--chevron-icon-width, 20px); + color: var(--chevron-icon-colour, currentColor); + } +`);var lK=rl(``);It(` + svg.svelte-whdbu1 { + width: var(--clear-icon-width, 20px); + height: var(--clear-icon-width, 20px); + color: var(--clear-icon-color, currentColor); + } +`);var cK=rl(``);function Dv(t){H(t,cK())}It(` + .loading.svelte-1p3nqvd { + width: var(--spinner-width, 20px); + height: var(--spinner-height, 20px); + color: var(--spinner-color, var(--icons-color)); + animation: svelte-1p3nqvd-rotate 0.75s linear infinite; + transform-origin: center center; + transform: none; + } + + .circle_path.svelte-1p3nqvd { + stroke-dasharray: 90; + stroke-linecap: round; + } + + @keyframes svelte-1p3nqvd-rotate { + 100% { + transform: rotate(360deg); + } + } +`);var uK=rl('');It(` + .svelte-select.svelte-82qwg8 { + /* deprecating camelCase custom props in favour of kebab-case for v5 */ + --borderRadius: var(--border-radius); + --clearSelectColor: var(--clear-select-color); + --clearSelectWidth: var(--clear-select-width); + --disabledBackground: var(--disabled-background); + --disabledBorderColor: var(--disabled-border-color); + --disabledColor: var(--disabled-color); + --disabledPlaceholderColor: var(--disabled-placeholder-color); + --disabledPlaceholderOpacity: var(--disabled-placeholder-opacity); + --errorBackground: var(--error-background); + --errorBorder: var(--error-border); + --groupItemPaddingLeft: var(--group-item-padding-left); + --groupTitleColor: var(--group-title-color); + --groupTitleFontSize: var(--group-title-font-size); + --groupTitleFontWeight: var(--group-title-font-weight); + --groupTitlePadding: var(--group-title-padding); + --groupTitleTextTransform: var(--group-title-text-transform); + --groupTitleBorderColor: var(--group-title-border-color); + --groupTitleBorderWidth: var(--group-title-border-width); + --groupTitleBorderStyle: var(--group-title-border-style); + --indicatorColor: var(--chevron-color); + --indicatorHeight: var(--chevron-height); + --indicatorWidth: var(--chevron-width); + --inputColor: var(--input-color); + --inputLeft: var(--input-left); + --inputLetterSpacing: var(--input-letter-spacing); + --inputMargin: var(--input-margin); + --inputPadding: var(--input-padding); + --itemActiveBackground: var(--item-active-background); + --itemColor: var(--item-color); + --itemFirstBorderRadius: var(--item-first-border-radius); + --itemHoverBG: var(--item-hover-bg); + --itemHoverColor: var(--item-hover-color); + --itemIsActiveBG: var(--item-is-active-bg); + --itemIsActiveColor: var(--item-is-active-color); + --itemIsNotSelectableColor: var(--item-is-not-selectable-color); + --itemPadding: var(--item-padding); + --listBackground: var(--list-background); + --listBorder: var(--list-border); + --listBorderRadius: var(--list-border-radius); + --listEmptyColor: var(--list-empty-color); + --listEmptyPadding: var(--list-empty-padding); + --listEmptyTextAlign: var(--list-empty-text-align); + --listMaxHeight: var(--list-max-height); + --listPosition: var(--list-position); + --listShadow: var(--list-shadow); + --listZIndex: var(--list-z-index); + --multiItemBG: var(--multi-item-bg); + --multiItemBorderRadius: var(--multi-item-border-radius); + --multiItemDisabledHoverBg: var(--multi-item-disabled-hover-bg); + --multiItemDisabledHoverColor: var(--multi-item-disabled-hover-color); + --multiItemHeight: var(--multi-item-height); + --multiItemMargin: var(--multi-item-margin); + --multiItemPadding: var(--multi-item-padding); + --multiSelectInputMargin: var(--multi-select-input-margin); + --multiSelectInputPadding: var(--multi-select-input-padding); + --multiSelectPadding: var(--multi-select-padding); + --placeholderColor: var(--placeholder-color); + --placeholderOpacity: var(--placeholder-opacity); + --selectedItemPadding: var(--selected-item-padding); + --spinnerColor: var(--spinner-color); + --spinnerHeight: var(--spinner-height); + --spinnerWidth: var(--spinner-width); + + --internal-padding: 0 0 0 16px; + + border: var(--border, 1px solid #d8dbdf); + border-radius: var(--border-radius, 6px); + min-height: var(--height, 42px); + position: relative; + display: flex; + align-items: stretch; + padding: var(--padding, var(--internal-padding)); + background: var(--background, #fff); + margin: var(--margin, 0); + width: var(--width, 100%); + font-size: var(--font-size, 16px); + max-height: var(--max-height); + } + + .svelte-82qwg8 { + box-sizing: var(--box-sizing, border-box); + } + + .svelte-select.svelte-82qwg8:hover { + border: var(--border-hover, 1px solid #b2b8bf); + } + + .value-container.svelte-82qwg8 { + display: flex; + flex: 1 1 0%; + flex-wrap: wrap; + align-items: center; + gap: 5px 10px; + padding: var(--value-container-padding, 5px 0); + position: relative; + overflow: var(--value-container-overflow, hidden); + align-self: stretch; + } + + .prepend.svelte-82qwg8, + .indicators.svelte-82qwg8 { + display: flex; + flex-shrink: 0; + align-items: center; + } + + .indicators.svelte-82qwg8 { + position: var(--indicators-position); + top: var(--indicators-top); + right: var(--indicators-right); + bottom: var(--indicators-bottom); + } + + input.svelte-82qwg8 { + position: absolute; + cursor: default; + border: none; + color: var(--input-color, var(--item-color)); + padding: var(--input-padding, 0); + letter-spacing: var(--input-letter-spacing, inherit); + margin: var(--input-margin, 0); + min-width: 10px; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: transparent; + font-size: var(--font-size, 16px); + } + + .svelte-82qwg8:not(.multi) > .value-container:where(.svelte-82qwg8) > input:where(.svelte-82qwg8) { + width: 100%; + height: 100%; + } + + input.svelte-82qwg8::placeholder { + color: var(--placeholder-color, #78848f); + opacity: var(--placeholder-opacity, 1); + } + + input.svelte-82qwg8:focus { + outline: none; + } + + .svelte-select.focused.svelte-82qwg8 { + border: var(--border-focused, 1px solid #006fe8); + border-radius: var(--border-radius-focused, var(--border-radius, 6px)); + } + + .disabled.svelte-82qwg8 { + background: var(--disabled-background, #ebedef); + border-color: var(--disabled-border-color, #ebedef); + color: var(--disabled-color, #c1c6cc); + } + + .disabled.svelte-82qwg8 input:where(.svelte-82qwg8)::placeholder { + color: var(--disabled-placeholder-color, #c1c6cc); + opacity: var(--disabled-placeholder-opacity, 1); + } + + .selected-item.svelte-82qwg8 { + position: relative; + overflow: var(--selected-item-overflow, hidden); + padding: var(--selected-item-padding, 0 20px 0 0); + text-overflow: ellipsis; + white-space: nowrap; + color: var(--selected-item-color, inherit); + font-size: var(--font-size, 16px); + } + + .multi.svelte-82qwg8 .selected-item:where(.svelte-82qwg8) { + position: absolute; + line-height: var(--height, 42px); + height: var(--height, 42px); + } + + .selected-item.svelte-82qwg8:focus { + outline: none; + } + + .hide-selected-item.svelte-82qwg8 { + opacity: 0; + } + + .icon.svelte-82qwg8 { + display: flex; + align-items: center; + justify-content: center; + } + + .clear-select.svelte-82qwg8 { + all: unset; + display: flex; + align-items: center; + justify-content: center; + width: var(--clear-select-width, 40px); + height: var(--clear-select-height, 100%); + color: var(--clear-select-color, var(--icons-color)); + margin: var(--clear-select-margin, 0); + pointer-events: all; + flex-shrink: 0; + } + + .clear-select.svelte-82qwg8:focus { + outline: var(--clear-select-focus-outline, 1px solid #006fe8); + } + + .loading.svelte-82qwg8 { + width: var(--loading-width, 40px); + height: var(--loading-height); + color: var(--loading-color, var(--icons-color)); + margin: var(--loading--margin, 0); + flex-shrink: 0; + } + + .chevron.svelte-82qwg8 { + width: var(--chevron-width, 40px); + height: var(--chevron-height, 40px); + background: var(--chevron-background, transparent); + pointer-events: var(--chevron-pointer-events, none); + color: var(--chevron-color, var(--icons-color)); + border: var(--chevron-border, 0 0 0 1px solid #d8dbdf); + flex-shrink: 0; + } + + .multi.svelte-82qwg8 { + padding: var(--multi-select-padding, var(--internal-padding)); + } + + .multi.svelte-82qwg8 input:where(.svelte-82qwg8) { + padding: var(--multi-select-input-padding, 0); + position: relative; + margin: var(--multi-select-input-margin, 5px 0); + flex: 1 1 40px; + } + + .svelte-select.error.svelte-82qwg8 { + border: var(--error-border, 1px solid #ff2d55); + background: var(--error-background, #fff); + } + + .a11y-text.svelte-82qwg8 { + z-index: 9999; + border: 0px; + clip: rect(1px, 1px, 1px, 1px); + height: 1px; + width: 1px; + position: absolute; + overflow: hidden; + padding: 0px; + white-space: nowrap; + } + + .multi-item.svelte-82qwg8 { + background: var(--multi-item-bg, #ebedef); + margin: var(--multi-item-margin, 0); + outline: var(--multi-item-outline, 1px solid #ddd); + border-radius: var(--multi-item-border-radius, 4px); + height: var(--multi-item-height, 25px); + line-height: var(--multi-item-height, 25px); + display: flex; + cursor: default; + padding: var(--multi-item-padding, 0 5px); + overflow: hidden; + gap: var(--multi-item-gap, 4px); + outline-offset: -1px; + max-width: var(--multi-max-width, none); + color: var(--multi-item-color, var(--item-color)); + } + + .multi-item.disabled.svelte-82qwg8:hover { + background: var(--multi-item-disabled-hover-bg, #ebedef); + color: var(--multi-item-disabled-hover-color, #c1c6cc); + } + + .multi-item-text.svelte-82qwg8 { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .multi-item-clear.svelte-82qwg8 { + display: flex; + align-items: center; + justify-content: center; + --clear-icon-color: var(--multi-item-clear-icon-color, #000); + } + + .multi-item.active.svelte-82qwg8 { + outline: var(--multi-item-active-outline, 1px solid #006fe8); + } + + .svelte-select-list.svelte-82qwg8 { + box-shadow: var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24)); + border-radius: var(--list-border-radius, 4px); + max-height: var(--list-max-height, 252px); + overflow-y: auto; + background: var(--list-background, #fff); + position: var(--list-position, absolute); + z-index: var(--list-z-index, 2); + border: var(--list-border); + } + + .prefloat.svelte-82qwg8 { + opacity: 0; + pointer-events: none; + } + + .list-group-title.svelte-82qwg8 { + color: var(--group-title-color, #8f8f8f); + cursor: default; + font-size: var(--group-title-font-size, 16px); + font-weight: var(--group-title-font-weight, 600); + height: var(--height, 42px); + line-height: var(--height, 42px); + padding: var(--group-title-padding, 0 20px); + text-overflow: ellipsis; + overflow-x: hidden; + white-space: nowrap; + text-transform: var(--group-title-text-transform, uppercase); + border-width: var(--group-title-border-width, medium); + border-style: var(--group-title-border-style, none); + border-color: var(--group-title-border-color, color); + } + + .empty.svelte-82qwg8 { + text-align: var(--list-empty-text-align, center); + padding: var(--list-empty-padding, 20px 0); + color: var(--list-empty-color, #78848f); + } + + .item.svelte-82qwg8 { + cursor: default; + height: var(--item-height, var(--height, 42px)); + line-height: var(--item-line-height, var(--height, 42px)); + padding: var(--item-padding, 0 20px); + color: var(--item-color, inherit); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + transition: var(--item-transition, all 0.2s); + align-items: center; + width: 100%; + } + + .item.group-item.svelte-82qwg8 { + padding-left: var(--group-item-padding-left, 40px); + } + + .item.svelte-82qwg8:active { + background: var(--item-active-background, #b9daff); + } + + .item.active.svelte-82qwg8 { + background: var(--item-is-active-bg, #007aff); + color: var(--item-is-active-color, #fff); + } + + .item.first.svelte-82qwg8 { + border-radius: var(--item-first-border-radius, 4px 4px 0 0); + } + + .item.hover.svelte-82qwg8:not(.active) { + background: var(--item-hover-bg, #e7f2ff); + color: var(--item-hover-color, inherit); + } + + .item.not-selectable.svelte-82qwg8, + .item.hover.item.not-selectable.svelte-82qwg8, + .item.active.item.not-selectable.svelte-82qwg8, + .item.not-selectable.svelte-82qwg8:active { + color: var(--item-is-not-selectable-color, #999); + background: transparent; + } + + .required.svelte-82qwg8 { + opacity: 0; + z-index: -1; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +`);var dK=ue('
'),hK=ue('
No options
'),fK=ue('
'),pK=ue(' ',1),mK=ue('
'),gK=ue('
'),vK=ue('
'),bK=ue(''),yK=ue(''),wK=ue(''),xK=ue(''),jK=ue(''),kK=ue('
');function bl(t,e){var n=function(Y){var ve={};for(var He in Y.children&&(ve.default=!0),Y.$$slots)ve[He]=!0;return ve}(e);xt(e,!1);var r,o=U(),i=U(),s=U(),a=U(),l=U(),u=U(),d=U(),h=U(),f=U(),p=TH(),m=x(e,"justValue",12,null),b=x(e,"filter",8,sK),v=x(e,"getItems",8,aK),g=x(e,"id",8,null),y=x(e,"name",8,null),k=x(e,"container",12,void 0),S=x(e,"input",12,void 0),w=x(e,"multiple",8,!1),_=x(e,"multiFullItemClearable",8,!1),A=x(e,"disabled",8,!1),D=x(e,"focused",12,!1),E=x(e,"value",12,null),z=x(e,"filterText",12,""),G=x(e,"placeholder",8,"Please select"),F=x(e,"placeholderAlwaysShow",8,!1),se=x(e,"items",12,null),pe=x(e,"label",8,"label"),re=x(e,"itemFilter",8,(Y,ve,He)=>"".concat(Y).toLowerCase().includes(ve.toLowerCase())),Z=x(e,"groupBy",8,void 0),he=x(e,"groupFilter",8,Y=>Y),be=x(e,"groupHeaderSelectable",8,!1),fe=x(e,"itemId",8,"value"),J=x(e,"loadOptions",8,void 0),I=x(e,"containerStyles",8,""),Q=x(e,"hasError",8,!1),M=x(e,"filterSelectedItems",8,!0),C=x(e,"required",8,!1),$=x(e,"closeListOnChange",8,!0),oe=x(e,"clearFilterTextOnBlur",8,!0),_e=x(e,"createGroupHeaderItem",8,(Y,ve)=>({value:Y,[pe()]:Y})),q=()=>c(d),K=x(e,"searchable",8,!0),L=x(e,"inputStyles",8,""),xe=x(e,"clearable",8,!0),Je=x(e,"loading",12,!1),ce=x(e,"listOpen",12,!1),ae=x(e,"debounce",8,function(Y){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;clearTimeout(r),r=setTimeout(Y,ve)}),W=x(e,"debounceWait",8,300),it=x(e,"hideEmptyState",8,!1),vt=x(e,"inputAttributes",24,()=>({})),rt=x(e,"listAutoWidth",8,!0),Ee=x(e,"showChevron",8,!1),Ge=x(e,"listOffset",8,5),Ue=x(e,"hoverItemIndex",12,0),ft=x(e,"floatingConfig",24,()=>({})),Et=x(e,"class",8,""),et=U(),Pe=U(),O=U(),T=U(),N=U();function ne(Y){return Y.map((ve,He)=>({index:He,value:ve,label:"".concat(ve)}))}function X(Y){var ve=[],He={};Y.forEach(Vt=>{var Ft=Z()(Vt);ve.includes(Ft)||(ve.push(Ft),He[Ft]=[],Ft&&He[Ft].push(Object.assign(_e()(Ft,Vt),{id:Ft,groupHeader:!0,selectable:be()}))),He[Ft].push(Object.assign({groupItem:!!Ft},Vt))});var Xt=[];return he()(ve).forEach(Vt=>{He[Vt]&&Xt.push(...He[Vt])}),Xt}function me(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ve=arguments.length>1?arguments[1]:void 0;Ue(Y<0?0:Y),!ve&&Z()&&c(d)[Ue()]&&!c(d)[Ue()].selectable&&kn(1)}function te(){var Y=!0;if(E()){var ve=[],He=[];E().forEach(Xt=>{ve.includes(Xt[fe()])?Y=!1:(ve.push(Xt[fe()]),He.push(Xt))}),Y||E(He)}return Y}function qe(Y){var ve=Y?Y[fe()]:E()[fe()];return se().find(He=>He[fe()]===ve)}function Me(Y){return mt.apply(this,arguments)}function mt(){return(mt=gt(function*(Y){var ve=E()[Y];E().length===1?E(void 0):E(E().filter(He=>He!==ve)),p("clear",ve)})).apply(this,arguments)}function Bt(Y){if(D())switch(Y.stopPropagation(),Y.key){case"Escape":Y.preventDefault(),en();break;case"Enter":if(Y.preventDefault(),ce()){if(c(d).length===0)break;var ve=c(d)[Ue()];if(E()&&!w()&&E()[fe()]===ve[fe()]){en();break}tn(c(d)[Ue()])}break;case"ArrowDown":Y.preventDefault(),ce()?kn(1):(ce(!0),j(et,void 0));break;case"ArrowUp":Y.preventDefault(),ce()?kn(-1):(ce(!0),j(et,void 0));break;case"Tab":if(ce()&&D()){if(c(d).length===0||E()&&E()[fe()]===c(d)[Ue()][fe()])return en();Y.preventDefault(),tn(c(d)[Ue()]),en()}break;case"Backspace":if(!w()||z().length>0)return;if(w()&&E()&&E().length>0){if(Me(c(et)!==void 0?c(et):E().length-1),c(et)===0||c(et)===void 0)break;j(et,E().length>c(et)?c(et)-1:void 0)}break;case"ArrowLeft":if(!E()||!w()||z().length>0)return;c(et)===void 0?j(et,E().length-1):E().length>c(et)&&c(et)!==0&&j(et,c(et)-1);break;case"ArrowRight":if(!E()||!w()||z().length>0||c(et)===void 0)return;c(et)===E().length-1?j(et,void 0):c(et)0?ce(!0):void ce(!ce())}function Pn(){p("clear",E()),E(void 0),en(),We()}function en(){oe()&&z(""),ce(!1)}PH(gt(function*(){j(Pe,E()),j(O,z()),j(T,w())})),ko(()=>{ce()&&D(!0),D()&&S()&&S().focus()});var Tt=x(e,"ariaValues",8,Y=>"Option ".concat(Y,", selected.")),hn=x(e,"ariaListOpen",8,(Y,ve)=>"You are currently focused on option ".concat(Y,". There are ").concat(ve," results available.")),Kn=x(e,"ariaFocused",8,()=>"Select is focused, type to refine list, press down to open the menu."),lr,Ve=U(null);function kt(){clearTimeout(lr),lr=setTimeout(()=>{Qt=!1},100)}Ai(()=>{var Y;(Y=c(Ve))===null||Y===void 0||Y.remove()});var Qt=!1;function tn(Y){Y&&Y.selectable!==!1&&function(ve){if(ve){z("");var He=Object.assign({},ve);if(He.groupHeader&&!He.selectable)return;E(w()?E()?E().concat([He]):[He]:E(He)),setTimeout(()=>{$()&&en(),j(et,void 0),p("change",E()),p("select",ve)})}}(Y)}function an(Y){Qt||Ue(Y)}function kn(Y){if(c(d).filter(He=>!Object.hasOwn(He,"selectable")||He.selectable===!0).length===0)return Ue(0);Y>0&&Ue()===c(d).length-1?Ue(0):Y<0&&Ue()===0?Ue(c(d).length-1):Ue(Ue()+Y);var ve=c(d)[Ue()];ve&&ve.selectable===!1&&(Y!==1&&Y!==-1||kn(Y))}function Sn(Y,ve,He){if(!w())return ve&&ve[He]===Y[He]}var Yn=$r,zn=$r;function $r(Y){return{update(ve){ve.scroll&&(kt(),Y.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var vr=U({strategy:"absolute",placement:"bottom-start",middleware:[nK(Ge()),oK(),rK()],autoUpdate:!1}),[zr,cr,oo]=iK(c(vr)),Vr=U(!0);ie(()=>(B(se()),B(E())),()=>{se(),E()&&function(){if(typeof E()=="string"){var Y=(se()||[]).find(ve=>ve[fe()]===E());E(Y||{[fe()]:E(),label:E()})}else w()&&Array.isArray(E())&&E().length>0&&E(E().map(ve=>typeof ve=="string"?{value:ve,label:ve}:ve))}()}),ie(()=>(B(vt()),B(K())),()=>{!vt()&&K()||(j(N,Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},vt())),g()&&si(N,c(N).id=g()),K()||si(N,c(N).readonly=!0))}),ie(()=>B(w()),()=>{w()&&E()&&(Array.isArray(E())?E([...E()]):E([E()]))}),ie(()=>(c(T),B(w())),()=>{c(T)&&!w()&&E()&&E(null)}),ie(()=>(B(w()),B(E())),()=>{w()&&E()&&E().length>1&&te()}),ie(()=>B(E()),()=>{E()&&(w()?JSON.stringify(E())!==JSON.stringify(c(Pe))&&te()&&p("input",E()):c(Pe)&&JSON.stringify(E()[fe()])===JSON.stringify(c(Pe)[fe()])||p("input",E()))}),ie(()=>(B(E()),B(w()),c(Pe)),()=>{!E()&&w()&&c(Pe)&&p("input",E())}),ie(()=>(B(D()),B(S())),()=>{!D()&&S()&&en()}),ie(()=>(B(z()),c(O)),()=>{z()!==c(O)&&(J()||z().length!==0)&&(J()?ae()(gt(function*(){Je(!0);var Y=yield v()({dispatch:p,loadOptions:J(),convertStringItemsToObjects:ne,filterText:z()});Y?(Je(Y.loading),ce(ce()?Y.listOpen:z().length>0),D(ce()&&Y.focused),se(Z()?X(Y.filteredItems):Y.filteredItems)):(Je(!1),D(!0),ce(!0))}),W()):(ce(!0),w()&&j(et,void 0)))}),ie(()=>(B(b()),B(J()),B(z()),B(se()),B(w()),B(E()),B(fe()),B(Z()),B(pe()),B(M()),B(re())),()=>{j(d,b()({loadOptions:J(),filterText:z(),items:se(),multiple:w(),value:E(),itemId:fe(),groupBy:Z(),label:pe(),filterSelectedItems:M(),itemFilter:re(),convertStringItemsToObjects:ne,filterGroupedItems:X}))}),ie(()=>(B(w()),B(ce()),B(E()),c(d)),()=>{!w()&&ce()&&E()&&c(d)&&me(c(d).findIndex(Y=>Y[fe()]===E()[fe()]),!0)}),ie(()=>(B(ce()),B(w())),()=>{ce()&&w()&&Ue(0)}),ie(()=>B(z()),()=>{z()&&Ue(0)}),ie(()=>B(Ue()),()=>{var Y;Y=Ue(),p("hoverItem",Y)}),ie(()=>(B(w()),B(E())),()=>{j(o,w()?E()&&E().length>0:E())}),ie(()=>(c(o),B(z())),()=>{j(i,c(o)&&z().length>0)}),ie(()=>(c(o),B(xe()),B(A()),B(Je())),()=>{j(s,c(o)&&xe()&&!A()&&!Je())}),ie(()=>(B(F()),B(w()),B(G()),B(E())),()=>{var Y;j(a,F()&&w()||w()&&((Y=E())===null||Y===void 0?void 0:Y.length)===0?G():E()?"":G())}),ie(()=>(B(E()),B(w())),()=>{var Y,ve;j(l,E()?(Y=w(),ve=void 0,ve=Y&&E().length>0?E().map(He=>He[pe()]).join(", "):E()[pe()],Tt()(ve)):"")}),ie(()=>(c(d),B(Ue()),B(D()),B(ce())),()=>{j(u,function(){if(!c(d)||c(d).length===0)return"";var Y=c(d)[Ue()];if(ce()&&Y){var ve=c(d)?c(d).length:0;return hn()(Y[pe()],ve)}return Kn()()}((c(d),Ue(),D(),ce())))}),ie(()=>B(se()),()=>{(function(Y){Y&&Y.length!==0&&!Y.some(ve=>typeof ve!="object")&&E()&&(w()?!E().some(ve=>!ve||!ve[fe()]):E()[fe()])&&(Array.isArray(E())?E(E().map(ve=>qe(ve)||ve)):E(qe()||E()))})(se())}),ie(()=>(B(w()),B(E()),B(fe())),()=>{m((w(),E(),fe(),w()?E()?E().map(Y=>Y[fe()]):null:E()?E()[fe()]:E()))}),ie(()=>(B(w()),c(Pe),B(E())),()=>{w()||!c(Pe)||E()||p("input",E())}),ie(()=>(B(ce()),c(d),B(w()),B(E())),()=>{ce()&&c(d)&&!w()&&!E()&&me()}),ie(()=>c(d),()=>{(function(Y){ce()&&p("filter",Y)})(c(d))}),ie(()=>(B(k()),B(ft()),c(vr)),()=>{k()&&ft()&&oo(Object.assign(c(vr),ft()))}),ie(()=>c(Ve),()=>{j(h,!!c(Ve))}),ie(()=>(c(Ve),B(ce())),()=>{(function(Y,ve){if(!Y||!ve)return j(Vr,!0);setTimeout(()=>{j(Vr,!1)},0)})(c(Ve),ce())}),ie(()=>(B(ce()),B(k()),c(Ve)),()=>{ce()&&k()&&c(Ve)&&function(){var{width:Y}=k().getBoundingClientRect();si(Ve,c(Ve).style.width=rt()?Y+"px":"auto")}()}),ie(()=>B(Ue()),()=>{j(f,Ue())}),ie(()=>(B(S()),B(ce()),B(D())),()=>{S()&&ce()&&!D()&&We()}),ie(()=>(B(k()),B(ft())),()=>{var Y;k()&&((Y=ft())===null||Y===void 0?void 0:Y.autoUpdate)===void 0&&si(vr,c(vr).autoUpdate=!0)}),En(),_t();var er=kK();Oe("click",Xs,function(Y){var ve;ce()||D()||!k()||k().contains(Y.target)||(ve=c(Ve))!==null&&ve!==void 0&&ve.contains(Y.target)||on()}),Oe("keydown",Xs,Bt);var io=V(er),Lr=Y=>{var ve=fK(),He=V(ve),Xt=qt=>{var Un=un();xr(tt(Un),e,"list-prepend",{},null),H(qt,Un)};ge(He,qt=>{n["list-prepend"]&&qt(Xt)});var Vt=ee(He,2),Ft=qt=>{var Un=un();xr(tt(Un),e,"list",{get filteredItems(){return c(d)}},null),H(qt,Un)},Ln=qt=>{var Un=un(),xn=tt(Un),so=fn=>{var ln=un();Or(tt(ln),1,()=>c(d),Dr,(P,de,Ce)=>{var je=dK(),Te=V(je),Ke=Fe(()=>Sn(c(de),E(),fe()));$e(()=>lt(Te,"active",c(Ke)));var bt=Fe(()=>Ce===0);$e(()=>lt(Te,"first",c(bt))),xr(V(Te),e,"item",{get item(){return c(de)},index:Ce},ot=>{var St=Po();$e(()=>{var Zt;return Mt(St,(Zt=c(de))===null||Zt===void 0?void 0:Zt[pe()])}),H(ot,St)}),To(Te,(ot,St)=>Yn==null?void 0:Yn(ot),()=>({scroll:Sn(c(de),E(),fe()),listDom:c(h)})),To(Te,(ot,St)=>zn==null?void 0:zn(ot),()=>({scroll:c(f)===Ce,listDom:c(h)})),$e(()=>{var ot;lt(Te,"list-group-title",c(de).groupHeader),lt(Te,"hover",Ue()===Ce),lt(Te,"group-item",c(de).groupItem),lt(Te,"not-selectable",((ot=c(de))===null||ot===void 0?void 0:ot.selectable)===!1)}),Oe("mouseover",je,()=>an(Ce)),Oe("focus",je,()=>an(Ce)),Oe("click",je,Bi(()=>function(ot){var{item:St,i:Zt}=ot;if((St==null?void 0:St.selectable)!==!1)return E()&&!w()&&E()[fe()]===St[fe()]?en():void(function(Ht){return Ht.groupHeader&&Ht.selectable||Ht.selectable||!Ht.hasOwnProperty("selectable")}(St)&&(Ue(Zt),tn(St)))}({item:c(de),i:Ce}))),Oe("keydown",je,ga(Bi(function(ot){od.call(this,e,ot)}))),H(P,je)}),H(fn,ln)},Pt=fn=>{var ln=un(),P=tt(ln),de=Ce=>{var je=un();xr(tt(je),e,"empty",{},Te=>{H(Te,hK())}),H(Ce,je)};ge(P,Ce=>{it()||Ce(de)},!0),H(fn,ln)};ge(xn,fn=>{c(d).length>0?fn(so):fn(Pt,!1)},!0),H(qt,Un)};ge(Vt,qt=>{n.list?qt(Ft):qt(Ln,!1)});var Br=ee(Vt,2),br=qt=>{var Un=un();xr(tt(Un),e,"list-append",{},null),H(qt,Un)};ge(Br,qt=>{n["list-append"]&&qt(br)}),To(ve,qt=>cr==null?void 0:cr(qt)),ar(ve,qt=>j(Ve,qt),()=>c(Ve)),ho(()=>Oe("scroll",ve,kt)),ho(()=>Oe("pointerup",ve,ga(Bi(function(qt){od.call(this,e,qt)})))),ho(()=>Oe("mousedown",ve,ga(Bi(function(qt){od.call(this,e,qt)})))),$e(()=>lt(ve,"prefloat",c(Vr))),H(Y,ve)};ge(io,Y=>{ce()&&Y(Lr)});var ye=ee(io,2),Qe=V(ye),Dt=Y=>{var ve=pK(),He=tt(ve),Xt=V(He),Vt=V(ee(He,2));$e(()=>{Mt(Xt,c(l)),Mt(Vt,c(u))}),H(Y,ve)};ge(Qe,Y=>{D()&&Y(Dt)});var nn=ee(ye,2);xr(V(nn),e,"prepend",{},null);var Wt=ee(nn,2),yn=V(Wt),ke=Y=>{var ve=un(),He=tt(ve),Xt=Ft=>{var Ln=un();Or(tt(Ln),1,E,Dr,(Br,br,qt)=>{var Un=gK(),xn=V(Un);xr(V(xn),e,"selection",{get selection(){return c(br)},index:qt},fn=>{var ln=Po();$e(()=>Mt(ln,c(br)[pe()])),H(fn,ln)});var so=ee(xn,2),Pt=fn=>{var ln=mK();xr(V(ln),e,"multi-clear-icon",{},P=>{Dv(P)}),Oe("pointerup",ln,ga(Bi(()=>Me(qt)))),H(fn,ln)};ge(so,fn=>{A()||_()||!Dv||fn(Pt)}),$e(()=>{lt(Un,"active",c(et)===qt),lt(Un,"disabled",A())}),Oe("click",Un,ga(()=>_()?Me(qt):{})),Oe("keydown",Un,ga(Bi(function(fn){od.call(this,e,fn)}))),H(Br,Un)}),H(Ft,Ln)},Vt=Ft=>{var Ln=vK();xr(V(Ln),e,"selection",{get selection(){return E()}},Br=>{var br=Po();$e(()=>Mt(br,E()[pe()])),H(Br,br)}),$e(()=>lt(Ln,"hide-selected-item",c(i))),H(Ft,Ln)};ge(He,Ft=>{w()?Ft(Xt):Ft(Vt,!1)}),H(Y,ve)};ge(yn,Y=>{c(o)&&Y(ke)});var Ye,pt=ee(yn,2);ar(pt,Y=>S(Y),()=>S());var sn=ee(Wt,2),Nn=V(sn),tr=Y=>{var ve=bK();xr(V(ve),e,"loading-icon",{},He=>{(function(Xt){H(Xt,uK())})(He)}),H(Y,ve)};ge(Nn,Y=>{Je()&&Y(tr)});var Ut=ee(Nn,2),qn=Y=>{var ve=yK();xr(V(ve),e,"clear-icon",{},He=>{Dv(He)}),Oe("click",ve,Pn),H(Y,ve)};ge(Ut,Y=>{c(s)&&Y(qn)});var Qr=ee(Ut,2),Yr=Y=>{var ve=wK();xr(V(ve),e,"chevron-icon",{get listOpen(){return ce()}},He=>{(function(Xt){H(Xt,lK())})(He)}),H(Y,ve)};ge(Qr,Y=>{Ee()&&Y(Yr)});var Yt=ee(sn,2);xr(Yt,e,"input-hidden",{get value(){return E()}},Y=>{var ve=xK();$e(()=>Fl(ve,E()?JSON.stringify(E()):null)),$e(()=>Tn(ve,"name",y())),H(Y,ve)});var wn=ee(Yt,2),dt=Y=>{var ve=un();xr(tt(ve),e,"required",{get value(){return E()}},He=>{H(He,jK())}),H(Y,ve)};return ge(wn,Y=>{!C()||E()&&E().length!==0||Y(dt)}),ho(()=>Oe("pointerup",er,ga($n))),ar(er,Y=>k(Y),()=>k()),To(er,Y=>zr==null?void 0:zr(Y)),$e(()=>{var Y;ui(er,"svelte-select ".concat((Y=Et())!==null&&Y!==void 0?Y:""," svelte-82qwg8")),Tn(er,"style",I()),lt(er,"multi",w()),lt(er,"disabled",A()),lt(er,"focused",D()),lt(er,"list-open",ce()),lt(er,"show-chevron",Ee()),lt(er,"error",Q()),Ye=lp(pt,Ye,De(De({readOnly:!K()},c(N)),{},{placeholder:c(a),style:L(),disabled:A()}),"svelte-82qwg8")}),Oe("keydown",pt,Bt),Oe("blur",pt,on),Oe("focus",pt,We),lm(pt,z),H(t,er),zt(e,"getFilteredItems",q),zt(e,"handleClear",Pn),jt({getFilteredItems:q,handleClear:Pn})}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +table.jse-transform-wizard.svelte-qbze6z { + border-collapse: collapse; + border-spacing: 0; + width: 100%; +} +table.jse-transform-wizard.svelte-qbze6z input:where(.svelte-qbze6z) { + font-family: inherit; + font-size: inherit; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) th:where(.svelte-qbze6z) { + font-weight: normal; + text-align: left; + width: 60px; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) { + width: 100%; + display: flex; + flex-direction: row; + margin-bottom: calc(0.5 * var(--jse-padding, 10px)); +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select .multi-item { + align-items: center; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select .value-container { + gap: 0 !important; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select.jse-filter-path { + flex: 4; + margin-right: calc(0.5 * var(--jse-padding, 10px)); +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select.jse-filter-relation { + flex: 1.5; + margin-right: calc(0.5 * var(--jse-padding, 10px)); +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select.jse-sort-path { + flex: 3; + margin-right: calc(0.5 * var(--jse-padding, 10px)); +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select.jse-sort-direction { + flex: 1; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select.jse-projection-paths { + flex: 1; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .svelte-select input { + box-sizing: border-box; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .jse-filter-value:where(.svelte-qbze6z) { + flex: 4; + padding: 4px 8px; + border: var(--jse-input-border, 1px solid #d8dbdf); + border-radius: var(--jse-input-radius, 3px); + outline: none; + background: var(--jse-input-background, var(--jse-background-color, #fff)); + color: inherit; +} +table.jse-transform-wizard.svelte-qbze6z tr:where(.svelte-qbze6z) td:where(.svelte-qbze6z) .jse-horizontal:where(.svelte-qbze6z) .jse-filter-value:where(.svelte-qbze6z):focus { + border: var(--jse-input-border-focus, 1px solid var(--jse-input-border-focus, var(--jse-theme-color, #3883fa))); +}`);var SK=ue('
Filter
Sort
Pick
');function CK(t,e){var n,r,o,i,s;xt(e,!1);var a=U(void 0,!0),l=U(void 0,!0),u=U(void 0,!0),d=U(void 0,!0),h=U(void 0,!0),f=U(void 0,!0),p=ro("jsoneditor:TransformWizard"),m=x(e,"json",9),b=x(e,"queryOptions",29,()=>({})),v=x(e,"onChange",9),g=["==","!=","<","<=",">",">="].map(M=>({value:M,label:M})),y=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],k=U((n=b())!==null&&n!==void 0&&(n=n.filter)!==null&&n!==void 0&&n.path?xa(b().filter.path):void 0,!0),S=U((r=g.find(M=>{var C;return M.value===((C=b().filter)===null||C===void 0?void 0:C.relation)}))!==null&&r!==void 0?r:g[0],!0),w=U(((o=b())===null||o===void 0||(o=o.filter)===null||o===void 0?void 0:o.value)||"",!0),_=U((i=b())!==null&&i!==void 0&&(i=i.sort)!==null&&i!==void 0&&i.path?xa(b().sort.path):void 0,!0),A=U((s=y.find(M=>{var C;return M.value===((C=b().sort)===null||C===void 0?void 0:C.direction)}))!==null&&s!==void 0?s:y[0],!0);ie(()=>B(m()),()=>{j(a,Array.isArray(m()))}),ie(()=>(c(a),B(m())),()=>{j(l,c(a)?kb(m()):[])}),ie(()=>(c(a),B(m())),()=>{j(u,c(a)?kb(m(),!0):[])}),ie(()=>(c(l),xa),()=>{j(d,c(l).map(xa))}),ie(()=>(c(u),xa),()=>{j(h,c(u)?c(u).map(xa):[])}),ie(()=>(B(b()),c(h),gn),()=>{var M;j(f,(M=b())!==null&&M!==void 0&&(M=M.projection)!==null&&M!==void 0&&M.paths&&c(h)?b().projection.paths.map(C=>c(h).find($=>gn($.value,C))).filter(C=>!!C):void 0)}),ie(()=>c(k),()=>{var M,C,$;C=(M=c(k))===null||M===void 0?void 0:M.value,gn(($=b())===null||$===void 0||($=$.filter)===null||$===void 0?void 0:$.path,C)||(p("changeFilterPath",C),b(Go(b(),["filter","path"],C,!0)),v()(b()))}),ie(()=>c(S),()=>{var M,C,$;C=(M=c(S))===null||M===void 0?void 0:M.value,gn(($=b())===null||$===void 0||($=$.filter)===null||$===void 0?void 0:$.relation,C)||(p("changeFilterRelation",C),b(Go(b(),["filter","relation"],C,!0)),v()(b()))}),ie(()=>c(w),()=>{var M,C;M=c(w),gn((C=b())===null||C===void 0||(C=C.filter)===null||C===void 0?void 0:C.value,M)||(p("changeFilterValue",M),b(Go(b(),["filter","value"],M,!0)),v()(b()))}),ie(()=>c(_),()=>{var M,C,$;C=(M=c(_))===null||M===void 0?void 0:M.value,gn(($=b())===null||$===void 0||($=$.sort)===null||$===void 0?void 0:$.path,C)||(p("changeSortPath",C),b(Go(b(),["sort","path"],C,!0)),v()(b()))}),ie(()=>c(A),()=>{var M,C,$;C=(M=c(A))===null||M===void 0?void 0:M.value,gn(($=b())===null||$===void 0||($=$.sort)===null||$===void 0?void 0:$.direction,C)||(p("changeSortDirection",C),b(Go(b(),["sort","direction"],C,!0)),v()(b()))}),ie(()=>c(f),()=>{(function(M){var C;gn((C=b())===null||C===void 0||(C=C.projection)===null||C===void 0?void 0:C.paths,M)||(p("changeProjectionPaths",M),b(Go(b(),["projection","paths"],M,!0)),v()(b()))})(c(f)?c(f).map(M=>M.value):void 0)}),En(),_t(!0);var D=SK(),E=V(D),z=V(E),G=ee(V(z)),F=V(G),se=V(F);bl(se,{class:"jse-filter-path",showChevron:!0,get items(){return c(d)},get value(){return c(k)},set value(M){j(k,M)},$$legacy:!0});var pe=ee(se,2);bl(pe,{class:"jse-filter-relation",showChevron:!0,clearable:!1,items:g,get value(){return c(S)},set value(M){j(S,M)},$$legacy:!0});var re=ee(pe,2),Z=ee(z),he=ee(V(Z)),be=V(he),fe=V(be);bl(fe,{class:"jse-sort-path",showChevron:!0,get items(){return c(d)},get value(){return c(_)},set value(M){j(_,M)},$$legacy:!0}),bl(ee(fe,2),{class:"jse-sort-direction",showChevron:!0,clearable:!1,items:y,get value(){return c(A)},set value(M){j(A,M)},$$legacy:!0});var J=ee(Z),I=ee(V(J)),Q=V(I);bl(V(Q),{class:"jse-projection-paths",multiple:!0,showChevron:!0,get items(){return c(h)},get value(){return c(f)},set value(M){j(f,M)},$$legacy:!0}),lm(re,()=>c(w),M=>j(w,M)),H(t,D),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-select-query-language.svelte-atm4um { + position: relative; + width: 32px; +} +.jse-select-query-language.svelte-atm4um .jse-select-query-language-container:where(.svelte-atm4um) { + position: absolute; + top: 0; + right: 0; + display: flex; + flex-direction: column; + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); +} +.jse-select-query-language.svelte-atm4um .jse-select-query-language-container:where(.svelte-atm4um) .jse-query-language:where(.svelte-atm4um) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + text-align: left; + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + white-space: nowrap; + color: var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff)); + background: var(--jse-context-menu-background, #656565); +} +.jse-select-query-language.svelte-atm4um .jse-select-query-language-container:where(.svelte-atm4um) .jse-query-language:where(.svelte-atm4um):hover { + background: var(--jse-context-menu-background-highlight, #7a7a7a); +}`);var OK=ue(''),_K=ue('
');function EK(t,e){xt(e,!1);var n=x(e,"queryLanguages",8),r=x(e,"queryLanguageId",12),o=x(e,"onChangeQueryLanguage",8);_t();var i=_K();Or(V(i),5,n,Dr,(s,a)=>{var l=OK(),u=V(l),d=p=>{vn(p,{data:qC})},h=p=>{vn(p,{data:UC})};ge(u,p=>{c(a).id===r()?p(d):p(h,!1)});var f=ee(u);$e(()=>{var p;Tn(l,"title","Select ".concat(c(a).name," as query language")),lt(l,"selected",c(a).id===r()),Mt(f," ".concat((p=c(a).name)!==null&&p!==void 0?p:""))}),Oe("click",l,()=>{return p=c(a).id,r(p),void o()(p);var p}),H(s,l)}),H(t,i),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-header.svelte-1y24war { + display: flex; + background: var(--jse-theme-color, #3883fa); + color: var(--jse-menu-color, var(--jse-text-color-inverse, #fff)); +} +.jse-header.svelte-1y24war .jse-title:where(.svelte-1y24war) { + flex: 1; + padding: 5px; + vertical-align: middle; +} +.jse-header.svelte-1y24war button:where(.svelte-1y24war) { + border: none; + background: transparent; + min-width: 32px; + color: inherit; + cursor: pointer; +} +.jse-header.svelte-1y24war button:where(.svelte-1y24war):hover { + background: rgba(255, 255, 255, 0.1); +}`);var AK=ue(''),$K=ue('
');function ym(t,e){xt(e,!1);var n=x(e,"title",9,"Modal"),r=x(e,"fullScreenButton",9,!1),o=x(e,"fullscreen",13,!1),i=x(e,"onClose",9,void 0);_t(!0);var s=$K(),a=V(s),l=V(a),u=ee(a,2);xr(u,e,"actions",{},null);var d=ee(u,2),h=p=>{var m=AK(),b=V(m),v=Fe(()=>o()?_R:e9);vn(b,{get data(){return c(v)}}),Oe("click",m,()=>o(!o())),H(p,m)};ge(d,p=>{r()&&p(h)});var f=ee(d,2);vn(V(f),{data:Bm}),$e(()=>Mt(l,n())),Oe("click",f,()=>{var p;return(p=i())===null||p===void 0?void 0:p()}),H(t,s),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-config.svelte-1kpylsp { + border: none; + background: transparent; + min-width: 32px; + color: inherit; + cursor: pointer; +} +.jse-config.svelte-1kpylsp:hover { + background: rgba(255, 255, 255, 0.1); +} +.jse-config.hide.svelte-1kpylsp { + display: none; +}`);var MK=ue(''),Iv=ro("jsoneditor:AutoScrollHandler");function Zk(t){var e,n;function r(a){return a<20?200:a<50?400:1200}function o(){if(t){var a=.05*(e||0);t.scrollTop+=a}}function i(a){n&&a===e||(s(),Iv("startAutoScroll",a),e=a,n=setInterval(o,50))}function s(){n&&(Iv("stopAutoScroll"),clearInterval(n),n=void 0,e=void 0)}return Iv("createAutoScrollHandler",t),{onDrag:function(a){if(t){var l=a.clientY,{top:u,bottom:d}=t.getBoundingClientRect();ld?i(r(l-d)):s()}},onDragEnd:function(){s()}}}var TK=(t,e,n,r)=>(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e,v$=()=>{var t,e,n,r,o,i,s,a,l,u,d,h,f;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+n}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function b(v){u||(u=v),m(i(d=v-u,n,a,l)),f=!0,d1&&arguments[1]!==void 0?arguments[1]:{};switch(l=1e3,o=g.offset||0,h=g.callback,i=g.easing||TK,s=g.a11y||!1,typeof g.container){case"object":t=g.container;break;case"string":t=document.querySelector(g.container);break;default:t=window.document.documentElement}switch(n=t.scrollTop,typeof v){case"number":e=void 0,s=!1,r=n+v;break;case"object":r=p(e=v);break;case"string":e=document.querySelector(v),r=p(e)}switch(a=r-n+o,typeof g.duration){case"number":l=g.duration;break;case"function":l=g.duration(a)}f?u=0:requestAnimationFrame(b)}};function Ac(t,e){var n=Date.now(),r=t();return e(Date.now()-n),r}var yc=ro("validation"),PK={createObjectDocumentState:()=>({type:"object",properties:{}}),createArrayDocumentState:()=>({type:"array",items:[]}),createValueDocumentState:()=>({type:"value"})};function eS(t,e,n,r){return hw(t,e,n,r,PK)}function b$(t,e,n,r){if(yc("validateJSON"),!e)return[];if(n!==r){var o=n.stringify(t);return e(o!==void 0?r.parse(o):void 0)}return e(t)}function RK(t,e,n,r){if(yc("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Yi.info}]};if(t.length!==0)try{var o=Ac(()=>n.parse(t),l=>yc("validate: parsed json in ".concat(l," ms")));if(!e)return;var i=n===r?o:Ac(()=>r.parse(t),l=>yc("validate: parsed json with the validationParser in ".concat(l," ms"))),s=Ac(()=>e(i),l=>yc("validate: validated json in ".concat(l," ms")));return Jn(s)?void 0:{validationErrors:s}}catch(l){var a=Ac(()=>function(u,d){if(u.length>jW)return!1;try{return d.parse(Ss(u)),!0}catch{return!1}}(t,n),u=>yc("validate: checked whether repairable in ".concat(u," ms")));return{parseError:cu(t,l.message||l.toString()),isRepairable:a}}}var Rf=ro("jsoneditor:FocusTracker");function yw(t){var e,{onMount:n,onDestroy:r,getWindow:o,hasFocus:i,onFocus:s,onBlur:a}=t,l=!1;function u(){var h=i();h&&(clearTimeout(e),l||(Rf("focus"),s(),l=h))}function d(){l&&(clearTimeout(e),e=setTimeout(()=>{i()||(Rf("blur"),l=!1,a())}))}n(()=>{Rf("mount FocusTracker");var h=o();h&&(h.addEventListener("focusin",u,!0),h.addEventListener("focusout",d,!0))}),r(()=>{Rf("destroy FocusTracker");var h=o();h&&(h.removeEventListener("focusin",u,!0),h.removeEventListener("focusout",d,!0))})}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-message.svelte-czprfx { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + padding: var(--jse-padding, 10px); + display: flex; + gap: var(--jse-padding, 10px); + flex-wrap: wrap; + align-items: stretch; +} +.jse-message.jse-success.svelte-czprfx { + background: var(--message-success-background, #9ac45d); + color: var(--jse-message-success-color, #fff); +} +.jse-message.svelte-czprfx .jse-text:where(.svelte-czprfx) { + display: flex; + flex: 1; + min-width: 60%; + align-items: center; +} +.jse-message.svelte-czprfx .jse-text.jse-clickable:where(.svelte-czprfx) { + cursor: pointer; +} +.jse-message.svelte-czprfx .jse-text.jse-clickable:where(.svelte-czprfx):hover { + background-color: rgba(255, 255, 255, 0.1); +} +.jse-message.jse-error.svelte-czprfx { + background: var(--jse-message-error-background, var(--jse-error-color, #ee5341)); + color: var(--jse-message-error-color, #fff); +} +.jse-message.jse-warning.svelte-czprfx { + background: var(--jse-message-warning-background, #ffde5c); + color: var(--jse-message-warning-color, #4d4d4d); +} +.jse-message.jse-info.svelte-czprfx { + background: var(--jse-message-info-background, #4f91ff); + color: var(--jse-message-info-color, #fff); +} +.jse-message.svelte-czprfx .jse-actions:where(.svelte-czprfx) { + display: flex; + gap: var(--jse-padding, 10px); +} +.jse-message.svelte-czprfx .jse-actions:where(.svelte-czprfx) button.jse-action:where(.svelte-czprfx) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-message-action-background, rgba(255, 255, 255, 0.2)); + color: inherit; + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px); +} +.jse-message.svelte-czprfx .jse-actions:where(.svelte-czprfx) button.jse-action:where(.svelte-czprfx):hover { + background: var(--jse-message-action-background-highlight, rgba(255, 255, 255, 0.3)); +}`);var NK=ue(''),DK=ue('
');function ns(t,e){xt(e,!1);var n=x(e,"type",9,"success"),r=x(e,"icon",9,void 0),o=x(e,"message",9,void 0),i=x(e,"actions",25,()=>[]),s=x(e,"onClick",9,void 0),a=x(e,"onClose",9,void 0);a()&&Ai(a()),_t(!0);var l=DK(),u=V(l),d=V(u),h=V(d),f=m=>{vn(m,{get data(){return r()}})};ge(h,m=>{r()&&m(f)});var p=ee(h);Or(ee(u,2),5,i,Dr,(m,b)=>{var v=NK(),g=V(v),y=S=>{vn(S,{get data(){return c(b).icon}})};ge(g,S=>{c(b).icon&&S(y)});var k=ee(g);$e(()=>{var S;Tn(v,"title",c(b).title),v.disabled=c(b).disabled,Mt(k," ".concat((S=c(b).text)!==null&&S!==void 0?S:""))}),Oe("click",v,()=>{c(b).onClick&&c(b).onClick()}),Oe("mousedown",v,()=>{c(b).onMouseDown&&c(b).onMouseDown()}),H(m,v)}),$e(()=>{var m,b;ui(l,"jse-message jse-".concat((m=n())!==null&&m!==void 0?m:""," svelte-czprfx")),lt(u,"jse-clickable",!!s()),Mt(p," ".concat((b=o())!==null&&b!==void 0?b:""))}),Oe("click",u,function(){s()&&s()()}),H(t,l),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-validation-errors-overview.svelte-1uindol { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + overflow: auto; + max-height: 25%; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) { + border-collapse: collapse; + width: 100%; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) { + cursor: pointer; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr.jse-validation-error:where(.svelte-1uindol) { + background: var(--jse-message-error-background, var(--jse-error-color, #ee5341)); + color: var(--jse-message-error-color, #fff); +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr.jse-validation-warning:where(.svelte-1uindol) { + background: var(--jse-message-warning-background, #ffde5c); + color: var(--jse-message-warning-color, #4d4d4d); +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr.jse-validation-warning:where(.svelte-1uindol):hover { + filter: brightness(105%); +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr.jse-validation-info:where(.svelte-1uindol) { + background: var(--jse-message-info-background, #4f91ff); + color: var(--jse-message-info-color, #fff); +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol):hover { + filter: brightness(110%); +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) td:where(.svelte-1uindol) { + padding: 4px var(--jse-padding, 10px); + vertical-align: middle; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) td.jse-validation-error-icon:where(.svelte-1uindol) { + width: 36px; + box-sizing: border-box; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) td.jse-validation-error-action:where(.svelte-1uindol) { + width: 36px; + box-sizing: border-box; + padding: 0; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) td.jse-validation-error-action:where(.svelte-1uindol) button.jse-validation-errors-collapse:where(.svelte-1uindol) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + width: 36px; + height: 26px; + cursor: pointer; +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) td.jse-validation-error-action:where(.svelte-1uindol) button.jse-validation-errors-collapse:where(.svelte-1uindol):hover { + background-color: rgba(255, 255, 255, 0.2); +} +.jse-validation-errors-overview.svelte-1uindol table:where(.svelte-1uindol) tr:where(.svelte-1uindol) td:where(.svelte-1uindol) div.jse-validation-errors-expand:where(.svelte-1uindol) { + display: inline-block; + position: relative; + top: 3px; +}`);var IK=ue(''),zK=ue(' '),LK=ue(' '),BK=ue('
'),FK=ue('
'),qK=ue('
');function ww(t,e){xt(e,!1);var n=U(void 0,!0),r=x(e,"validationErrors",9),o=x(e,"selectError",9),i=U(!0,!0);function s(){j(i,!1)}function a(){j(i,!0)}ie(()=>B(r()),()=>{j(n,r().length)}),En(),_t(!0);var l=un(),u=tt(l),d=h=>{var f=qK(),p=V(f),m=v=>{var g=BK(),y=V(g),k=V(y);Or(k,1,()=>MA(r(),100),Dr,(_,A,D)=>{var E=zK(),z=V(E);vn(V(z),{data:Tl});var G=ee(z),F=V(G);$e(()=>Mt(F,Wi(c(A).path)));var se=ee(G),pe=V(se),re=V(ee(se)),Z=he=>{var be=IK();vn(V(be),{data:GR}),Oe("click",be,Bi(s)),H(he,be)};ge(re,he=>{D===0&&r().length>1&&he(Z)}),$e(()=>{var he;ui(E,"jse-validation-".concat((he=c(A).severity)!==null&&he!==void 0?he:""," svelte-1uindol")),Mt(pe,c(A).message)}),Oe("click",E,()=>{setTimeout(()=>o()(c(A)))}),H(_,E)});var S=ee(k),w=_=>{var A=LK(),D=ee(V(A),2),E=V(D);$e(()=>{var z;return Mt(E,"(and ".concat((z=c(n)-100)!==null&&z!==void 0?z:""," more errors)"))}),H(_,A)};ge(S,_=>{c(n)>100&&_(w)}),H(v,g)},b=v=>{var g=FK(),y=V(g),k=V(y),S=Fe(()=>{var A,D;return"jse-validation-".concat((D=r(),(A=[Yi.error,Yi.warning,Yi.info].find(E=>D.some(z=>z.severity===E)))!==null&&A!==void 0?A:"")," svelte-1uindol")}),w=V(k);vn(V(w),{data:Tl});var _=V(ee(w));vn(V(ee(_)),{data:WC}),$e(()=>{var A;ui(k,c(S)),Mt(_,"".concat((A=c(n))!==null&&A!==void 0?A:""," validation errors "))}),Oe("click",k,a),H(v,g)};ge(p,v=>{c(i)||c(n)===1?v(m):v(b,!1)}),H(h,f)};ge(u,h=>{Jn(r())||h(d)}),H(t,l),jt()}function wm(t,e){if(t)return t.addEventListener("keydown",n),{destroy(){t.removeEventListener("keydown",n)}};function n(r){r.key==="Escape"&&(r.preventDefault(),r.stopPropagation(),e())}}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +dialog.jse-modal.svelte-1s9c2ql { + border-radius: 3px; + font-size: var(--jse-padding, 10px); + border: none; + padding: 0; + display: flex; + min-width: 0; + margin: auto; + overflow: visible; + transition: width 0.1s ease-in-out, height 0.1s ease-in-out; +} +dialog.jse-modal.jse-sort-modal.svelte-1s9c2ql { + width: 400px; +} +dialog.jse-modal.jse-repair-modal.svelte-1s9c2ql { + width: 600px; + height: 500px; +} +dialog.jse-modal.jse-jsoneditor-modal.svelte-1s9c2ql { + width: 800px; + height: 600px; +} +dialog.jse-modal.jse-transform-modal.svelte-1s9c2ql { + width: 1200px; + height: 800px; +} +dialog.jse-modal.jse-fullscreen.svelte-1s9c2ql { + width: 100%; + height: 100%; +} +dialog.jse-modal.svelte-1s9c2ql::backdrop { + background: var(--jse-overlay-background, rgba(0, 0, 0, 0.3)); +} +dialog.jse-modal[open].svelte-1s9c2ql { + animation: svelte-1s9c2ql-zoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); +} +dialog.jse-modal[open].svelte-1s9c2ql::backdrop { + animation: svelte-1s9c2ql-fade 0.2s ease-out; +} +dialog.jse-modal.svelte-1s9c2ql .jse-modal-inner:where(.svelte-1s9c2ql) { + flex: 1; + display: flex; + flex-direction: column; + min-width: 0; + min-height: 0; + padding: 0; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + line-height: normal; + background: var(--jse-modal-background, #f5f5f5); + color: var(--jse-text-color, #4d4d4d); +} +@keyframes svelte-1s9c2ql-zoom { + from { + transform: scale(0.95); + } + to { + transform: scale(1); + } +} +@keyframes svelte-1s9c2ql-fade { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +dialog.jse-modal.svelte-1s9c2ql .svelte-select { + --border: var(--jse-svelte-select-border, 1px solid #d8dbdf); + --item-is-active-bg: var(--jse-item-is-active-bg, #3883fa); + --border-radius: var(--jse-svelte-select-border-radius, 3px); + --background: var(--jse-svelte-select-background, #fff); + --padding: var(--jse-svelte-select-padding, 0 10px); + --multi-select-padding: var(--jse-svelte-select-multi-select-padding, 0 10px); + --font-size: var(--jse-svelte-select-font-size, var(--jse-font-size, 16px)); + --height: 36px; + --multi-item-height: 28px; + --multi-item-margin: 2px; + --multi-item-padding: 2px 8px; + --multi-item-border-radius: 6px; + --indicator-top: 8px; +}`);var UK=ue('
');function ih(t,e){xt(e,!1);var n=x(e,"className",8,void 0),r=x(e,"fullscreen",8,!1),o=x(e,"onClose",8),i=U();function s(){o()()}ko(()=>c(i).showModal()),Ai(()=>c(i).close()),_t();var a=UK(),l=Fe(()=>{var d;return"".concat((d=Mu("jse-modal",n()))!==null&&d!==void 0?d:""," svelte-1s9c2ql")}),u=V(a);xr(V(u),e,"default",{},null),ar(a,d=>j(i,d),()=>c(i)),ho(()=>Oe("close",a,s)),ho(()=>{return Oe("pointerdown",a,(d=s,function(){for(var h=arguments.length,f=new Array(h),p=0;pOe("cancel",a,ga(function(d){od.call(this,e,d)}))),To(a,(d,h)=>wm==null?void 0:wm(d,h),()=>s),$e(()=>{ui(a,c(l)),lt(a,"jse-fullscreen",r())}),H(t,a),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-modal-contents.svelte-189qksl { + flex: 1; + display: flex; + flex-direction: column; + padding: 20px; + overflow: auto; + min-width: 0; + min-height: 0; +} +.jse-modal-contents.svelte-189qksl .jse-actions:where(.svelte-189qksl) { + display: flex; + flex-direction: row; + justify-content: flex-end; + padding-top: var(--jse-padding, 10px); +} +.jse-modal-contents.svelte-189qksl .jse-actions:where(.svelte-189qksl) button.jse-primary:where(.svelte-189qksl) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-primary-background, var(--jse-theme-color, #3883fa)); + color: var(--jse-button-primary-color, #fff); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-modal-contents.svelte-189qksl .jse-actions:where(.svelte-189qksl) button.jse-primary:where(.svelte-189qksl):hover { + background: var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff)); +} +.jse-modal-contents.svelte-189qksl .jse-actions:where(.svelte-189qksl) button.jse-primary:where(.svelte-189qksl):disabled { + background: var(--jse-button-primary-background-disabled, #9d9d9d); +} + +.jse-shortcuts.svelte-189qksl { + display: flex; + flex-wrap: wrap; + justify-content: space-around; + margin: calc(2 * var(--jse-padding, 10px)) 0; +} +.jse-shortcuts.svelte-189qksl .jse-shortcut:where(.svelte-189qksl) .jse-key:where(.svelte-189qksl) { + font-size: 200%; + color: var(--jse-theme-color, #3883fa); +}`);var VK=ue('
These actions are unavailable via the menu. Please use:
for copy
for cut
for paste
',1);function y$(t,e){xt(e,!1);var n=x(e,"onClose",9),r=ow()?"⌘":"Ctrl";_t(!0),ih(t,{get onClose(){return n()},className:"jse-copy-paste",children:(o,i)=>{var s=VK(),a=tt(s);ym(a,{title:"Copying and pasting",get onClose(){return n()}});var l=ee(a,2),u=ee(V(l),2),d=V(u);V(d).textContent="".concat(r??"","+C");var h=ee(d,2);V(h).textContent="".concat(r??"","+X"),V(ee(h,2)).textContent="".concat(r??"","+V"),Oe("click",V(ee(u,2)),function(){for(var f,p=arguments.length,m=new Array(p),b=0;b'),WK=ue('
'),KK=ue(''),JK=ue('
');function xg(t,e){xt(e,!1);var n=x(e,"items",25,()=>[]);_t(!0);var r=JK(),o=V(r);xr(o,e,"left",{},null);var i=ee(o,2);Or(i,1,n,Dr,(s,a)=>{var l=un(),u=tt(l),d=f=>{H(f,HK())},h=f=>{var p=un(),m=tt(p),b=g=>{H(g,WK())},v=g=>{var y=un(),k=tt(y),S=_=>{var A=KK(),D=V(A),E=F=>{vn(F,{get data(){return c(a).icon}})};ge(D,F=>{c(a).icon&&F(E)});var z=ee(D,2),G=F=>{var se=Po();$e(()=>Mt(se,c(a).text)),H(F,se)};ge(z,F=>{c(a).text&&F(G)}),$e(()=>{var F;ui(A,"jse-button ".concat((F=c(a).className)!==null&&F!==void 0?F:""," svelte-pf7s2l")),Tn(A,"title",c(a).title),A.disabled=c(a).disabled||!1}),Oe("click",A,function(){for(var F,se=arguments.length,pe=new Array(se),re=0;re{var A=Po();$e(()=>Mt(A,function(D){return console.error("Unknown type of menu item",D),"???"}(c(a)))),H(_,A)};ge(k,_=>{wd(c(a))?_(S):_(w,!1)},!0),H(g,y)};ge(m,g=>{VA(c(a))?g(b):g(v,!1)},!0),H(f,p)};ge(u,f=>{cp(c(a))?f(d):f(h,!1)}),H(s,l)}),xr(ee(i,2),e,"right",{},null),H(t,r),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-json-repair-component.svelte-3golau { + flex: 1; + display: flex; + flex-direction: column; + background: var(--jse-background-color, #fff); + color: var(--jse-text-color, #4d4d4d); +} +.jse-json-repair-component.svelte-3golau .jse-info:where(.svelte-3golau) { + padding: calc(0.5 * var(--jse-padding, 10px)); + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + vertical-align: center; +} +.jse-json-repair-component.svelte-3golau .jse-json-text:where(.svelte-3golau) { + flex: 1; + border: none; + padding: 2px; + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + background: var(--jse-input-background, var(--jse-background-color, #fff)); + color: var(--jse-text-color, #4d4d4d); + resize: none; + outline: none; +}`);var GK=ue('
Repair invalid JSON, then click apply
'),QK=ue('
');function YK(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=U(void 0,!0),i=U(void 0,!0),s=U(void 0,!0),a=U(void 0,!0),l=x(e,"text",13,""),u=x(e,"readOnly",9,!1),d=x(e,"onParse",9),h=x(e,"onRepair",9),f=x(e,"onChange",9,void 0),p=x(e,"onApply",9),m=x(e,"onCancel",9),b=ro("jsoneditor:JSONRepair"),v=U(void 0,!0);function g(){if(c(v)&&c(n)){var G=c(n).position!==void 0?c(n).position:0;c(v).setSelectionRange(G,G),c(v).focus()}}function y(){p()(l())}function k(){try{l(h()(l())),f()&&f()(l())}catch{}}var S=U(void 0,!0);ie(()=>B(l()),()=>{j(n,function(G){try{return void d()(G)}catch(F){return cu(G,F.message)}}(l()))}),ie(()=>B(l()),()=>{j(r,function(G){try{return h()(G),!0}catch{return!1}}(l()))}),ie(()=>c(n),()=>{b("error",c(n))}),ie(()=>B(m()),()=>{j(S,[{type:"space"},{type:"button",icon:Bm,title:"Cancel repair",className:"jse-cancel",onClick:m()}])}),ie(()=>_x,()=>{j(o,{icon:_x,text:"Show me",title:"Scroll to the error location",onClick:g})}),ie(()=>Xc,()=>{j(i,{icon:Xc,text:"Auto repair",title:"Automatically repair JSON",onClick:k})}),ie(()=>(c(r),c(o),c(i)),()=>{j(s,c(r)?[c(o),c(i)]:[c(o)])}),ie(()=>B(u()),()=>{j(a,[{icon:v1,text:"Apply",title:"Apply fixed JSON",disabled:u(),onClick:y}])}),En(),_t(!0);var w=QK(),_=V(w);xg(_,{get items(){return c(S)},$$slots:{left:(G,F)=>{H(G,GK())}}});var A=ee(_,2),D=G=>{var F=Fe(()=>"Cannot parse JSON: ".concat(c(n).message));ns(G,{type:"error",icon:Tl,get message(){return c(F)},get actions(){return c(s)}})},E=G=>{ns(G,{type:"success",message:"JSON is valid now and can be parsed.",get actions(){return c(a)}})};ge(A,G=>{c(n)?G(D):G(E,!1)});var z=ee(A,2);ar(z,G=>j(v,G),()=>c(v)),$e(()=>{z.readOnly=u(),Fl(z,l())}),Oe("input",z,function(G){b("handleChange");var F=G.target.value;l()!==F&&(l(F),f()&&f()(l()))}),H(t,w),jt()}function w$(t,e){xt(e,!1);var n=x(e,"text",13),r=x(e,"onParse",9),o=x(e,"onRepair",9),i=x(e,"onApply",9),s=x(e,"onClose",9);function a(u){i()(u),s()()}function l(){s()()}_t(!0),ih(t,{get onClose(){return s()},className:"jse-repair-modal",children:(u,d)=>{YK(u,{get text(){return n()},set text(h){n(h)},get onParse(){return r()},get onRepair(){return o()},onApply:a,onCancel:l,$$legacy:!0})},$$slots:{default:!0}}),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +div.jse-collapsed-items.svelte-1h6hzoq { + margin-left: calc(var(--level) * var(--jse-indent-size, calc(1em + 4px))); + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + color: var(--jse-collapsed-items-link-color, rgba(0, 0, 0, 0.38)); + padding: calc(0.5 * var(--jse-padding, 10px)); + border: 8px solid transparent; + border-width: 8px 0; + background-color: var(--jse-contents-background-color, transparent); + background-image: linear-gradient(var(--jse-collapsed-items-background-color, #f5f5f5), var(--jse-collapsed-items-background-color, #f5f5f5)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color, #f5f5f5) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color, #f5f5f5) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color, #f5f5f5) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color, #f5f5f5) 50.5%); + background-repeat: repeat, repeat-x, repeat-x, repeat-x, repeat-x; + background-position: 0 0, 8px 0, 8px 0, 8px 100%, 8px 100%; + background-size: auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px; + background-clip: padding-box, border-box, border-box, border-box, border-box; + background-origin: padding-box, border-box, border-box, border-box, border-box; + display: flex; +} +div.jse-collapsed-items.jse-selected.svelte-1h6hzoq { + background-color: var(--jse-selection-background-color, #d3d3d3); + --jse-collapsed-items-background-color: var(--jse-collapsed-items-selected-background-color, #c2c2c2); +} +div.jse-collapsed-items.svelte-1h6hzoq div.jse-text:where(.svelte-1h6hzoq), +div.jse-collapsed-items.svelte-1h6hzoq button.jse-expand-items:where(.svelte-1h6hzoq) { + margin: 0 calc(0.5 * var(--jse-padding, 10px)); +} +div.jse-collapsed-items.svelte-1h6hzoq div.jse-text:where(.svelte-1h6hzoq) { + display: inline; +} +div.jse-collapsed-items.svelte-1h6hzoq button.jse-expand-items:where(.svelte-1h6hzoq) { + font-family: inherit; + font-size: inherit; + color: var(--jse-collapsed-items-link-color, rgba(0, 0, 0, 0.38)); + background: none; + border: none; + padding: 0; + text-decoration: underline; + cursor: pointer; +} +div.jse-collapsed-items.svelte-1h6hzoq button.jse-expand-items:where(.svelte-1h6hzoq):hover, div.jse-collapsed-items.svelte-1h6hzoq button.jse-expand-items:where(.svelte-1h6hzoq):focus { + color: var(--jse-collapsed-items-link-color-highlight, #ee5341); +}`);var XK=ue(''),ZK=ue('
');function eJ(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=U(void 0,!0),i=U(void 0,!0),s=U(void 0,!0),a=x(e,"visibleSections",9),l=x(e,"sectionIndex",9),u=x(e,"total",9),d=x(e,"path",9),h=x(e,"selection",9),f=x(e,"onExpandSection",9),p=x(e,"context",9);ie(()=>(B(a()),B(l())),()=>{j(n,a()[l()])}),ie(()=>c(n),()=>{j(r,c(n).end)}),ie(()=>(B(a()),B(l()),B(u())),()=>{j(o,a()[l()+1]?a()[l()+1].start:u())}),ie(()=>(B(p()),B(h()),B(d()),c(r)),()=>{j(i,nh(p().getJson(),h(),d().concat(String(c(r)))))}),ie(()=>(c(r),c(o)),()=>{j(s,function(y,k){var S={start:y,end:Math.min(Eb(y),k)},w=Math.max(cm((y+k)/2),y),_={start:w,end:Math.min(Eb(w),k)},A=cm(k),D=A===k?A-Xd:A,E={start:Math.max(D,y),end:k},z=[S],G=_.start>=S.end&&_.end<=E.start;return G&&z.push(_),E.start>=(G?_.end:S.end)&&z.push(E),z}(c(r),c(o)))}),En(),_t(!0);var m=ZK(),b=V(m),v=V(b),g=V(v);Or(ee(v,2),1,()=>c(s),Dr,(y,k)=>{var S=XK(),w=V(S);$e(()=>{var _,A;return Mt(w,"show ".concat((_=c(k).start)!==null&&_!==void 0?_:"","-").concat((A=c(k).end)!==null&&A!==void 0?A:""))}),Oe("click",S,()=>f()(d(),c(k))),H(y,S)}),$e(()=>{var y,k;lt(m,"jse-selected",c(i)),Hc(m,"--level",d().length+2),Mt(g,"Items ".concat((y=c(r))!==null&&y!==void 0?y:"","-").concat((k=c(o))!==null&&k!==void 0?k:""))}),Oe("mousemove",m,function(y){y.stopPropagation()}),H(t,m),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-context-menu-pointer.svelte-137iwnw { + position: absolute; + top: calc(-0.5 * var(--jse-context-menu-pointer-size, calc(1em + 4px))); + right: calc(-0.5 * var(--jse-context-menu-pointer-size, calc(1em + 4px))); + width: var(--jse-context-menu-pointer-size, calc(1em + 4px)); + height: var(--jse-context-menu-pointer-size, calc(1em + 4px)); + padding: 0; + margin: 0; + cursor: pointer; + background: transparent; + border-radius: 2px; + background: var(--jse-context-menu-pointer-hover-background, #b2b2b2); + color: var(--jse-context-menu-pointer-color, var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff))); + border: none; + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); +} +.jse-context-menu-pointer.jse-root.svelte-137iwnw { + top: 0; + right: calc(-2px - var(--jse-context-menu-pointer-size, calc(1em + 4px))); +} +.jse-context-menu-pointer.jse-insert.svelte-137iwnw { + right: -1px; +} +.jse-context-menu-pointer.svelte-137iwnw:hover { + background: var(--jse-context-menu-pointer-background-highlight, var(--jse-context-menu-background-highlight, #7a7a7a)); +} +.jse-context-menu-pointer.jse-selected.svelte-137iwnw { + background: var(--jse-context-menu-pointer-background, var(--jse-context-menu-background, #656565)); +} +.jse-context-menu-pointer.jse-selected.svelte-137iwnw:hover { + background: var(--jse-context-menu-pointer-background-highlight, var(--jse-context-menu-background-highlight, #7a7a7a)); +}`);var tJ=ue('');function va(t,e){xt(e,!1);var n=x(e,"root",9,!1),r=x(e,"insert",9,!1),o=x(e,"selected",9),i=x(e,"onContextMenu",9);_t(!0);var s=tJ();Tn(s,"title",sw),vn(V(s),{data:qa}),$e(()=>{lt(s,"jse-root",n()),lt(s,"jse-insert",r()),lt(s,"jse-selected",o())}),Oe("click",s,function(a){for(var l=a.target;l&&l.nodeName!=="BUTTON";)l=l.parentNode;l&&i()({anchor:l,left:0,top:0,width:Vs,height:Us,offsetTop:2,offsetLeft:0,showTip:!0})}),H(t,s),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-key.svelte-2iqnqn { + display: inline-block; + min-width: 2em; + padding: 0 5px; + box-sizing: border-box; + outline: none; + border-radius: 1px; + vertical-align: top; + color: var(--jse-key-color, #1a1a1a); + word-break: normal; + overflow-wrap: normal; + white-space: pre-wrap; +} +.jse-key.jse-empty.svelte-2iqnqn { + min-width: 3em; + outline: 1px dotted var(--jse-tag-background, rgba(0, 0, 0, 0.2)); + -moz-outline-radius: 2px; +} +.jse-key.jse-empty.svelte-2iqnqn::after { + pointer-events: none; + color: var(--jse-tag-background, rgba(0, 0, 0, 0.2)); + content: "key"; +}`);var nJ=ue('
'),rJ=ue(" ",1),oJ=ue('
');function x$(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=x(e,"path",9),i=x(e,"value",9),s=x(e,"context",9),a=x(e,"enforceString",9),l=x(e,"selection",9),u=x(e,"searchResultItems",9);ie(()=>(B(l()),Bo),()=>{j(n,Wn(l())&&Bo(l()))}),ie(()=>(B(s()),B(o()),B(i()),B(a()),c(n),B(l()),B(u())),()=>{j(r,s().onRenderValue({path:o(),value:i(),mode:s().mode,readOnly:s().readOnly,enforceString:a(),isEditing:c(n),parser:s().parser,normalization:s().normalization,selection:l(),searchResultItems:u(),onPatch:s().onPatch,onPasteJson:s().onPasteJson,onSelect:s().onSelect,onFind:s().onFind,findNextInside:s().findNextInside,focus:s().focus}))}),En(),_t(!0);var d=un();Or(tt(d),1,()=>c(r),Dr,(h,f)=>{var p=un(),m=tt(p),b=g=>{var y=oJ(),k=Fe(()=>c(f).action);To(y,(S,w)=>{var _;return(_=c(k))===null||_===void 0?void 0:_(S,w)},()=>c(f).props),H(g,y)},v=g=>{var y=un();OA(tt(y),()=>c(f).component,(k,S)=>{S(k,Ia(()=>c(f).props))}),H(g,y)};ge(m,g=>{AW(c(f))?g(b):g(v,!1)}),H(h,p)}),H(t,d),jt()}var iJ={selecting:!1,selectionAnchor:void 0,selectionAnchorType:void 0,selectionFocus:void 0,dragging:!1};function zv(t){var{json:e,selection:n,deltaY:r,items:o}=t;if(!n)return{operations:void 0,updatedSelection:void 0,offset:0};var i=r<0?function(d){for(var{json:h,items:f,selection:p,deltaY:m}=d,b=Hs(h,p),v=f.findIndex(_=>gn(_.path,b)),g=()=>{var _;return(_=f[y-1])===null||_===void 0?void 0:_.height},y=v,k=0;g()!==void 0&&Math.abs(m)>k+g()/2;)k+=g(),y-=1;var S=f[y].path,w=y-v;return y!==v&&f[y]!==void 0?{beforePath:S,offset:w}:void 0}({json:e,selection:n,deltaY:r,items:o}):function(d){for(var h,{json:f,items:p,selection:m,deltaY:b}=d,v=Ba(f,m),g=p.findIndex(z=>gn(z.path,v)),y=0,k=g,S=()=>{var z;return(z=p[k+1])===null||z===void 0?void 0:z.height};S()!==void 0&&Math.abs(b)>y+S()/2;)y+=S(),k+=1;var w=jn(v),_=Ze(f,w),A=Array.isArray(_)?k:k+1,D=(h=p[A])===null||h===void 0?void 0:h.path,E=k-g;return D?{beforePath:D,offset:E}:{append:!0,offset:E}}({json:e,selection:n,deltaY:r,items:o});if(!i||i.offset===0)return{operations:void 0,updatedSelection:void 0,offset:0};var s=function(d,h,f){if(!h)return[];var p="beforePath"in f?f.beforePath:void 0,m="append"in f?f.append:void 0,b=jn(ht(h)),v=Ze(d,b);if(!(m||p&&ia(p,b)&&p.length>b.length))return[];var g=Hs(d,h),y=Ba(d,h),k=dn(g),S=dn(y),w=p?p[b.length]:void 0;if(!Nr(v)){if(Cr(v)){var _=fo(k),A=fo(S),D=w!==void 0?fo(w):v.length;return lR(A-_+1,D<_?se=>({op:"move",from:yt(b.concat(String(_+se))),path:yt(b.concat(String(D+se)))}):()=>({op:"move",from:yt(b.concat(String(_))),path:yt(b.concat(String(D)))}))}throw new Error("Cannot create move operations: parent must be an Object or Array")}var E=Object.keys(v),z=E.indexOf(k),G=E.indexOf(S),F=m?E.length:w!==void 0?E.indexOf(w):-1;return z!==-1&&G!==-1&&F!==-1?F>z?[...E.slice(z,G+1),...E.slice(F,E.length)].map(se=>Vl(b,se)):[...E.slice(F,z),...E.slice(G+1,E.length)].map(se=>Vl(b,se)):[]}(e,n,i),a=jn(Hs(e,n)),l=Ze(e,a);if(Array.isArray(l)){var u=function(d){var h,f,{items:p,json:m,selection:b,offset:v}=d,g=Hs(m,b),y=Ba(m,b),k=p.findIndex(A=>gn(A.path,g)),S=p.findIndex(A=>gn(A.path,y)),w=(h=p[k+v])===null||h===void 0?void 0:h.path,_=(f=p[S+v])===null||f===void 0?void 0:f.path;return Eo(w,_)}({items:o,json:e,selection:n,offset:i.offset});return{operations:s,updatedSelection:u,offset:i.offset}}return{operations:s,updatedSelection:void 0,offset:i.offset}}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +button.jse-validation-error.svelte-1a8aobl { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + padding: 0; + margin: 0; + vertical-align: top; + display: inline-flex; + color: var(--jse-error-color, #ee5341); +} + +button.jse-validation-info.svelte-1a8aobl { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + padding: 0; + margin: 0; + vertical-align: top; + display: inline-flex; + color: var(--jse-info-color, #4f91ff); +} + +button.jse-validation-warning.svelte-1a8aobl { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + padding: 0; + margin: 0; + vertical-align: top; + display: inline-flex; + color: var(--jse-warning-color, #fdc539); +}`);var sJ=ue('');function Gc(t,e){xt(e,!1);var n=U(),r=nl("absolute-popup"),o=x(e,"validationError",8),i=x(e,"onExpand",8);ie(()=>B(o()),()=>{j(n,EW(o())&&o().isChildError?"Contains invalid data":o().message)}),En(),_t();var s=sJ();vn(V(s),{data:Tl}),ho(()=>Oe("click",s,function(){for(var a,l=arguments.length,u=new Array(l),d=0;dhu==null?void 0:hu(a,l),()=>De({text:c(n)},r)),$e(()=>{var a;return ui(s,"jse-validation-".concat((a=o().severity)!==null&&a!==void 0?a:""," svelte-1a8aobl"))}),H(t,s),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-expand.svelte-wovgt4 { + width: var(--jse-indent-size, calc(1em + 4px)); + padding: 0; + margin: 0; + border: none; + cursor: pointer; + background: transparent; + color: var(--jse-delimiter-color, rgba(0, 0, 0, 0.38)); + font-size: var(--jse-font-size-mono, 14px); + height: var(--jse-line-height, calc(1em + 4px)); +} +.jse-expand.svelte-wovgt4:hover { + opacity: 0.8; +} + +.jse-meta.svelte-wovgt4, +.jse-separator.svelte-wovgt4, +.jse-index.svelte-wovgt4, +.jse-bracket.svelte-wovgt4 { + vertical-align: top; + color: var(--jse-delimiter-color, rgba(0, 0, 0, 0.38)); +} + +.jse-index.svelte-wovgt4 { + padding: 0 calc(0.5 * var(--jse-padding, 10px)); +} + +.jse-bracket.svelte-wovgt4 { + padding: 0 2px; +} +.jse-bracket.jse-expanded.svelte-wovgt4 { + padding-right: var(--jse-padding, 10px); +} + +.jse-tag.svelte-wovgt4 { + border: none; + font-size: 80%; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + color: var(--jse-tag-color, var(--jse-text-color-inverse, #fff)); + background: var(--jse-tag-background, rgba(0, 0, 0, 0.2)); + border-radius: 2px; + cursor: pointer; + display: inline-block; + padding: 0 4px; + line-height: normal; + margin: 1px 0; +} +.jse-tag.svelte-wovgt4:hover { + opacity: 0.8; +} +.jse-tag.jse-expanded.svelte-wovgt4 { + opacity: 0.7; + cursor: inherit; +} + +.jse-identifier.svelte-wovgt4 { + vertical-align: top; + position: relative; +} + +.jse-json-node.svelte-wovgt4 { + position: relative; + color: var(--jse-text-color, #4d4d4d); +} +.jse-json-node.jse-root.svelte-wovgt4 { + min-height: 100%; + padding-bottom: 2px; + box-sizing: border-box; +} +.jse-json-node.jse-root.svelte-wovgt4 > .jse-contents-outer:where(.svelte-wovgt4) > .jse-contents:where(.svelte-wovgt4) { + padding-left: 0; +} +.jse-json-node.svelte-wovgt4 .jse-props:where(.svelte-wovgt4), +.jse-json-node.svelte-wovgt4 .jse-items:where(.svelte-wovgt4) { + position: relative; +} +.jse-json-node.svelte-wovgt4 .jse-header-outer:where(.svelte-wovgt4), +.jse-json-node.svelte-wovgt4 .jse-footer-outer:where(.svelte-wovgt4) { + display: flex; + margin-left: calc(var(--level) * var(--jse-indent-size, calc(1em + 4px))); +} +.jse-json-node.svelte-wovgt4 .jse-header:where(.svelte-wovgt4) { + position: relative; +} +.jse-json-node.svelte-wovgt4 .jse-header:where(.svelte-wovgt4) .jse-meta:where(.svelte-wovgt4) > .jse-meta-inner:where(.svelte-wovgt4) { + display: flex; + justify-content: center; +} +.jse-json-node.svelte-wovgt4 .jse-contents-outer:where(.svelte-wovgt4) { + display: flex; + margin-left: calc(var(--level) * var(--jse-indent-size, calc(1em + 4px))); +} +.jse-json-node.svelte-wovgt4 .jse-header:where(.svelte-wovgt4), +.jse-json-node.svelte-wovgt4 .jse-contents:where(.svelte-wovgt4) { + display: flex; + flex-direction: row; + align-items: flex-start; +} +.jse-json-node.svelte-wovgt4 .jse-contents:where(.svelte-wovgt4) { + padding-left: var(--jse-indent-size, calc(1em + 4px)); + cursor: var(--jse-contents-cursor, pointer); +} +.jse-json-node.svelte-wovgt4 .jse-contents:where(.svelte-wovgt4) .jse-value-outer:where(.svelte-wovgt4) { + display: inline-flex; +} +.jse-json-node.svelte-wovgt4 .jse-footer:where(.svelte-wovgt4) { + display: inline-flex; + padding-left: calc(var(--jse-indent-size, calc(1em + 4px)) + 5px); +} +.jse-json-node.svelte-wovgt4 .jse-header:where(.svelte-wovgt4), +.jse-json-node.svelte-wovgt4 .jse-contents:where(.svelte-wovgt4), +.jse-json-node.svelte-wovgt4 .jse-footer:where(.svelte-wovgt4) { + background: var(--jse-contents-background-color, transparent); +} +.jse-json-node.svelte-wovgt4 .jse-insert-selection-area:where(.svelte-wovgt4) { + padding: 0 calc(0.5 * var(--jse-padding, 10px)); + flex: 1; +} +.jse-json-node.svelte-wovgt4 .jse-insert-selection-area.jse-inside:where(.svelte-wovgt4) { + display: inline-flex; + align-items: center; +} +.jse-json-node.svelte-wovgt4 .jse-insert-selection-area.jse-after:where(.svelte-wovgt4) { + display: flex; + align-items: flex-end; +} +.jse-json-node.svelte-wovgt4 .jse-context-menu-pointer-anchor:where(.svelte-wovgt4) { + position: relative; +} +.jse-json-node.svelte-wovgt4 .jse-insert-area:where(.svelte-wovgt4) { + display: flex; + position: relative; + z-index: 1; + margin-left: calc(var(--level) * var(--jse-indent-size, calc(1em + 4px))); + max-width: 250px; + min-width: 100px; + height: 0; + margin-right: calc(0.5 * var(--jse-padding, 10px)); + outline: 1px solid; +} +.jse-json-node.svelte-wovgt4 .jse-insert-area.jse-hovered:where(.svelte-wovgt4) { + outline-color: var(--jse-context-menu-pointer-hover-background, #b2b2b2); +} +.jse-json-node.svelte-wovgt4 .jse-key-outer:where(.svelte-wovgt4) { + position: relative; +} +.jse-json-node.svelte-wovgt4 .jse-key-outer:where(.svelte-wovgt4):hover, +.jse-json-node.svelte-wovgt4 .jse-value-outer:where(.svelte-wovgt4):hover, +.jse-json-node.svelte-wovgt4 .jse-meta:where(.svelte-wovgt4):hover, +.jse-json-node.svelte-wovgt4 .jse-footer:where(.svelte-wovgt4):hover { + background: var(--jse-hover-background-color, rgba(0, 0, 0, 0.06)); + cursor: var(--jse-contents-cursor, pointer); +} +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-items .jse-header, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-items .jse-contents, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-props .jse-header, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-props .jse-contents, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-footer { + background: var(--jse-hover-background-color, rgba(0, 0, 0, 0.06)); + cursor: var(--jse-contents-cursor, pointer); +} +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-value-outer .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-value-outer .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-meta .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-meta .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-items .jse-header .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-items .jse-header .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-items .jse-contents .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-items .jse-contents .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-props .jse-header .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-props .jse-header .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-props .jse-contents .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-props .jse-contents .jse-meta, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-footer .jse-value-outer, +.jse-json-node.jse-hovered.svelte-wovgt4:not(.jse-selected):not(.jse-selected-value) .jse-footer .jse-meta { + background: none; +} +.jse-json-node.jse-selected.svelte-wovgt4 .jse-header:where(.svelte-wovgt4), +.jse-json-node.jse-selected.svelte-wovgt4 .jse-contents:where(.svelte-wovgt4), +.jse-json-node.jse-selected.svelte-wovgt4 .jse-footer:where(.svelte-wovgt4) { + background: var(--jse-selection-background-color, #d3d3d3); + cursor: var(--jse-contents-selected-cursor, grab); +} +.jse-json-node.jse-selected.svelte-wovgt4 .jse-key-outer:where(.svelte-wovgt4):hover, +.jse-json-node.jse-selected.svelte-wovgt4 .jse-value-outer:where(.svelte-wovgt4):hover, +.jse-json-node.jse-selected.svelte-wovgt4 .jse-meta:where(.svelte-wovgt4):hover, +.jse-json-node.jse-selected.svelte-wovgt4 .jse-footer:where(.svelte-wovgt4):hover { + background: inherit; + cursor: inherit; +} +.jse-json-node.svelte-wovgt4 .jse-key-outer.jse-selected-key:where(.svelte-wovgt4) { + background: var(--jse-selection-background-color, #d3d3d3); + cursor: var(--jse-contents-selected-cursor, grab); +} +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-value-outer, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-meta, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-items .jse-header, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-items .jse-contents, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-props .jse-header, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-props .jse-contents, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-footer { + background: var(--jse-selection-background-color, #d3d3d3); + cursor: var(--jse-contents-selected-cursor, grab); +} +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-value-outer .jse-key-outer:hover, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-meta .jse-key-outer:hover, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-items .jse-header .jse-key-outer:hover, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-items .jse-contents .jse-key-outer:hover, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-props .jse-header .jse-key-outer:hover, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-props .jse-contents .jse-key-outer:hover, +.jse-json-node.jse-selected-value.svelte-wovgt4 .jse-footer .jse-key-outer:hover { + background: inherit; + cursor: inherit; +} +.jse-json-node.jse-readonly.svelte-wovgt4 { + --jse-contents-selected-cursor: pointer; +} +.jse-json-node.svelte-wovgt4 .jse-insert-area.jse-selected:where(.svelte-wovgt4) { + outline-color: var(--jse-context-menu-pointer-background, var(--jse-context-menu-background, #656565)); +}`);var or=hg(()=>iJ),aJ=ue('
:
'),lJ=ue('
[
 ',1),cJ=ue('
[
]
',1),uJ=ue('
'),dJ=ue('
'),hJ=ue('
'),fJ=ue('
'),pJ=ue('
'),mJ=ue(" ",1),gJ=ue('
'),vJ=ue('
',1),bJ=ue('
',1),yJ=ue('
:
'),wJ=ue('
{
'),xJ=ue('
{
}
',1),jJ=ue('
'),kJ=ue('
'),SJ=ue('
'),CJ=ue('
'),OJ=ue('
'),_J=ue('
'),EJ=ue('
',1),AJ=ue('
',1),$J=ue('
:
'),MJ=ue('
'),TJ=ue('
'),PJ=ue('
'),RJ=ue('
'),NJ=ue('
');function zb(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=x(e,"pointer",9),i=x(e,"value",9),s=x(e,"state",9),a=x(e,"validationErrors",9),l=x(e,"searchResults",9),u=x(e,"selection",9),d=x(e,"context",9),h=x(e,"onDragSelectionStart",9),f=ro("jsoneditor:JSONNode"),p=U(void 0,!0),m=void 0,b=U(void 0,!0),v=U(void 0,!0),g=U(void 0,!0),y=U(void 0,!0),k=U(void 0,!0),S=U(void 0,!0),w=U(void 0,!0);function _(K){K.stopPropagation();var L=iw(K);d().onExpand(c(v),!c(g),L)}function A(K){K.stopPropagation(),d().onExpand(c(v),!0)}function D(K,L){var xe=Rh(c(v),Object.keys(i()),K,L);return d().onPatch(xe),dn(ji(xe[0].path))}function E(K){d().onDrag(K)}function z(K){or().selecting&&(or(or().selecting=!1),K.stopPropagation()),d().onDragEnd(),document.removeEventListener("mousemove",E,!0),document.removeEventListener("mouseup",z)}function G(){var K;return((K=d().findElement([]))===null||K===void 0||(K=K.getBoundingClientRect())===null||K===void 0?void 0:K.top)||0}function F(K,L){var xe=G()-K.initialContentTop;return L.clientY-K.initialClientY-xe}function se(K){if(!d().readOnly&&u()){var L=jn(ht(u()));if(gn(c(v),L)){var xe=function(it,vt){var rt=[];function Ee(N){var ne=c(v).concat(N),X=d().findElement(ne);X!==void 0&&rt.push({path:ne,height:X.clientHeight})}if(Array.isArray(i())){var Ge=d().getJson();if(Ge===void 0)return;var Ue=Hs(Ge,it),ft=Ba(Ge,it),Et=parseInt(dn(Ue),10),et=parseInt(dn(ft),10),Pe=vt.find(N=>Et>=N.start&&et<=N.end);if(!Pe)return;var{start:O,end:T}=Pe;$A(O,Math.min(i().length,T),N=>Ee(String(N)))}else Object.keys(i()).forEach(Ee);return rt}(u(),c(k)||Wc);if(f("dragSelectionStart",{selection:u(),items:xe}),xe){var Je=d().getJson();if(Je!==void 0){var ce=Hs(Je,u()),ae=xe.findIndex(it=>gn(it.path,ce)),{offset:W}=zv({json:Je,selection:d().getSelection(),deltaY:0,items:xe});j(b,{initialTarget:K.target,initialClientY:K.clientY,initialContentTop:G(),selectionStartIndex:ae,selectionItemsCount:La(Je,u()).length,items:xe,offset:W,didMoveItems:!1}),or(or().dragging=!0),document.addEventListener("mousemove",pe,!0),document.addEventListener("mouseup",re)}}else f("Cannot drag the current selection (probably spread over multiple sections)")}else h()(K)}}function pe(K){if(c(b)){var L=d().getJson();if(L===void 0)return;var xe=F(c(b),K),{offset:Je}=zv({json:L,selection:d().getSelection(),deltaY:xe,items:c(b).items});Je!==c(b).offset&&(f("drag selection",Je,xe),j(b,De(De({},c(b)),{},{offset:Je,didMoveItems:!0})))}}function re(K){if(c(b)){var L=d().getJson();if(L===void 0)return;var xe=F(c(b),K),{operations:Je,updatedSelection:ce}=zv({json:L,selection:d().getSelection(),deltaY:xe,items:c(b).items});if(Je)d().onPatch(Je,(it,vt)=>({state:vt,selection:ce??u()}));else if(K.target===c(b).initialTarget&&!c(b).didMoveItems){var ae=kv(K.target),W=qA(K.target);W&&d().onSelect(Bk(ae,W))}j(b,void 0),or(or().dragging=!1),document.removeEventListener("mousemove",pe,!0),document.removeEventListener("mouseup",re)}}function Z(K){K.shiftKey||(K.stopPropagation(),K.preventDefault(),d().onSelect(aa(c(v))))}function he(K){K.shiftKey||(K.stopPropagation(),K.preventDefault(),d().onSelect(ea(c(v))))}function be(K){d().onSelect(aa(c(v))),d().onContextMenu(K)}function fe(K){d().onSelect(ea(c(v))),d().onContextMenu(K)}ie(()=>B(o()),()=>{j(v,ji(o()))}),ie(()=>B(o()),()=>{j(n,encodeURIComponent(o()))}),ie(()=>B(s()),()=>{j(g,!!ql(s())&&s().expanded)}),ie(()=>(B(i()),B(s())),()=>{j(y,Zs(i(),s(),[]))}),ie(()=>B(s()),()=>{j(k,jo(s())?s().visibleSections:void 0)}),ie(()=>B(a()),()=>{var K;j(S,(K=a())===null||K===void 0?void 0:K.validationError)}),ie(()=>(B(d()),B(u()),c(v)),()=>{j(w,nh(d().getJson(),u(),c(v)))}),ie(()=>c(v),()=>{j(r,c(v).length===0)}),En(),_t(!0);var J=NJ(),I=Fe(()=>{var K;return"".concat((K=Mu("jse-json-node",{"jse-expanded":c(g)},d().onClassName(c(v),i())))!==null&&K!==void 0?K:""," svelte-wovgt4")}),Q=Fe(()=>c(w)&&ir(u())),M=Fe(()=>c(w)&&Wn(u())),C=V(J),$=K=>{var L=bJ(),xe=tt(L),Je=V(xe),ce=V(Je),ae=V(ce),W=Me=>{vn(Me,{data:qa})},it=Me=>{vn(Me,{data:Cd})};ge(ae,Me=>{c(g)?Me(W):Me(it,!1)});var vt=ee(ce,2);xr(vt,e,"identifier",{},null);var rt=ee(vt,2),Ee=Me=>{H(Me,aJ())};ge(rt,Me=>{c(r)||Me(Ee)});var Ge=ee(rt,2),Ue=V(Ge),ft=V(Ue),Et=Me=>{var mt=lJ(),Bt=V(ee(tt(mt),2));$e(()=>{var We,on;return Mt(Bt,"".concat((We=i().length)!==null&&We!==void 0?We:"",` + `).concat((on=i().length===1?"item":"items")!==null&&on!==void 0?on:""))}),H(Me,mt)},et=Me=>{var mt=cJ(),Bt=ee(tt(mt),2),We=V(Bt);$e(()=>{var on,ut;return Mt(We,"".concat((on=i().length)!==null&&on!==void 0?on:"",` + `).concat((ut=i().length===1?"item":"items")!==null&&ut!==void 0?ut:""))}),Oe("click",Bt,A),H(Me,mt)};ge(ft,Me=>{c(g)?Me(Et):Me(et,!1)});var Pe=ee(Ge,2),O=Me=>{var mt=uJ();va(V(mt),{get root(){return c(r)},selected:!0,get onContextMenu(){return d().onContextMenu}}),H(Me,mt)};ge(Pe,Me=>{!d().readOnly&&c(w)&&u()&&(Wn(u())||ir(u()))&&!Bo(u())&&gn(ht(u()),c(v))&&Me(O)});var T=ee(Je,2),N=Me=>{Gc(Me,{get validationError(){return c(S)},onExpand:A})};ge(T,Me=>{!c(S)||c(g)&&c(S).isChildError||Me(N)});var ne=ee(T,2),X=Me=>{var mt=dJ();Oe("click",mt,Z),H(Me,mt)},me=Me=>{var mt=hJ();Oe("click",mt,he),H(Me,mt)};ge(ne,Me=>{c(g)?Me(X):Me(me,!1)});var te=ee(xe,2),qe=Me=>{var mt=vJ(),Bt=tt(mt),We=V(Bt),on=en=>{var Tt=fJ();Tn(Tt,"title",Cv);var hn=Fe(()=>c(w)&&wo(u()));$e(()=>lt(Tt,"jse-selected",c(hn)));var Kn=V(Tt),lr=Fe(()=>c(w)&&wo(u()));va(Kn,{insert:!0,get selected(){return c(lr)},onContextMenu:be}),$e(()=>{lt(Tt,"jse-hovered",c(p)===Wu),Hc(Tt,"--level",c(v).length+1)}),H(en,Tt)};ge(We,en=>{!d().readOnly&&(c(p)===Wu||c(w)&&wo(u()))&&en(on)}),Or(ee(We,2),1,()=>c(k)||Wc,Dr,(en,Tt,hn)=>{var Kn=mJ(),lr=tt(Kn);Or(lr,1,()=>function(Qt,tn,an){var kn=tn.start,Sn=Math.min(tn.end,Qt.length),Yn=zC(kn,Sn);return an&&an.offset!==0?xk(Yn,an.selectionStartIndex,an.selectionItemsCount,an.offset).map((zn,$r)=>({index:zn,gutterIndex:$r})):Yn.map(zn=>({index:zn,gutterIndex:zn}))}(i(),c(Tt),c(b)),Qt=>Qt.index,(Qt,tn)=>{var an=un(),kn=Fe(()=>jo(a())?a().items[c(tn).index]:void 0),Sn=Fe(()=>Fk(d().getJson(),u(),c(v).concat(String(c(tn).index)))),Yn=tt(an),zn=Fe(()=>zw(o(),c(tn).index)),$r=Fe(()=>jo(s())?s().items[c(tn).index]:void 0),vr=Fe(()=>jo(l())?l().items[c(tn).index]:void 0);zb(Yn,{get value(){return i()[c(tn).index]},get pointer(){return c(zn)},get state(){return c($r)},get validationErrors(){return c(kn)},get searchResults(){return c(vr)},get selection(){return c(Sn)},get context(){return d()},onDragSelectionStart:se,$$slots:{identifier:(zr,cr)=>{var oo=pJ(),Vr=V(oo),er=V(Vr);$e(()=>Mt(er,c(tn).gutterIndex)),H(zr,oo)}}}),H(Qt,an)});var Ve=ee(lr,2),kt=Qt=>{var tn=Fe(()=>c(k)||Wc);eJ(Qt,{get visibleSections(){return c(tn)},sectionIndex:hn,get total(){return i().length},get path(){return c(v)},get onExpandSection(){return d().onExpandSection},get selection(){return u()},get context(){return d()}})};ge(Ve,Qt=>{c(Tt).end{var Tt=gJ();Oe("click",Tt,he),H(en,Tt)};ge($n,en=>{c(r)||en(Pn)}),H(Me,mt)};ge(te,Me=>{c(g)&&Me(qe)}),Oe("click",ce,_),H(K,L)},oe=K=>{var L=un(),xe=tt(L),Je=ae=>{var W=AJ(),it=tt(W),vt=V(it),rt=V(vt),Ee=V(rt),Ge=ut=>{vn(ut,{data:qa})},Ue=ut=>{vn(ut,{data:Cd})};ge(Ee,ut=>{c(g)?ut(Ge):ut(Ue,!1)});var ft=ee(rt,2);xr(ft,e,"identifier",{},null);var Et=ee(ft,2),et=ut=>{H(ut,yJ())};ge(Et,ut=>{c(r)||ut(et)});var Pe=ee(Et,2),O=V(Pe),T=V(O),N=ut=>{H(ut,wJ())},ne=ut=>{var $n=xJ(),Pn=ee(tt($n),2),en=Fe(()=>{var Kn;return(Kn=Object.keys(i()).length)!==null&&Kn!==void 0?Kn:""}),Tt=Fe(()=>{var Kn;return(Kn=Object.keys(i()).length===1?"prop":"props")!==null&&Kn!==void 0?Kn:""}),hn=V(Pn);$e(()=>Mt(hn,"".concat(c(en),` + `).concat(c(Tt)))),Oe("click",Pn,A),H(ut,$n)};ge(T,ut=>{c(g)?ut(N):ut(ne,!1)});var X=ee(Pe,2),me=ut=>{var $n=jJ();va(V($n),{get root(){return c(r)},selected:!0,get onContextMenu(){return d().onContextMenu}}),H(ut,$n)};ge(X,ut=>{!d().readOnly&&c(w)&&u()&&(Wn(u())||ir(u()))&&!Bo(u())&&gn(ht(u()),c(v))&&ut(me)});var te=ee(vt,2),qe=ut=>{Gc(ut,{get validationError(){return c(S)},onExpand:A})};ge(te,ut=>{!c(S)||c(g)&&c(S).isChildError||ut(qe)});var Me=ee(te,2),mt=ut=>{var $n=kJ();Oe("click",$n,Z),H(ut,$n)},Bt=ut=>{var $n=un(),Pn=tt($n),en=Tt=>{var hn=SJ();Oe("click",hn,he),H(Tt,hn)};ge(Pn,Tt=>{c(r)||Tt(en)},!0),H(ut,$n)};ge(Me,ut=>{c(g)?ut(mt):ut(Bt,!1)});var We=ee(it,2),on=ut=>{var $n=EJ(),Pn=tt($n),en=V(Pn),Tt=Ve=>{var kt=CJ();Tn(kt,"title",Cv);var Qt=Fe(()=>c(w)&&wo(u()));$e(()=>lt(kt,"jse-selected",c(Qt)));var tn=V(kt),an=Fe(()=>c(w)&&wo(u()));va(tn,{insert:!0,get selected(){return c(an)},onContextMenu:be}),$e(()=>{lt(kt,"jse-hovered",c(p)===Wu),Hc(kt,"--level",c(v).length+1)}),H(Ve,kt)};ge(en,Ve=>{!d().readOnly&&(c(p)===Wu||c(w)&&wo(u()))&&Ve(Tt)}),Or(ee(en,2),1,()=>function(Ve,kt){var Qt=Object.keys(Ve);return kt&&kt.offset!==0?xk(Qt,kt.selectionStartIndex,kt.selectionItemsCount,kt.offset):Qt}(i(),c(b)),Dr,(Ve,kt)=>{var Qt=un(),tn=Fe(()=>zw(o(),c(kt))),an=Fe(()=>Zi(l())?l().properties[c(kt)]:void 0),kn=Fe(()=>Zi(a())?a().properties[c(kt)]:void 0),Sn=Fe(()=>c(v).concat(c(kt))),Yn=Fe(()=>Fk(d().getJson(),u(),c(Sn))),zn=tt(Qt),$r=Fe(()=>Zi(s())?s().properties[c(kt)]:void 0);zb(zn,{get value(){return i()[c(kt)]},get pointer(){return c(tn)},get state(){return c($r)},get validationErrors(){return c(kn)},get searchResults(){return c(an)},get selection(){return c(Yn)},get context(){return d()},onDragSelectionStart:se,$$slots:{identifier:(vr,zr)=>{var cr=OJ(),oo=Fe(()=>to(c(Yn))&&gn(c(Yn).path,c(Sn)));$e(()=>lt(cr,"jse-selected-key",c(oo)));var Vr=V(cr),er=Fe(()=>{return io=c(an),(Lr=Ak(io)?io.searchResults.filter(ye=>ye.field===Xi.key):void 0)&&Lr.length>0?Lr:void 0;var io,Lr});(function(io,Lr){xt(Lr,!1);var ye=U(void 0,!0),Qe=U(void 0,!0),Dt=x(Lr,"pointer",9),nn=x(Lr,"key",9),Wt=x(Lr,"selection",9),yn=x(Lr,"searchResultItems",9),ke=x(Lr,"onUpdateKey",9),Ye=x(Lr,"context",9),pt=U(void 0,!0);function sn(dt){c(Qe)||Ye().readOnly||(dt.preventDefault(),Ye().onSelect(mw(c(pt))))}function Nn(dt,Y){var ve=ke()(nn(),Ye().normalization.unescapeValue(dt)),He=jn(c(pt)).concat(ve);Ye().onSelect(Y===za.nextInside?mn(He):sa(He)),Y!==za.self&&Ye().focus()}function tr(){Ye().onSelect(sa(c(pt))),Ye().focus()}ie(()=>B(Dt()),()=>{j(pt,ji(Dt()))}),ie(()=>(B(Wt()),c(pt)),()=>{j(ye,to(Wt())&&gn(Wt().path,c(pt)))}),ie(()=>(c(ye),B(Wt())),()=>{j(Qe,c(ye)&&Bo(Wt()))}),En(),_t(!0);var Ut=rJ(),qn=tt(Ut),Qr=dt=>{var Y=Fe(()=>Ye().normalization.escapeValue(nn())),ve=Fe(()=>Bo(Wt())?Wt().initialValue:void 0);ZA(dt,{get value(){return c(Y)},get initialValue(){return c(ve)},label:"Edit key",shortText:!0,onChange:Nn,onCancel:tr,get onFind(){return Ye().onFind}})},Yr=dt=>{var Y=nJ(),ve=V(Y),He=Vt=>{var Ft=Fe(()=>Ye().normalization.escapeValue(nn()));i$(Vt,{get text(){return c(Ft)},get searchResultItems(){return yn()}})},Xt=Vt=>{var Ft=Po();$e(()=>Mt(Ft,mg(Ye().normalization.escapeValue(nn())))),H(Vt,Ft)};ge(ve,Vt=>{yn()?Vt(He):Vt(Xt,!1)}),$e(()=>lt(Y,"jse-empty",nn()==="")),Oe("dblclick",Y,sn),H(dt,Y)};ge(qn,dt=>{!Ye().readOnly&&c(Qe)?dt(Qr):dt(Yr,!1)});var Yt=ee(qn,2),wn=dt=>{va(dt,{selected:!0,get onContextMenu(){return Ye().onContextMenu}})};ge(Yt,dt=>{Ye().readOnly||!c(ye)||c(Qe)||dt(wn)}),H(io,Ut),jt()})(Vr,{get pointer(){return c(tn)},get key(){return c(kt)},get selection(){return c(Yn)},get searchResultItems(){return c(er)},get context(){return d()},onUpdateKey:D}),H(vr,cr)}}}),H(Ve,Qt)});var hn=ee(Pn,2),Kn=ee(V(hn),2),lr=Ve=>{var kt=_J();Oe("click",kt,he),H(Ve,kt)};ge(Kn,Ve=>{c(r)||Ve(lr)}),H(ut,$n)};ge(We,ut=>{c(g)&&ut(on)}),Oe("click",rt,_),H(ae,W)},ce=ae=>{var W=PJ(),it=V(W),vt=V(it);xr(vt,e,"identifier",{},null);var rt=ee(vt,2),Ee=X=>{H(X,$J())};ge(rt,X=>{c(r)||X(Ee)});var Ge=ee(rt,2),Ue=V(Ge),ft=Fe(()=>c(w)?u():void 0),Et=Fe(()=>{return X=l(),(me=Ak(X)?X.searchResults.filter(te=>te.field===Xi.value):void 0)&&me.length>0?me:void 0;var X,me});x$(Ue,{get path(){return c(v)},get value(){return i()},get enforceString(){return c(y)},get selection(){return c(ft)},get searchResultItems(){return c(Et)},get context(){return d()}});var et=ee(Ge,2),Pe=X=>{var me=MJ();va(V(me),{get root(){return c(r)},selected:!0,get onContextMenu(){return d().onContextMenu}}),H(X,me)};ge(et,X=>{!d().readOnly&&c(w)&&u()&&(Wn(u())||ir(u()))&&!Bo(u())&&gn(ht(u()),c(v))&&X(Pe)});var O=ee(it,2),T=X=>{Gc(X,{get validationError(){return c(S)},onExpand:A})};ge(O,X=>{c(S)&&X(T)});var N=ee(O,2),ne=X=>{var me=TJ();Oe("click",me,he),H(X,me)};ge(N,X=>{c(r)||X(ne)}),H(ae,W)};ge(xe,ae=>{In(i())?ae(Je):ae(ce,!1)},!0),H(K,L)};ge(C,K=>{Array.isArray(i())?K($):K(oe,!1)});var _e=ee(C,2),q=K=>{var L=RJ();Tn(L,"title",Cv);var xe=Fe(()=>c(w)&&xi(u()));$e(()=>lt(L,"jse-selected",c(xe)));var Je=V(L),ce=Fe(()=>c(w)&&xi(u()));va(Je,{insert:!0,get selected(){return c(ce)},onContextMenu:fe}),$e(()=>lt(L,"jse-hovered",c(p)===Ov)),H(K,L)};ge(_e,K=>{!d().readOnly&&(c(p)===Ov||c(w)&&xi(u()))&&K(q)}),$e(()=>{ui(J,c(I)),Tn(J,"data-path",c(n)),Tn(J,"aria-selected",c(w)),lt(J,"jse-root",c(r)),lt(J,"jse-selected",c(Q)),lt(J,"jse-selected-value",c(M)),lt(J,"jse-readonly",d().readOnly),lt(J,"jse-hovered",c(p)===Ck),Hc(J,"--level",c(v).length)}),Oe("mousedown",J,function(K){if((K.buttons===1||K.buttons===2)&&!((L=K.target).nodeName==="DIV"&&L.contentEditable==="true"||K.buttons===1&&BA(K.target,"BUTTON"))){var L;K.stopPropagation(),K.preventDefault(),d().focus(),document.addEventListener("mousemove",E,!0),document.addEventListener("mouseup",z);var xe=kv(K.target),Je=d().getJson(),ce=d().getDocumentState();if(!u()||xe===Gn.after||xe===Gn.inside||u().type!==xe&&u().type!==Gn.multi||!nh(Je,u(),c(v)))if(or(or().selecting=!0),or(or().selectionAnchor=c(v)),or(or().selectionAnchorType=xe),or(or().selectionFocus=c(v)),K.shiftKey){var ae=d().getSelection();ae&&d().onSelect(Eo(_l(ae),c(v)))}else if(xe===Gn.multi)if(c(r)&&K.target.hasAttribute("data-path")){var W=dn(JA(i(),ce));d().onSelect($b(W))}else d().onSelect(Eo(c(v),c(v)));else Je!==void 0&&d().onSelect(Bk(xe,c(v)));else K.button===0&&h()(K)}}),Oe("mousemove",J,function(K){if(or().selecting){K.preventDefault(),K.stopPropagation(),or().selectionFocus===void 0&&window.getSelection&&window.getSelection().empty();var L=kv(K.target);gn(c(v),or().selectionFocus)&&L===or().selectionAnchorType||(or(or().selectionFocus=c(v)),or(or().selectionAnchorType=L),d().onSelect(Eo(or().selectionAnchor||or().selectionFocus,or().selectionFocus)))}}),Oe("mouseover",J,function(K){or().selecting||or().dragging||(K.stopPropagation(),$a(K.target,"data-type","selectable-value")?j(p,Ck):$a(K.target,"data-type","selectable-key")?j(p,void 0):$a(K.target,"data-type","insert-selection-area-inside")?j(p,Wu):$a(K.target,"data-type","insert-selection-area-after")&&j(p,Ov),clearTimeout(m))}),Oe("mouseout",J,function(K){K.stopPropagation(),m=window.setTimeout(()=>j(p,void 0))}),H(t,J),jt()}var DJ={prefix:"fas",iconName:"jsoneditor-expand",icon:[512,512,[],"","M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"]},IJ={prefix:"fas",iconName:"jsoneditor-collapse",icon:[512,512,[],"","m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"]},tS={prefix:"fas",iconName:"jsoneditor-format",icon:[512,512,[],"","M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"]},zJ={prefix:"fas",iconName:"jsoneditor-compact",icon:[512,512,[],"","M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"]};It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-welcome.svelte-1eamlhk { + flex: 1; + overflow: auto; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + display: flex; + flex-direction: column; + align-items: center; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-welcome.svelte-1eamlhk:last-child { + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-welcome.svelte-1eamlhk .jse-space.jse-before:where(.svelte-1eamlhk) { + flex: 1; +} +.jse-welcome.svelte-1eamlhk .jse-space.jse-after:where(.svelte-1eamlhk) { + flex: 2; +} +.jse-welcome.svelte-1eamlhk .jse-contents:where(.svelte-1eamlhk) { + display: flex; + flex-direction: column; + max-width: 300px; + margin: 2em var(--jse-padding, 10px); + gap: var(--jse-padding, 10px); +} +.jse-welcome.svelte-1eamlhk .jse-contents:where(.svelte-1eamlhk) .jse-welcome-info:where(.svelte-1eamlhk) { + color: var(--jse-panel-color-readonly, #b2b2b2); +} +.jse-welcome.svelte-1eamlhk .jse-contents:where(.svelte-1eamlhk) button:where(.svelte-1eamlhk) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-primary-background, var(--jse-theme-color, #3883fa)); + color: var(--jse-button-primary-color, #fff); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-welcome.svelte-1eamlhk .jse-contents:where(.svelte-1eamlhk) button:where(.svelte-1eamlhk):hover { + background: var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff)); +} +.jse-welcome.svelte-1eamlhk .jse-contents:where(.svelte-1eamlhk) button:where(.svelte-1eamlhk):disabled { + background: var(--jse-button-primary-background-disabled, #9d9d9d); +}`);var LJ=ue('
You can paste clipboard data using Ctrl+V, or use the following options:
',1),BJ=ue('
Empty document
');function Lb(t,e){var n=typeof t=="string"?t.toLowerCase():t,r=typeof e=="string"?e.toLowerCase():e;return r9(n,r)}function j$(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=Ze(t,e);if(Cr(o)){if(n===void 0)throw new Error("Cannot sort: no property selected by which to sort the array");return function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,u=function(h,f){return function(p,m){var b=Ze(p,h),v=Ze(m,h);return b===void 0?f:v===void 0?-f:typeof b!="string"&&typeof v!="string"?b>v?f:b1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=Ze(i,s),u=Object.keys(l).slice();u.sort((h,f)=>a*Lb(h,f));var d={};return u.forEach(h=>d[h]=l[h]),[{op:"replace",path:yt(s),value:d}]}(t,e,r);throw new Error("Cannot sort: no array or object")}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-navigation-bar-dropdown.svelte-2nnd2m { + position: absolute; + top: 100%; + left: 0; + z-index: 3; + background: var(--jse-navigation-bar-background, var(--jse-background-color, #fff)); + color: var(--jse-navigation-bar-dropdown-color, #656565); + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); + display: flex; + flex-direction: column; + max-height: 300px; + overflow: auto; + min-width: 80px; +} +.jse-navigation-bar-dropdown.svelte-2nnd2m button.jse-navigation-bar-dropdown-item:where(.svelte-2nnd2m) { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + border: none; + background: transparent; + color: inherit; + cursor: pointer; + outline: none; + text-align: left; + white-space: nowrap; + box-sizing: border-box; + padding: calc(0.5 * var(--jse-padding, 10px)) 36px; +} +.jse-navigation-bar-dropdown.svelte-2nnd2m button.jse-navigation-bar-dropdown-item:where(.svelte-2nnd2m):focus, .jse-navigation-bar-dropdown.svelte-2nnd2m button.jse-navigation-bar-dropdown-item:where(.svelte-2nnd2m):hover { + background: var(--jse-navigation-bar-background-highlight, #e5e5e5); +} +.jse-navigation-bar-dropdown.svelte-2nnd2m button.jse-navigation-bar-dropdown-item.jse-selected:where(.svelte-2nnd2m) { + background: var(--jse-navigation-bar-dropdown-color, #656565); + color: var(--jse-navigation-bar-background, var(--jse-background-color, #fff)); +}`);var FJ=ue(''),qJ=ue(''),UJ=ue('
');function VJ(t,e){xt(e,!1);var n=x(e,"items",9),r=x(e,"selectedItem",9),o=x(e,"onSelect",9);_t(!0);var i=UJ(),s=V(i);Or(s,1,()=>MA(n(),100),u=>u,(u,d)=>{var h=FJ();$e(()=>Tn(h,"title",c(d).toString()));var f=V(h);$e(()=>Mt(f,Yd(c(d).toString(),30))),$e(()=>lt(h,"jse-selected",c(d)===r())),Oe("click",h,Bi(()=>o()(c(d)))),H(u,h)});var a=ee(s,2),l=u=>{var d=qJ();Tn(d,"title","Limited to ".concat(100," items")),H(u,d)};ge(a,u=>{n().length>100&&u(l)}),H(t,i),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-navigation-bar-item.svelte-752ro1 { + position: relative; + display: flex; +} +.jse-navigation-bar-item.svelte-752ro1 button.jse-navigation-bar-button:where(.svelte-752ro1) { + font-family: inherit; + font-size: inherit; + padding: calc(0.5 * var(--jse-padding, 10px)) 2px; + border: none; + background: transparent; + color: inherit; + cursor: pointer; + outline: none; + min-width: 2em; + white-space: nowrap; +} +.jse-navigation-bar-item.svelte-752ro1 button.jse-navigation-bar-button:where(.svelte-752ro1):focus, .jse-navigation-bar-item.svelte-752ro1 button.jse-navigation-bar-button:where(.svelte-752ro1):hover { + background: var(--jse-panel-button-background-highlight, #e0e0e0); + color: var(--panel-button-color-highlight, var(--jse-text-color, #4d4d4d)); +} +.jse-navigation-bar-item.svelte-752ro1 button.jse-navigation-bar-button.jse-navigation-bar-arrow:where(.svelte-752ro1) { + padding: 2px var(--jse-padding, 10px) 0; +} +.jse-navigation-bar-item.svelte-752ro1 button.jse-navigation-bar-button.jse-navigation-bar-arrow.jse-open:where(.svelte-752ro1) { + background: var(--jse-navigation-bar-background, var(--jse-background-color, #fff)); + color: var(--jse-navigation-bar-dropdown-color, #656565); +} +.jse-navigation-bar-item.svelte-752ro1:last-child { + padding-right: var(--jse-padding, 10px); +}`);var HJ=ue(''),WJ=ue('
');function nS(t,e){xt(e,!1);var n,r=U(void 0,!0),o=U(void 0,!0),{openAbsolutePopup:i,closeAbsolutePopup:s}=nl("absolute-popup"),a=x(e,"path",9),l=x(e,"index",9),u=x(e,"onSelect",9),d=x(e,"getItems",9),h=U(void 0,!0),f=U(!1,!0);function p(y){s(n),u()(c(r).concat(y))}ie(()=>(B(a()),B(l())),()=>{j(r,a().slice(0,l()))}),ie(()=>(B(a()),B(l())),()=>{j(o,a()[l()])}),En(),_t(!0);var m=WJ(),b=V(m);vn(V(b),{data:WC});var v=ee(b,2),g=y=>{var k=HJ(),S=V(k);$e(()=>Mt(S,c(o))),Oe("click",k,()=>p(c(o))),H(y,k)};ge(v,y=>{c(o)!==void 0&&y(g)}),ar(m,y=>j(h,y),()=>c(h)),$e(()=>lt(b,"jse-open",c(f))),Oe("click",b,function(){if(c(h)){j(f,!0);var y={items:d()(c(r)),selectedItem:c(o),onSelect:p};n=i(VJ,y,{anchor:c(h),closeOnOuterClick:!0,onClose:()=>{j(f,!1)}})}}),H(t,m),jt()}function xw(t){var e,n;if(navigator.clipboard)return navigator.clipboard.writeText(t);if((e=(n=document).queryCommandSupported)!==null&&e!==void 0&&e.call(n,"copy")){var r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();try{document.execCommand("copy")}catch(o){console.error(o)}finally{document.body.removeChild(r)}return Promise.resolve()}return console.error("Copy failed."),Promise.resolve()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-navigation-bar-path-editor.svelte-zc2wx7 { + flex: 1; + display: flex; + border: var(--jse-edit-outline, 2px solid #656565); + background: var(--jse-background-color, #fff); +} +.jse-navigation-bar-path-editor.svelte-zc2wx7 input.jse-navigation-bar-text:where(.svelte-zc2wx7) { + flex: 1; + font-family: inherit; + font-size: inherit; + padding: 0 5px 1px; + background: var(--jse-background-color, #fff); + color: var(--jse-text-color, #4d4d4d); + border: none; + outline: none; +} +.jse-navigation-bar-path-editor.svelte-zc2wx7 button:where(.svelte-zc2wx7) { + border: none; + background: var(--jse-background-color, #fff); + cursor: pointer; + font-family: inherit; + font-size: 80%; + color: inherit; +} +.jse-navigation-bar-path-editor.svelte-zc2wx7 button.jse-navigation-bar-copy.copied:where(.svelte-zc2wx7) { + color: var(--message-success-background, #9ac45d); +} +.jse-navigation-bar-path-editor.svelte-zc2wx7 button.jse-navigation-bar-validation-error:where(.svelte-zc2wx7) { + color: var(--jse-error-color, #ee5341); +} +.jse-navigation-bar-path-editor.error.svelte-zc2wx7 { + border-color: var(--jse-error-color, #ee5341); +} +.jse-navigation-bar-path-editor.error.svelte-zc2wx7 input.jse-navigation-bar-text:where(.svelte-zc2wx7) { + color: var(--jse-error-color, #ee5341); +} +.jse-navigation-bar-path-editor.svelte-zc2wx7 .jse-copied-text:where(.svelte-zc2wx7) { + background: var(--message-success-background, #9ac45d); + color: var(--jse-message-success-color, #fff); + position: relative; + margin: 2px; + padding: 0 5px; + border-radius: 3px; +}`);var KJ=ue(''),JJ=ue('
Copied!
'),GJ=ue('
');function QJ(t,e){xt(e,!1);var n=U(),r=nl("absolute-popup"),o=x(e,"path",8),i=x(e,"pathParser",8),s=x(e,"onChange",8),a=x(e,"onClose",8),l=x(e,"onError",8),u=x(e,"pathExists",8),d=U(),h=U(),f=U(!1),p=void 0,m=U(!1);function b(){c(d).focus()}function v(D){try{var E=i().parse(D);return function(z){if(!u()(z))throw new Error("Path does not exist in current document")}(E),{path:E,error:void 0}}catch(z){return{path:void 0,error:z}}}ko(()=>{b()}),Ai(()=>{clearTimeout(p)}),ie(()=>(B(i()),B(o())),()=>{j(h,i().stringify(o()))}),ie(()=>(c(f),c(h)),()=>{j(n,c(f)?v(c(h)).error:void 0)}),En(),_t();var g=GJ(),y=V(g);ar(y,D=>j(d,D),()=>c(d));var k=ee(y,2),S=D=>{var E=KJ();vn(V(E),{data:Tl}),To(E,(z,G)=>hu==null?void 0:hu(z,G),()=>De({text:String(c(n)||"")},r)),H(D,E)};ge(k,D=>{c(n)&&D(S)});var w=ee(k,2),_=D=>{H(D,JJ())};ge(w,D=>{c(m)&&D(_)});var A=ee(w,2);vn(V(A),{data:Sa}),$e(()=>{lt(g,"error",c(n)),Fl(y,c(h)),lt(A,"copied",c(m))}),Oe("keydown",y,Bi(function(D){var E=oa(D);if(E==="Escape"&&(D.preventDefault(),a()()),E==="Enter"){D.preventDefault(),j(f,!0);var z=v(c(h));z.path!==void 0?s()(z.path):l()(z.error)}})),Oe("input",y,function(D){j(h,D.currentTarget.value)}),Oe("click",A,function(){xw(c(h)),j(m,!0),p=window.setTimeout(()=>j(m,!1),1e3),b()}),H(t,g),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-navigation-bar.svelte-xs03gj { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + background: var(--jse-panel-background, #ebebeb); + color: var(--jse-panel-button-color, inherit); + padding: 0; + margin: 0; + display: flex; + overflow: auto; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-navigation-bar.svelte-xs03gj .jse-navigation-bar-edit:where(.svelte-xs03gj) { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px); + color: var(--jse-panel-color-readonly, #b2b2b2); + background: transparent; + border: none; + display: flex; + cursor: pointer; + outline: none; + align-items: center; +} +.jse-navigation-bar.svelte-xs03gj .jse-navigation-bar-edit.flex:where(.svelte-xs03gj) { + flex: 1; +} +.jse-navigation-bar.svelte-xs03gj .jse-navigation-bar-edit:where(.svelte-xs03gj):focus, .jse-navigation-bar.svelte-xs03gj .jse-navigation-bar-edit:where(.svelte-xs03gj):hover, .jse-navigation-bar.svelte-xs03gj .jse-navigation-bar-edit.editing:where(.svelte-xs03gj) { + background: var(--jse-panel-button-background-highlight, #e0e0e0); + color: var(--panel-button-color-highlight, var(--jse-text-color, #4d4d4d)); + transition: color 0.2s ease-in, background 0.2s ease-in; +} +.jse-navigation-bar.svelte-xs03gj .jse-navigation-bar-edit:where(.svelte-xs03gj) .jse-navigation-bar-space:where(.svelte-xs03gj) { + flex: 1; + text-align: left; +}`);var YJ=ue(" ",1),XJ=ue('
');function ZJ(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=ro("jsoneditor:NavigationBar"),i=x(e,"json",9),s=x(e,"selection",9),a=x(e,"onSelect",9),l=x(e,"onError",9),u=x(e,"pathParser",9),d=U(void 0,!0),h=U(!1,!0);function f(z){o("get items for path",z);var G=Ze(i(),z);if(Array.isArray(G))return zC(0,G.length).map(String);if(In(G)){var F=Object.keys(G).slice(0);return F.sort(Lb),F}return[]}function p(z){return yi(i(),z)}function m(z){o("select path",JSON.stringify(z)),a()(Eo(z,z))}function b(){j(h,!1)}function v(z){b(),m(z)}ie(()=>(B(s()),ht),()=>{j(n,s()?ht(s()):[])}),ie(()=>(B(i()),c(n)),()=>{j(r,Rr(Ze(i(),c(n))))}),ie(()=>c(n),()=>{c(n),setTimeout(()=>{if(c(d)&&c(d).scrollTo){var z=c(d).scrollWidth-c(d).clientWidth;z>0&&(o("scrollTo ",z),c(d).scrollTo({left:z,behavior:"smooth"}))}})}),En(),_t(!0);var g=XJ(),y=V(g),k=z=>{var G=YJ(),F=tt(G);Or(F,1,()=>c(n),Dr,(re,Z,he)=>{nS(re,{getItems:f,get path(){return c(n)},index:he,onSelect:m})});var se=ee(F,2),pe=re=>{nS(re,{getItems:f,get path(){return c(n)},get index(){return c(n).length},onSelect:m})};ge(se,re=>{c(r)&&re(pe)}),H(z,G)},S=z=>{QJ(z,{get path(){return c(n)},onClose:b,onChange:v,get onError(){return l()},pathExists:p,get pathParser(){return u()}})};ge(y,z=>{c(h)?z(S,!1):z(k)});var w=ee(y,2),_=V(w),A=V(_);$e(()=>Mt(A,Rr(i())||c(h)?" ":"Navigation bar"));var D=ee(_,2),E=Fe(()=>c(h)?XR:NR);vn(D,{get data(){return c(E)}}),ar(g,z=>j(d,z),()=>c(d)),$e(()=>{Tn(w,"title",c(h)?"Cancel editing the selected path":"Edit the selected path"),lt(w,"flex",!c(h)),lt(w,"editing",c(h))}),Oe("click",w,function(){j(h,!c(h))}),H(t,g),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-search-box.svelte-1mxl2uo { + border: var(--jse-panel-border, var(--jse-main-border, 1px solid #d7d7d7)); + border-radius: 3px; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + background: var(--jse-panel-background, #ebebeb); + color: var(--jse-panel-color-readonly, #b2b2b2); + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); + display: inline-block; + width: 400px; + max-width: 100%; + overflow: auto; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) { + display: flex; + align-items: stretch; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) button:where(.svelte-1mxl2uo), +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) input:where(.svelte-1mxl2uo) { + font-family: inherit; + font-size: inherit; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) button:where(.svelte-1mxl2uo) { + display: block; + text-align: center; + border: none; + padding: 0 5px; + margin: 0; + cursor: pointer; + color: var(--jse-panel-button-color, inherit); + background: var(--jse-panel-button-background, transparent); +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) button:where(.svelte-1mxl2uo):hover { + color: var(--panel-button-color-highlight, var(--jse-text-color, #4d4d4d)); + background: var(--jse-panel-button-background-highlight, #e0e0e0); +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) input:where(.svelte-1mxl2uo) { + color: var(--jse-panel-color, var(--jse-text-color, #4d4d4d)); + border: var(--jse-input-border, 1px solid #d8dbdf); + border-radius: 3px; + background: var(--jse-input-background, var(--jse-background-color, #fff)); + height: 28px; + padding: 0 5px; + margin: 0; + flex: 1; + width: 0; + min-width: 50px; + outline: none; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-replace-toggle:where(.svelte-1mxl2uo) { + padding: var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)); + min-width: 20px; + background: var(--jse-panel-button-background-highlight, #e0e0e0); +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) { + flex: 1; + display: flex; + flex-direction: column; + padding: calc(0.5 * var(--jse-padding, 10px)); + gap: calc(0.5 * var(--jse-padding, 10px)); +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-search-section:where(.svelte-1mxl2uo) { + flex: 1; + display: flex; + align-items: center; + position: relative; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-search-section:where(.svelte-1mxl2uo) .jse-search-icon:where(.svelte-1mxl2uo) { + color: inherit; + cursor: inherit; + background: inherit; + width: 32px; + text-align: center; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-search-section:where(.svelte-1mxl2uo) label.jse-search-input-label:where(.svelte-1mxl2uo) { + flex: 1; + display: flex; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-search-section:where(.svelte-1mxl2uo) .jse-search-count:where(.svelte-1mxl2uo) { + color: inherit; + font-size: 80%; + visibility: hidden; + padding: 0 5px; + min-width: 36px; + text-align: center; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-search-section:where(.svelte-1mxl2uo) .jse-search-count.jse-visible:where(.svelte-1mxl2uo) { + visibility: visible; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-replace-section:where(.svelte-1mxl2uo) { + flex: 1; + display: flex; + padding-left: 32px; +} +.jse-search-box.svelte-1mxl2uo .jse-search-form:where(.svelte-1mxl2uo) .jse-search-contents:where(.svelte-1mxl2uo) .jse-replace-section:where(.svelte-1mxl2uo) button:where(.svelte-1mxl2uo) { + width: auto; +}`);var eG=ue(''),tG=ue('
'),nG=ue('');function k$(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=U(void 0,!0),i=ro("jsoneditor:SearchBox"),s=x(e,"json",9),a=x(e,"documentState",9),l=x(e,"parser",9),u=x(e,"showSearch",9),d=x(e,"showReplace",13),h=x(e,"readOnly",9),f=x(e,"columns",9),p=x(e,"onSearch",9),m=x(e,"onFocus",9),b=x(e,"onPatch",9),v=x(e,"onClose",9),g=U("",!0),y="",k=U("",!0),S=U(!1,!0),w=U(void 0,!0),_=xp(function(ce){return $.apply(this,arguments)},300),A=xp(function(ce){return oe.apply(this,arguments)},300);function D(){d(!d()&&!h())}function E(ce){ce.stopPropagation();var ae=oa(ce);ae==="Enter"&&(ce.preventDefault(),c(g)!==y?_.flush():be()),ae==="Shift+Enter"&&(ce.preventDefault(),J()),ae==="Ctrl+Enter"&&(ce.preventDefault(),d()?se():be()),ae==="Ctrl+H"&&(ce.preventDefault(),D()),ae==="Escape"&&(ce.preventDefault(),K())}function z(ce){oa(ce)==="Enter"&&(ce.preventDefault(),ce.stopPropagation(),se())}function G(){return F.apply(this,arguments)}function F(){return(F=gt(function*(){yield Pr(),setTimeout(()=>_.flush())})).apply(this,arguments)}function se(){return pe.apply(this,arguments)}function pe(){return(pe=gt(function*(){var ce;if(!h()){var ae=(ce=c(w))===null||ce===void 0?void 0:ce.activeItem;if(i("handleReplace",{replaceText:c(k),activeItem:ae}),c(w)&&ae&&s()!==void 0){j(w,De(De({},qk(c(w))),{},{activeIndex:c(r)}));var{operations:W,newSelection:it}=PW(s(),a(),c(k),ae,l());b()(W,(vt,rt)=>({state:rt,selection:it})),yield Pr(),yield A.flush(),yield Q()}}})).apply(this,arguments)}function re(){return Z.apply(this,arguments)}function Z(){return(Z=gt(function*(){if(!h()){i("handleReplaceAll",{text:c(g),replaceText:c(k)});var{operations:ce,newSelection:ae}=function(W,it,vt,rt,Ee){for(var Ge=Uk(vt,W,{maxResults:1/0}),Ue=[],ft=0;ftT.field!==N.field?T.field===Xi.key?1:-1:N.path.length-T.path.length);var Pe,O=[];return Ue.forEach(T=>{var{field:N,path:ne,items:X}=T;if(N===Xi.key){var me=jn(ne),te=Ze(W,me),qe=dn(ne),Me=Rh(me,Object.keys(te),qe,Hk(qe,rt,X));O=O.concat(Me),Pe=du(W,Me)}else{if(N!==Xi.value)throw new Error("Cannot replace: unknown type of search result field ".concat(N));var mt=Ze(W,ne);if(mt===void 0)throw new Error("Cannot replace: path not found ".concat(yt(ne)));var Bt=typeof mt=="string"?mt:String(mt),We=Zs(W,it,ne),on=Hk(Bt,rt,X),ut=[{op:"replace",path:yt(ne),value:We?on:Au(on,Ee)}];O=O.concat(ut),Pe=du(W,ut)}}),{operations:O,newSelection:Pe}}(s(),a(),c(g),c(k),l());b()(ce,(W,it)=>({state:it,selection:ae})),yield Q()}})).apply(this,arguments)}function he(ce){ce.select()}function be(){return fe.apply(this,arguments)}function fe(){return(fe=gt(function*(){j(w,c(w)?qk(c(w)):void 0),yield Q()})).apply(this,arguments)}function J(){return I.apply(this,arguments)}function I(){return I=gt(function*(){j(w,c(w)?function(ce){var ae=ce.activeIndex>0?ce.activeIndex-1:ce.items.length-1,W=ce.items[ae],it=ce.items.map((vt,rt)=>De(De({},vt),{},{active:rt===ae}));return De(De({},ce),{},{items:it,activeItem:W,activeIndex:ae})}(c(w)):void 0),yield Q()}),I.apply(this,arguments)}function Q(){return M.apply(this,arguments)}function M(){return(M=gt(function*(){var ce;i("handleFocus",c(w));var ae=(ce=c(w))===null||ce===void 0?void 0:ce.activeItem;ae&&s()!==void 0&&(yield m()(ae.path))})).apply(this,arguments)}function C(){return C=gt(function*(ce){yield _e(ce,c(g),s())}),C.apply(this,arguments)}function $(){return $=gt(function*(ce){yield _e(u(),ce,s()),yield Q()}),$.apply(this,arguments)}function oe(){return oe=gt(function*(ce){yield _e(u(),c(g),ce)}),oe.apply(this,arguments)}function _e(ce,ae,W){return q.apply(this,arguments)}function q(){return q=gt(function*(ce,ae,W){return ce?(i("applySearch",{showSearch:ce,text:ae}),ae===""?(i("clearing search result"),c(w)!==void 0&&j(w,void 0),Promise.resolve()):(y=ae,j(S,!0),new Promise(it=>{setTimeout(()=>{var vt=Uk(ae,W,{maxResults:Sv,columns:f()});j(w,function(rt,Ee){var Ge=Ee!=null&&Ee.activeItem?Wk(Ee.activeItem):void 0,Ue=rt.findIndex(et=>gn(Ge,Wk(et))),ft=Ue!==-1?Ue:(Ee==null?void 0:Ee.activeIndex)!==void 0&&(Ee==null?void 0:Ee.activeIndex)0?0:-1,Et=rt.map((et,Pe)=>De(De({},et),{},{active:Pe===ft}));return{items:Et,activeItem:Et[ft],activeIndex:ft}}(vt,c(w))),j(S,!1),it()})}))):(c(w)&&j(w,void 0),Promise.resolve())}),q.apply(this,arguments)}function K(){i("handleClose"),_.cancel(),A.cancel(),_e(!1,c(g),s()),v()()}ie(()=>c(w),()=>{var ce;j(n,((ce=c(w))===null||ce===void 0||(ce=ce.items)===null||ce===void 0?void 0:ce.length)||0)}),ie(()=>c(w),()=>{var ce;j(r,((ce=c(w))===null||ce===void 0?void 0:ce.activeIndex)||0)}),ie(()=>(c(n),Sv),()=>{j(o,c(n)>=Sv?"".concat(999,"+"):String(c(n)))}),ie(()=>(B(p()),c(w)),()=>{p()(c(w))}),ie(()=>B(u()),()=>{(function(ce){C.apply(this,arguments)})(u())}),ie(()=>c(g),()=>{_(c(g))}),ie(()=>B(s()),()=>{A(s())}),En(),_t(!0);var L=un(),xe=tt(L),Je=ce=>{var ae=nG(),W=V(ae),it=V(W),vt=te=>{var qe=eG(),Me=V(qe),mt=Fe(()=>d()?qa:Cd);vn(Me,{get data(){return c(mt)}}),Oe("click",qe,D),H(te,qe)};ge(it,te=>{h()||te(vt)});var rt=V(ee(it,2)),Ee=V(rt),Ge=V(Ee),Ue=te=>{vn(te,{data:ER,spin:!0})},ft=te=>{vn(te,{data:Lm})};ge(Ge,te=>{c(S)?te(Ue):te(ft,!1)});var Et=ee(Ee,2),et=V(Et);ho(()=>lm(et,()=>c(g),te=>j(g,te))),To(et,te=>he==null?void 0:he(te)),ho(()=>Oe("paste",et,G));var Pe=ee(Et,2),O=V(Pe),T=ee(Pe,2);vn(V(T),{data:YR});var N=ee(T,2);vn(V(N),{data:DR});var ne=ee(N,2);vn(V(ne),{data:Bm});var X=ee(rt,2),me=te=>{var qe=tG(),Me=V(qe),mt=ee(Me,2),Bt=ee(mt,2);lm(Me,()=>c(k),We=>j(k,We)),Oe("keydown",Me,z),Oe("click",mt,se),Oe("click",Bt,re),H(te,qe)};ge(X,te=>{d()&&!h()&&te(me)}),$e(()=>{var te,qe;lt(Pe,"jse-visible",c(g)!==""),Mt(O,"".concat((te=c(r)!==-1&&c(r){u()&&ce(Je)}),H(t,L),jt()}var sh=Symbol("path");function rG(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1/0,r={};Array.isArray(t)&&function(i,s,a){if(i.length1?(i.length-1)/(s-1):i.length,u=0;u{In(i)?S$(i,r,e):r[sh]=!0});var o=[];return sh in r&&o.push([]),C$(r,[],o,e),o}function S$(t,e,n){for(var r in t){var o=t[r],i=e[r]||(e[r]={});In(o)&&n?S$(o,i,n):i[sh]===void 0&&(i[sh]=!0)}}function C$(t,e,n,r){for(var o in t){var i=e.concat(o),s=t[o];s&&s[sh]===!0&&n.push(i),Nr(s)&&r&&C$(s,i,n,r)}}function oG(t,e,n,r,o,i){for(var s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:80,a=Cr(n)?n.length:0,l=function(y,k){var S=Object.values(y);if(Jn(S))return k;var w=(_,A)=>_+A;return S.reduce(w)/S.length}(r,o),u=t-s,d=e+2*s,h=y=>r[y]||o,f=0,p=i;p0&&(p-=h(--f));for(var m=f,b=0;bia(r,i))}}function ul(t,e){var{rowIndex:n,columnIndex:r}=t;return[String(n),...e[r]]}function iG(t,e){var[n,r]=eR(t,s=>Zy(s.path[0])),o=q6(n,sG),i=J6(o,s=>{var a={row:[],columns:{}};return s.forEach(l=>{var u=function(d,h){var f=fi(d.path,h);return f.columnIndex!==-1?f.columnIndex:-1}(l,e);u!==-1?(a.columns[u]===void 0&&(a.columns[u]=[]),a.columns[u].push(l)):a.row.push(l)}),a});return{root:r,rows:i}}function Lv(t,e){if(e&&e.length!==0)return e.length===1?e[0]:{path:t,message:"Multiple validation issues: "+e.map(n=>Wi(n.path)+" "+n.message).join(", "),severity:Yi.warning}}function sG(t){return parseInt(t.path[0],10)}function aG(t,e,n){var r=e.some(o=>function(i,s,a){if(!i)return!1;if(s.op==="replace"){var l=ji(s.path),{rowIndex:u,columnIndex:d}=fi(l,a),h=a.findIndex(f=>gn(f,i.path));if(u!==-1&&d!==-1&&d!==h)return!1}return!0}(t,o,n));return r?void 0:t}function oS(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=[];return function r(o,i){Nr(o)&&i.length{r(o[s],i.concat(s))}),Cr(o)&&n.push(i)}(t,[]),n}var $o=ro("jsoneditor:actions");function O$(t){return Bb.apply(this,arguments)}function Bb(){return Bb=gt(function*(t){var{json:e,selection:n,indentation:r,readOnly:o,parser:i,onPatch:s}=t;if(!o&&e!==void 0&&n&&_c(n)){var a=YA(e,n,r,i);if(a!==void 0){$o("cut",{selection:n,clipboard:a,indentation:r}),yield xw(a);var{operations:l,newSelection:u}=n$(e,n);s(l,(d,h)=>({state:h,selection:u}))}}}),Bb.apply(this,arguments)}function _$(t){return Fb.apply(this,arguments)}function Fb(){return Fb=gt(function*(t){var{json:e,selection:n,indentation:r,parser:o}=t,i=YA(e,n,r,o);i!==void 0&&($o("copy",{clipboard:i,indentation:r}),yield xw(i))}),Fb.apply(this,arguments)}function E$(t){var{clipboardText:e,json:n,selection:r,readOnly:o,parser:i,onPatch:s,onChangeText:a,openRepairModal:l}=t;if(!o)try{u(e)}catch{l(e,h=>{$o("repaired pasted text: ",h),u(h)})}function u(d){if(n!==void 0){var h=r||mn([]),f=t$(n,h,d,i);$o("paste",{pastedText:d,operations:f,ensureSelection:h}),s(f,(p,m)=>{var b=m;return f.filter(v=>(HS(v)||Zb(v))&&Rr(v.value)).forEach(v=>{var g=Ji(n,v.path);b=Ul(p,b,g)}),{state:b}})}else $o("paste text",{pastedText:d}),a(e,(p,m)=>{if(p)return{state:Ul(p,m,[])}})}}function A$(t){var{json:e,text:n,selection:r,keepSelection:o,readOnly:i,onChange:s,onPatch:a}=t;if(!i&&r){var l=e!==void 0&&(to(r)||Wn(r))?Eo(r.path,r.path):r;if(Jn(ht(r)))$o("remove root",{selection:r}),s&&s({text:"",json:void 0},e!==void 0?{text:void 0,json:e}:{text:n||"",json:e},{contentErrors:void 0,patchResult:void 0});else if(e!==void 0){var{operations:u,newSelection:d}=n$(e,l);$o("remove",{operations:u,selection:r,newSelection:d}),a(u,(h,f)=>({state:f,selection:o?r:d}))}}}function xm(t){var{insertType:e,selectInside:n,initialValue:r,json:o,selection:i,readOnly:s,parser:a,onPatch:l,onReplaceJson:u}=t;if(!s){var d=function(b,v,g){if(g==="object")return{};if(g==="array")return[];if(g==="structure"&&b!==void 0){var y=v?GA(v):[],k=Ze(b,y);if(Array.isArray(k)&&!Jn(k)){var S=Ws(k);return Rr(S)?I8(S,w=>Array.isArray(w)?[]:In(w)?void 0:""):""}}return""}(o,i,e);if(o!==void 0){var h=a.stringify(d),f=t$(o,i,h,a);$o("onInsert",{insertType:e,operations:f,newValue:d,data:h});var p=dn(f.filter(b=>b.op==="add"||b.op==="replace"));l(f,(b,v,g)=>{if(p){var y=Ji(b,p.path);if(Rr(d))return{state:Li(b,v,y,pw),selection:n?aa(y):g};if(d===""){var k=Jn(y)?void 0:Ze(b,jn(y));return{state:Li(b,v,y,up),selection:In(k)?mw(y,r):hm(y,r)}}}}),$o("after patch")}else{$o("onInsert",{insertType:e,newValue:d});var m=[];u(d,(b,v)=>({state:Ul(b,v,m),selection:Rr(d)?aa(m):hm(m)}))}}}function $$(t){return qb.apply(this,arguments)}function qb(){return qb=gt(function*(t){var{char:e,selectInside:n,json:r,selection:o,readOnly:i,parser:s,onPatch:a,onReplaceJson:l,onSelect:u}=t;i||(to(o)?u(De(De({},o),{},{edit:!0,initialValue:e})):e==="{"?xm({insertType:"object",selectInside:n,initialValue:void 0,json:r,selection:o,readOnly:i,parser:s,onPatch:a,onReplaceJson:l}):e==="["?xm({insertType:"array",selectInside:n,initialValue:void 0,json:r,selection:o,readOnly:i,parser:s,onPatch:a,onReplaceJson:l}):Wn(o)&&r!==void 0?Rr(Ze(r,o.path))||u(De(De({},o),{},{edit:!0,initialValue:e})):($o("onInsertValueWithCharacter",{char:e}),yield function(d){return Ub.apply(this,arguments)}({char:e,json:r,selection:o,readOnly:i,parser:s,onPatch:a,onReplaceJson:l})))}),qb.apply(this,arguments)}function Ub(){return Ub=gt(function*(t){var{char:e,json:n,selection:r,readOnly:o,parser:i,onPatch:s,onReplaceJson:a}=t;o||xm({insertType:"value",selectInside:!1,initialValue:e,json:n,selection:r,readOnly:o,parser:i,onPatch:s,onReplaceJson:a})}),Ub.apply(this,arguments)}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-json-preview.svelte-1vjn89h { + flex: 1; + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + color: var(--jse-panel-color-readonly, #b2b2b2); + overflow: auto; + white-space: pre-wrap; + padding: 2px; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +}`);var lG=ue('
');function M$(t,e){xt(e,!1);var n=U(),r=U(),o=x(e,"text",8),i=x(e,"json",8),s=x(e,"indentation",8),a=x(e,"parser",8);ie(()=>(B(i()),B(o())),()=>{j(n,i()!==void 0?{json:i()}:{text:o()||""})}),ie(()=>(c(n),B(s()),B(a()),_b),()=>{j(r,Yd(Sb(c(n),s(),a()),_b))}),En(),_t();var l=lG(),u=V(l);$e(()=>Mt(u,c(r))),H(t,l),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +button.jse-context-menu-button.svelte-1idfykj { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + flex: 1; + white-space: nowrap; + padding: var(--jse-padding, 10px); + color: inherit; +} +button.jse-context-menu-button.svelte-1idfykj:hover { + background: var(--jse-context-menu-background-highlight, #7a7a7a); +} +button.jse-context-menu-button.svelte-1idfykj:focus { + background: var(--jse-context-menu-background-highlight, #7a7a7a); + z-index: 1; +} +button.jse-context-menu-button.svelte-1idfykj:disabled { + color: var(--jse-context-menu-color-disabled, #9d9d9d); + background: unset; +} +button.jse-context-menu-button.left.svelte-1idfykj { + text-align: left; +} +button.jse-context-menu-button.svelte-1idfykj svg { + width: 16px; +}`);var cG=ue('');function Bv(t,e){xt(e,!1);var n=x(e,"item",8),r=x(e,"className",8,void 0),o=x(e,"onRequestClose",8);_t();var i=cG(),s=Fe(()=>{var h;return"".concat((h=Mu("jse-context-menu-button",r(),n().className))!==null&&h!==void 0?h:""," svelte-1idfykj")}),a=V(i),l=h=>{vn(h,{get data(){return n().icon}})};ge(a,h=>{n().icon&&h(l)});var u=ee(a,2),d=h=>{var f=Po();$e(()=>Mt(f,n().text)),H(h,f)};ge(u,h=>{n().text&&h(d)}),$e(()=>{ui(i,c(s)),Tn(i,"title",n().title),i.disabled=n().disabled||!1}),Oe("click",i,h=>{o()(),n().onClick(h)}),H(t,i),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-dropdown-button.svelte-11rxb2m { + flex: 1; + line-height: normal; + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + position: relative; + padding: 0; + display: flex; +} +.jse-dropdown-button.svelte-11rxb2m ul:where(.svelte-11rxb2m) { + margin: 0; + padding: 0; +} +.jse-dropdown-button.svelte-11rxb2m ul:where(.svelte-11rxb2m) li:where(.svelte-11rxb2m) { + margin: 0; + padding: 0; + list-style-type: none; +} +.jse-dropdown-button.svelte-11rxb2m button.jse-open-dropdown:where(.svelte-11rxb2m) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + width: 2em; + background: var(--jse-context-menu-background, #656565); + color: var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff)); + border-radius: 0; +} +.jse-dropdown-button.svelte-11rxb2m button.jse-open-dropdown.jse-visible:where(.svelte-11rxb2m) { + background: var(--jse-context-menu-background, #656565); +} +.jse-dropdown-button.svelte-11rxb2m button.jse-open-dropdown:where(.svelte-11rxb2m):hover { + background: var(--jse-context-menu-background-highlight, #7a7a7a); +} +.jse-dropdown-button.svelte-11rxb2m button.jse-open-dropdown:where(.svelte-11rxb2m):focus { + z-index: 1; +} +.jse-dropdown-button.svelte-11rxb2m button.jse-open-dropdown:where(.svelte-11rxb2m):disabled { + color: var(--jse-context-menu-color-disabled, #9d9d9d); + background: unset; +} +.jse-dropdown-button.svelte-11rxb2m .jse-dropdown-items:where(.svelte-11rxb2m) { + display: none; + position: absolute; + top: 100%; + left: 0; + z-index: 1; + background: var(--jse-context-menu-background, #656565); + color: var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff)); + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); +} +.jse-dropdown-button.svelte-11rxb2m .jse-dropdown-items.jse-visible:where(.svelte-11rxb2m) { + display: block; +} +.jse-dropdown-button.svelte-11rxb2m .jse-dropdown-items:where(.svelte-11rxb2m) button:where(.svelte-11rxb2m) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + width: 100%; + text-align: left; + padding: var(--jse-padding, 10px); + margin: 0; +} +.jse-dropdown-button.svelte-11rxb2m .jse-dropdown-items:where(.svelte-11rxb2m) button:where(.svelte-11rxb2m):hover { + background: var(--jse-context-menu-background-highlight, #7a7a7a); +} +.jse-dropdown-button.svelte-11rxb2m .jse-dropdown-items:where(.svelte-11rxb2m) button:where(.svelte-11rxb2m):disabled { + color: var(--jse-context-menu-color-disabled, #9d9d9d); + background: unset; +}`);var uG=ue('
  • '),dG=ue('
      ');It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +button.jse-context-menu-button.svelte-1idfykj { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + flex: 1; + white-space: nowrap; + padding: var(--jse-padding, 10px); + color: inherit; +} +button.jse-context-menu-button.svelte-1idfykj:hover { + background: var(--jse-context-menu-background-highlight, #7a7a7a); +} +button.jse-context-menu-button.svelte-1idfykj:focus { + background: var(--jse-context-menu-background-highlight, #7a7a7a); + z-index: 1; +} +button.jse-context-menu-button.svelte-1idfykj:disabled { + color: var(--jse-context-menu-color-disabled, #9d9d9d); + background: unset; +} +button.jse-context-menu-button.left.svelte-1idfykj { + text-align: left; +} +button.jse-context-menu-button.svelte-1idfykj svg { + width: 16px; +}`);var hG=ue('');function Fv(t,e){xt(e,!1);var n=U(),r=x(e,"item",8),o=x(e,"className",8,void 0),i=x(e,"onRequestClose",8);ie(()=>(B(r()),B(i())),()=>{j(n,r().items.map(s=>De(De({},s),{},{onClick:a=>{i()(),s.onClick(a)}})))}),En(),_t(),function(s,a){xt(a,!1);var l=U(void 0,!0),u=x(a,"items",25,()=>[]),d=x(a,"title",9,void 0),h=x(a,"width",9,"120px"),f=U(!1,!0);function p(){j(f,!1)}function m(k){oa(k)==="Escape"&&(k.preventDefault(),j(f,!1))}ko(()=>{document.addEventListener("click",p),document.addEventListener("keydown",m)}),Ai(()=>{document.removeEventListener("click",p),document.removeEventListener("keydown",m)}),ie(()=>B(u()),()=>{j(l,u().every(k=>k.disabled===!0))}),En(),_t(!0);var b=dG(),v=V(b);xr(v,a,"defaultItem",{},null);var g=ee(v,2);vn(V(g),{data:qa});var y=ee(g,2);Or(V(y),5,u,Dr,(k,S)=>{var w=uG(),_=V(w),A=V(_),D=z=>{vn(z,{get data(){return c(S).icon}})};ge(A,z=>{c(S).icon&&z(D)});var E=ee(A);$e(()=>{var z,G;Tn(_,"title",c(S).title),_.disabled=c(S).disabled,ui(_,"".concat((z=c(S).className)!==null&&z!==void 0?z:""," svelte-11rxb2m")),Mt(E," ".concat((G=c(S).text)!==null&&G!==void 0?G:""))}),Oe("click",_,z=>c(S).onClick(z)),H(k,w)}),$e(()=>{var k;Tn(b,"title",d()),g.disabled=c(l),lt(g,"jse-visible",c(f)),Tn(y,"style","width: ".concat((k=h())!==null&&k!==void 0?k:"",";")),lt(y,"jse-visible",c(f))}),Oe("click",g,function(){var k=c(f);setTimeout(()=>j(f,!k))}),Oe("click",b,p),H(s,b),jt()}(t,{get width(){return r().width},get items(){return c(n)},$$slots:{defaultItem:(s,a)=>{var l=hG(),u=Fe(()=>{var p;return"".concat((p=Mu("jse-context-menu-button",o(),r().main.className))!==null&&p!==void 0?p:""," svelte-1idfykj")}),d=V(l),h=p=>{vn(p,{get data(){return r().main.icon}})};ge(d,p=>{r().main.icon&&p(h)});var f=ee(d);$e(()=>{var p;ui(l,c(u)),Tn(l,"title",r().main.title),l.disabled=r().main.disabled||!1,Mt(f," ".concat((p=r().main.text)!==null&&p!==void 0?p:""))}),Oe("click",l,p=>{i()(),r().main.onClick(p)}),H(s,l)}}}),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-contextmenu.svelte-12z7bz1 { + box-shadow: var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24)); + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + background: var(--jse-context-menu-background, #656565); + color: var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff)); +} +.jse-contextmenu.svelte-12z7bz1 .jse-row:where(.svelte-12z7bz1) { + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: stretch; +} +.jse-contextmenu.svelte-12z7bz1 .jse-row:where(.svelte-12z7bz1) div.jse-label:where(.svelte-12z7bz1) { + flex: 1; + white-space: nowrap; + padding: var(--jse-padding, 10px); + color: var(--jse-context-menu-color-disabled, #9d9d9d); + line-height: normal; +} +.jse-contextmenu.svelte-12z7bz1 .jse-row:where(.svelte-12z7bz1) div.jse-tip:where(.svelte-12z7bz1) { + flex: 1; + background: var(--jse-context-menu-tip-background, rgba(255, 255, 255, 0.2)); + color: var(--context-menu-tip-color, inherit); + margin: calc(0.5 * var(--jse-padding, 10px)); + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px); + font-size: 80%; + line-height: 1.3em; + display: flex; + flex-direction: row; + align-items: flex-start; + gap: var(--jse-padding, 10px); + border-radius: 3px; +} +.jse-contextmenu.svelte-12z7bz1 .jse-row:where(.svelte-12z7bz1) div.jse-tip:where(.svelte-12z7bz1) div.jse-tip-icon:where(.svelte-12z7bz1) { + padding-top: calc(0.5 * var(--jse-padding, 10px)); +} +.jse-contextmenu.svelte-12z7bz1 .jse-column:where(.svelte-12z7bz1) { + flex: 1; + display: flex; + flex-direction: column; + align-items: stretch; +} +.jse-contextmenu.svelte-12z7bz1 .jse-column:where(.svelte-12z7bz1):not(:last-child) { + border-right: 1px solid var(--jse-context-menu-separator-color, #7a7a7a); +} +.jse-contextmenu.svelte-12z7bz1 .jse-separator:where(.svelte-12z7bz1) { + width: 100%; + height: 1px; + background: var(--jse-context-menu-separator-color, #7a7a7a); +}`);var fG=ue('
      '),pG=ue('
      '),mG=ue('
      '),gG=ue('
      '),vG=ue('
      '),bG=ue('
      '),yG=ue('
      '),wG=ue('');function T$(t,e){xt(e,!1);var n=x(e,"items",9),r=x(e,"onRequestClose",9),o=x(e,"tip",9),i=U(void 0,!0);ko(()=>{var f=Array.from(c(i).querySelectorAll("button")).find(p=>!p.disabled);f&&f.focus()});var s={ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right"};function a(f){return console.error("Unknown type of context menu item",f),"???"}_t(!0);var l=wG(),u=V(l);Or(u,1,n,Dr,(f,p)=>{var m=un(),b=tt(m),v=y=>{Bv(y,{get item(){return c(p)},get onRequestClose(){return r()}})},g=y=>{var k=un(),S=tt(k),w=A=>{Fv(A,{get item(){return c(p)},get onRequestClose(){return r()}})},_=A=>{var D=un(),E=tt(D),z=F=>{var se=vG();Or(se,5,()=>c(p).items,Dr,(pe,re)=>{var Z=un(),he=tt(Z),be=J=>{Bv(J,{get item(){return c(re)},get onRequestClose(){return r()}})},fe=J=>{var I=un(),Q=tt(I),M=$=>{Fv($,{get item(){return c(re)},get onRequestClose(){return r()}})},C=$=>{var oe=un(),_e=tt(oe),q=L=>{var xe=mG();Or(xe,5,()=>c(re).items,Dr,(Je,ce)=>{var ae=un(),W=tt(ae),it=rt=>{Bv(rt,{className:"left",get item(){return c(ce)},get onRequestClose(){return r()}})},vt=rt=>{var Ee=un(),Ge=tt(Ee),Ue=Et=>{Fv(Et,{className:"left",get item(){return c(ce)},get onRequestClose(){return r()}})},ft=Et=>{var et=un(),Pe=tt(et),O=N=>{H(N,fG())},T=N=>{var ne=un(),X=tt(ne),me=qe=>{var Me=pG(),mt=V(Me);$e(()=>Mt(mt,c(ce).text)),H(qe,Me)},te=qe=>{var Me=Po();$e(()=>Mt(Me,a(c(ce)))),H(qe,Me)};ge(X,qe=>{kW(c(ce))?qe(me):qe(te,!1)},!0),H(N,ne)};ge(Pe,N=>{cp(c(ce))?N(O):N(T,!1)},!0),H(Et,et)};ge(Ge,Et=>{Ev(c(ce))?Et(Ue):Et(ft,!1)},!0),H(rt,Ee)};ge(W,rt=>{wd(c(ce))?rt(it):rt(vt,!1)}),H(Je,ae)}),H(L,xe)},K=L=>{var xe=un(),Je=tt(xe),ce=W=>{H(W,gG())},ae=W=>{var it=Po();$e(()=>Mt(it,a(c(re)))),H(W,it)};ge(Je,W=>{cp(c(re))?W(ce):W(ae,!1)},!0),H(L,xe)};ge(_e,L=>{CW(c(re))?L(q):L(K,!1)},!0),H($,oe)};ge(Q,$=>{Ev(c(re))?$(M):$(C,!1)},!0),H(J,I)};ge(he,J=>{wd(c(re))?J(be):J(fe,!1)}),H(pe,Z)}),H(F,se)},G=F=>{var se=un(),pe=tt(se),re=he=>{H(he,bG())},Z=he=>{var be=Po();$e(()=>Mt(be,a(c(p)))),H(he,be)};ge(pe,he=>{cp(c(p))?he(re):he(Z,!1)},!0),H(F,se)};ge(E,F=>{SW(c(p))?F(z):F(G,!1)},!0),H(A,D)};ge(S,A=>{Ev(c(p))?A(w):A(_,!1)},!0),H(y,k)};ge(b,y=>{wd(c(p))?y(v):y(g,!1)}),H(f,m)});var d=ee(u,2),h=f=>{var p=yG(),m=V(p),b=V(m);vn(V(b),{data:SR});var v=V(ee(b,2));$e(()=>Mt(v,o())),H(f,p)};ge(d,f=>{o()&&f(h)}),ar(l,f=>j(i,f),()=>c(i)),Oe("keydown",l,function(f){var p=oa(f),m=s[p];if(m&&f.target){f.preventDefault();var b=nW({allElements:Array.from(c(i).querySelectorAll("button:not([disabled])")),currentElement:f.target,direction:m,hasPrio:v=>v.getAttribute("data-type")!=="jse-open-dropdown"});b&&b.focus()}}),H(t,l),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-value.jse-string.svelte-6ttr41 { + color: var(--jse-value-color-string, #008000); +} +.jse-value.jse-object.svelte-6ttr41, .jse-value.jse-array.svelte-6ttr41 { + min-width: 16px; + color: var(--jse-delimiter-color, rgba(0, 0, 0, 0.38)); +} +.jse-value.jse-number.svelte-6ttr41 { + color: var(--jse-value-color-number, #ee422e); +} +.jse-value.jse-boolean.svelte-6ttr41 { + color: var(--jse-value-color-boolean, #ff8c00); +} +.jse-value.jse-null.svelte-6ttr41 { + color: var(--jse-value-color-null, #004ed0); +} +.jse-value.jse-invalid.svelte-6ttr41 { + color: var(--jse-text-color, #4d4d4d); +} +.jse-value.jse-url.svelte-6ttr41 { + color: var(--jse-value-color-url, #008000); + text-decoration: underline; +} + +.jse-enum-value.svelte-6ttr41 { + background: var(--jse-hover-background-color, rgba(0, 0, 0, 0.06)); + border: none; + padding: 0; + font-family: inherit; + font-size: inherit; + cursor: pointer; + outline: none; +} +.jse-enum-value.jse-selected.svelte-6ttr41 { + background: var(--jse-selection-background-color, #d3d3d3); + color: inherit; +} +.jse-enum-value.jse-value.svelte-6ttr41:focus { + color: var(--jse-text-color, #4d4d4d); +}`);ue("");ue("");var Nf,Df;function If(t,e){return Nf||(Df=new WeakMap,Nf=new ResizeObserver(n=>{for(var r of n){var o=Df.get(r.target);o&&o(r.target)}})),Df.set(t,e),Nf.observe(t),{destroy:()=>{Df.delete(t),Nf.unobserve(t)}}}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-tree-mode.svelte-vrx1dr { + flex: 1; + display: flex; + flex-direction: column; + position: relative; + background: var(--jse-background-color, #fff); + min-width: 0; + min-height: 0; + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + color: var(--jse-text-color, #4d4d4d); + line-height: var(--jse-line-height, calc(1em + 4px)); +} +.jse-tree-mode.svelte-vrx1dr .jse-hidden-input-label:where(.svelte-vrx1dr) .jse-hidden-input:where(.svelte-vrx1dr) { + position: fixed; + top: -10px; + left: -10px; + width: 1px; + height: 1px; + padding: 0; + border: 0; + outline: none; +} +.jse-tree-mode.no-main-menu.svelte-vrx1dr { + border-top: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-tree-mode.svelte-vrx1dr .jse-search-box-container:where(.svelte-vrx1dr) { + position: relative; + height: 0; + top: var(--jse-padding, 10px); + margin-right: calc(var(--jse-padding, 10px) + 20px); + margin-left: var(--jse-padding, 10px); + text-align: right; + z-index: 3; +} +.jse-tree-mode.svelte-vrx1dr .jse-contents:where(.svelte-vrx1dr) { + flex: 1; + overflow: auto; + position: relative; + padding: 2px; + display: flex; + flex-direction: column; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-tree-mode.svelte-vrx1dr .jse-contents:where(.svelte-vrx1dr):last-child { + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-tree-mode.svelte-vrx1dr .jse-contents:where(.svelte-vrx1dr) .jse-loading-space:where(.svelte-vrx1dr) { + flex: 1; +} +.jse-tree-mode.svelte-vrx1dr .jse-contents:where(.svelte-vrx1dr) .jse-loading:where(.svelte-vrx1dr) { + flex: 2; + text-align: center; + color: var(--jse-panel-color-readonly, #b2b2b2); + box-sizing: border-box; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); +} +.jse-tree-mode.svelte-vrx1dr .jse-contents:where(.svelte-vrx1dr) .jse-search-box-background:where(.svelte-vrx1dr) { + border: 50px solid var(--jse-modal-background, #f5f5f5); + margin: -2px; + margin-bottom: 2px; + display: inline-block; +}`);var xG=ue(" ",1),jG=ue('
      '),kG=ue('
      ',1),SG=ue(' ',1),CG=ue('
      loading...
      '),OG=ue('
      ',1);function Vb(t,e){xt(e,!1);var n=U(void 0,!0),r=ro("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var i=Yc(),s=Yc(),{openAbsolutePopup:a,closeAbsolutePopup:l}=nl("absolute-popup"),u=U(void 0,!0),d=U(void 0,!0),h=U(void 0,!0),f=!1,p=v$(),m=x(e,"readOnly",9),b=x(e,"externalContent",9),v=x(e,"externalSelection",9),g=x(e,"history",9),y=x(e,"mainMenuBar",9),k=x(e,"navigationBar",9),S=x(e,"escapeControlCharacters",9),w=x(e,"escapeUnicodeCharacters",9),_=x(e,"parser",9),A=x(e,"parseMemoizeOne",9),D=x(e,"validator",9),E=x(e,"validationParser",9),z=x(e,"pathParser",9),G=x(e,"indentation",9),F=x(e,"onError",9),se=x(e,"onChange",9),pe=x(e,"onChangeMode",9),re=x(e,"onSelect",9),Z=x(e,"onUndo",9),he=x(e,"onRedo",9),be=x(e,"onRenderValue",9),fe=x(e,"onRenderMenu",9),J=x(e,"onRenderContextMenu",9),I=x(e,"onClassName",9),Q=x(e,"onFocus",9),M=x(e,"onBlur",9),C=x(e,"onSortModal",9),$=x(e,"onTransformModal",9),oe=x(e,"onJSONEditorModal",9),_e=!1,q=U(!1,!0),K=U(void 0,!0);yw({onMount:ko,onDestroy:Ai,getWindow:()=>Mh(c(h)),hasFocus:()=>_e&&document.hasFocus()||rw(c(h)),onFocus:()=>{f=!0,Q()&&Q()()},onBlur:()=>{f=!1,M()&&M()()}});var L=U(void 0,!0),xe=U(void 0,!0),Je=void 0,ce=!1,ae=U(Ab({json:c(L)}),!0),W=U(th(v())?v():void 0,!0);function it(R){j(W,R)}ko(()=>{if(c(W)){var R=ht(c(W));j(ae,Li(c(L),c(ae),R,up)),setTimeout(()=>tr(R))}});var vt,rt=U(void 0,!0),Ee=U(void 0,!0),Ge=U(void 0,!0),Ue=U(!1,!0),ft=U(!1,!0);function Et(R){j(Ge,(vt=R)?o$(c(L),vt.items):void 0)}function et(R){return Pe.apply(this,arguments)}function Pe(){return(Pe=gt(function*(R){j(ae,Li(c(L),c(ae),R,up)),yield pt(R)})).apply(this,arguments)}function O(){j(Ue,!1),j(ft,!1),xn()}function T(R){r("select validation error",R),j(W,mn(R.path)),pt(R.path)}function N(R){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dk;r("expand"),j(ae,Li(c(L),c(ae),R,le))}function ne(R,le){j(ae,Tk(c(L),c(ae),R,le)),c(W)&&function(Se,Re){return ia(ht(Se),Re)&&(ht(Se).length>Re.length||wo(Se))}(c(W),R)&&j(W,void 0)}var X=U(!1,!0),me=U([],!0),te=U(void 0,!0),qe=Od(b$);function Me(R,le,Se,Re){Ac(()=>{var Ne;try{Ne=qe(R,le,Se,Re)}catch(Ie){Ne=[{path:[],message:"Failed to validate: "+Ie.message,severity:Yi.warning}]}gn(Ne,c(me))||(r("validationErrors changed:",Ne),j(me,Ne),j(te,function(Ie,Ct){var Ot;return Ct.forEach(At=>{Ot=eS(Ie,Ot,At.path,(Kt,Jt)=>De(De({},Jt),{},{validationError:At}))}),Ct.forEach(At=>{for(var Kt=At.path;Kt.length>0;)Kt=jn(Kt),Ot=eS(Ie,Ot,Kt,(Jt,Vn)=>Vn.validationError?Vn:De(De({},Vn),{},{validationError:{isChildError:!0,path:Kt,message:"Contains invalid data",severity:Yi.warning}}))}),Ot}(R,c(me))))},Ne=>r("validationErrors updated in ".concat(Ne," ms")))}function mt(){return r("validate"),Je?{parseError:Je,isRepairable:!1}:(Me(c(L),D(),_(),E()),Jn(c(me))?void 0:{validationErrors:c(me)})}function Bt(){return c(L)}function We(){return c(ae)}function on(){return c(W)}function ut(R){r("applyExternalContent",{updatedContent:R}),Qd(R)?function(le){if(le!==void 0){var Se=!gn(c(L),le);if(r("update external json",{isChanged:Se,currentlyText:c(L)===void 0}),!!Se){var Re={documentState:c(ae),selection:c(W),json:c(L),text:c(xe),textIsRepaired:c(X)};j(L,le),j(ae,ii(le,c(ae))),$n(c(L)),j(xe,void 0),j(X,!1),Je=void 0,Pn(c(L)),en(Re)}}}(R.json):Gd(R)&&function(le){if(!(le===void 0||Qd(b()))){var Se=le!==c(xe);if(r("update external text",{isChanged:Se}),!!Se){var Re={documentState:c(ae),selection:c(W),json:c(L),text:c(xe),textIsRepaired:c(X)};try{j(L,A()(le)),j(ae,ii(c(L),c(ae))),$n(c(L)),j(xe,le),j(X,!1),Je=void 0}catch(Ne){try{j(L,A()(Ss(le))),j(ae,ii(c(L),c(ae))),$n(c(L)),j(xe,le),j(X,!0),Je=void 0,Pn(c(L))}catch{j(L,void 0),j(ae,void 0),j(xe,b().text),j(X,!1),Je=c(xe)!==void 0&&c(xe)!==""?cu(c(xe),Ne.message||String(Ne)):void 0}}Pn(c(L)),en(Re)}}}(R.text)}function $n(R){ce||(ce=!0,j(ae,Ul(R,c(ae),[])))}function Pn(R){c(W)&&(yi(R,_l(c(W)))&&yi(R,ht(c(W)))||(r("clearing selection: path does not exist anymore",c(W)),j(W,dc(R,c(ae)))))}function en(R){if(R.json!==void 0||R.text!==void 0){var le=c(L)!==void 0&&R.json!==void 0;g().add({type:"tree",undo:{patch:le?[{op:"replace",path:"",value:R.json}]:void 0,json:R.json,text:R.text,documentState:R.documentState,textIsRepaired:R.textIsRepaired,selection:ys(R.selection),sortedColumn:void 0},redo:{patch:le?[{op:"replace",path:"",value:c(L)}]:void 0,json:c(L),text:c(xe),documentState:c(ae),textIsRepaired:c(X),selection:ys(c(W)),sortedColumn:void 0}})}}function Tt(R,le){var Se;if(r("patch",R,le),c(L)===void 0)throw new Error("Cannot apply patch: no JSON");var Re=c(L),Ne={json:void 0,text:c(xe),documentState:c(ae),selection:ys(c(W)),textIsRepaired:c(X),sortedColumn:void 0},Ie=r$(c(L),R),Ct=WA(c(L),c(ae),R),Ot=(Se=du(c(L),R))!==null&&Se!==void 0?Se:c(W),At=typeof le=="function"?le(Ct.json,Ct.documentState,Ot):void 0;return j(L,(At==null?void 0:At.json)!==void 0?At.json:Ct.json),j(ae,(At==null?void 0:At.state)!==void 0?At.state:Ct.documentState),j(W,(At==null?void 0:At.selection)!==void 0?At.selection:Ot),j(xe,void 0),j(X,!1),j(Ee,void 0),Je=void 0,Pn(c(L)),g().add({type:"tree",undo:De({patch:Ie},Ne),redo:{patch:R,json:void 0,text:c(xe),documentState:c(ae),selection:ys(c(W)),sortedColumn:void 0,textIsRepaired:c(X)}}),{json:c(L),previousJson:Re,undo:Ie,redo:R}}function hn(){!m()&&c(W)&&j(W,mw(ht(c(W))))}function Kn(){if(!m()&&c(W)){var R=ht(c(W)),le=Ze(c(L),R);Rr(le)?function(Se,Re){r("openJSONEditorModal",{path:Se,value:Re}),_e=!0,oe()({content:{json:Re},path:Se,onPatch:c(ln).onPatch,onClose:()=>{_e=!1,setTimeout(xn)}})}(R,le):j(W,hm(R))}}function lr(){if(!m()&&Wn(c(W))){var R=ht(c(W)),le=yt(R),Se=Ze(c(L),R),Re=!Zs(c(L),c(ae),R),Ne=Re?String(Se):Au(String(Se),_());r("handleToggleEnforceString",{enforceString:Re,value:Se,updatedValue:Ne}),qn([{op:"replace",path:le,value:Ne}],(Ie,Ct)=>({state:gg(c(L),Ct,R,{type:"value",enforceString:Re})}))}}function Ve(){return c(X)&&c(L)!==void 0&&Qr(c(L)),c(L)!==void 0?{json:c(L)}:{text:c(xe)||""}}function kt(){return Qt.apply(this,arguments)}function Qt(){return Qt=gt(function*(){var R=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];yield O$({json:c(L),selection:c(W),indentation:R?G():void 0,readOnly:m(),parser:_(),onPatch:qn})}),Qt.apply(this,arguments)}function tn(){return an.apply(this,arguments)}function an(){return an=gt(function*(){var R=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];c(L)!==void 0&&(yield _$({json:c(L),selection:c(W),indentation:R?G():void 0,parser:_()}))}),an.apply(this,arguments)}function kn(R){var le;R.preventDefault();var Se=(le=R.clipboardData)===null||le===void 0?void 0:le.getData("text/plain");Se!==void 0&&E$({clipboardText:Se,json:c(L),selection:c(W),readOnly:m(),parser:_(),onPatch:qn,onChangeText:Yr,openRepairModal:Yn})}function Sn(){j(q,!0)}function Yn(R,le){j(K,{text:R,onParse:Se=>pg(Se,Re=>$h(Re,_())),onRepair:PA,onApply:le,onClose:xn})}function zn(){A$({json:c(L),text:c(xe),selection:c(W),keepSelection:!1,readOnly:m(),onChange:se(),onPatch:qn})}function $r(){!m()&&c(L)!==void 0&&c(W)&&_c&&!Jn(ht(c(W)))&&(r("duplicate",{selection:c(W)}),qn(e$(c(L),La(c(L),c(W)))))}function vr(){if(!m()&&c(W)&&(ir(c(W))||Wn(c(W)))&&!Jn(ht(c(W)))){r("extract",{selection:c(W)});var R=function(le,Se){if(Wn(Se))return[{op:"move",from:yt(Se.path),path:""}];if(!ir(Se))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Re=jn(Se.focusPath),Ne=Ze(le,Re);if(Cr(Ne)){var Ie=La(le,Se).map(Ot=>{var At=fo(dn(Ot));return Ne[At]});return[{op:"replace",path:"",value:Ie}]}if(Nr(Ne)){var Ct={};return La(le,Se).forEach(Ot=>{var At=String(dn(Ot));Ct[At]=Ne[At]}),[{op:"replace",path:"",value:Ct}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(Se))}(c(L),c(W));qn(R,(le,Se)=>{if(Rr(le))return{state:$v(le,Se,[])}})}}function zr(R){xm({insertType:R,selectInside:!0,initialValue:void 0,json:c(L),selection:c(W),readOnly:m(),parser:_(),onPatch:qn,onReplaceJson:Qr})}function cr(R){to(c(W))&&j(W,mn(c(W).path)),c(W)||j(W,dc(c(L),c(ae))),zr(R)}function oo(R){if(!m()&&c(W))if(Mf(c(W)))try{var le=_l(c(W)),Se=Ze(c(L),le),Re=function(Ie,Ct,Ot){if(Ct==="array"){if(Array.isArray(Ie))return Ie;if(In(Ie))return wk(Ie);if(typeof Ie=="string")try{var At=Ot.parse(Ie);if(Array.isArray(At))return At;if(In(At))return wk(At)}catch{return[Ie]}return[Ie]}if(Ct==="object"){if(Array.isArray(Ie))return yk(Ie);if(In(Ie))return Ie;if(typeof Ie=="string")try{var Kt=Ot.parse(Ie);if(In(Kt))return Kt;if(Array.isArray(Kt))return yk(Kt)}catch{return{value:Ie}}return{value:Ie}}if(Ct==="value")return Rr(Ie)?Ot.stringify(Ie):Ie;throw new Error("Cannot convert ".concat(ew(Ie,Ot)," to ").concat(Ct))}(Se,R,_());if(Re===Se)return;var Ne=[{op:"replace",path:yt(le),value:Re}];r("handleConvert",{selection:c(W),path:le,type:R,operations:Ne}),qn(Ne,(Ie,Ct)=>({state:c(W)?Ul(Ie,Ct,ht(c(W))):c(ae)}))}catch(Ie){F()(Ie)}else F()(new Error("Cannot convert current selection to ".concat(R)))}function Vr(){if(c(W)){var R=Ik(c(L),c(ae),c(W),!1),le=jn(ht(c(W)));R&&!Jn(ht(R))&&gn(le,jn(ht(R)))?j(W,ea(ht(R))):j(W,aa(le)),r("insert before",{selection:c(W),selectionBefore:R,parentPath:le}),Pr().then(()=>Vt())}}function er(){if(c(W)){var R=Ba(c(L),c(W));r("insert after",R),j(W,ea(R)),Pr().then(()=>Vt())}}function io(R){return Lr.apply(this,arguments)}function Lr(){return(Lr=gt(function*(R){yield $$({char:R,selectInside:!0,json:c(L),selection:c(W),readOnly:m(),parser:_(),onPatch:qn,onReplaceJson:Qr,onSelect:it})})).apply(this,arguments)}function ye(){if(!m()&&g().canUndo){var R=g().undo();if(um(R)){var le={json:c(L),text:c(xe)};j(L,R.undo.patch?Ki(c(L),R.undo.patch):R.undo.json),j(ae,R.undo.documentState),j(W,R.undo.selection),j(xe,R.undo.text),j(X,R.undo.textIsRepaired),Je=void 0,r("undo",{item:R,json:c(L),documentState:c(ae),selection:c(W)}),Ut(le,R.undo.patch&&R.redo.patch?{json:c(L),previousJson:le.json,redo:R.undo.patch,undo:R.redo.patch}:void 0),xn(),c(W)&&pt(ht(c(W)),!1)}else Z()(R)}}function Qe(){if(!m()&&g().canRedo){var R=g().redo();if(um(R)){var le={json:c(L),text:c(xe)};j(L,R.redo.patch?Ki(c(L),R.redo.patch):R.redo.json),j(ae,R.redo.documentState),j(W,R.redo.selection),j(xe,R.redo.text),j(X,R.redo.textIsRepaired),Je=void 0,r("redo",{item:R,json:c(L),documentState:c(ae),selection:c(W)}),Ut(le,R.undo.patch&&R.redo.patch?{json:c(L),previousJson:le.json,redo:R.redo.patch,undo:R.undo.patch}:void 0),xn(),c(W)&&pt(ht(c(W)),!1)}else he()(R)}}function Dt(R){var le;m()||c(L)===void 0||(_e=!0,C()({id:i,json:c(L),rootPath:R,onSort:(le=gt(function*(Se){var{operations:Re}=Se;r("onSort",R,Re),qn(Re,(Ne,Ie)=>({state:$v(Ne,Ie,R),selection:mn(R)}))}),function(Se){return le.apply(this,arguments)}),onClose:()=>{_e=!1,setTimeout(xn)}}))}function nn(){c(W)&&Dt(Lk(c(L),c(W)))}function Wt(){Dt([])}function yn(R){if(c(L)!==void 0){var{id:le,onTransform:Se,onClose:Re}=R,Ne=R.rootPath||[];_e=!0,$()({id:le||s,json:c(L),rootPath:Ne,onTransform:Ie=>{Se?Se({operations:Ie,json:c(L),transformedJson:Ki(c(L),Ie)}):(r("onTransform",Ne,Ie),qn(Ie,(Ct,Ot)=>({state:$v(Ct,Ot,Ne),selection:mn(Ne)})))},onClose:()=>{_e=!1,setTimeout(xn),Re&&Re()}})}}function ke(){c(W)&&yn({rootPath:Lk(c(L),c(W))})}function Ye(){yn({rootPath:[]})}function pt(R){return sn.apply(this,arguments)}function sn(){return sn=gt(function*(R){var le=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];j(ae,Li(c(L),c(ae),R,up)),yield Pr();var Se=Nn(R);if(r("scrollTo",{path:R,elem:Se,refContents:c(u)}),!Se||!c(u))return Promise.resolve();var Re=c(u).getBoundingClientRect(),Ne=Se.getBoundingClientRect();if(!le&&Ne.bottom>Re.top&&Ne.top{p(Se,{container:c(u),offset:Ie,duration:300,callback:()=>Ct()})})}),sn.apply(this,arguments)}function Nn(R){var le,Se;return(le=(Se=c(u))===null||Se===void 0?void 0:Se.querySelector('div[data-path="'.concat(Cb(R),'"]')))!==null&&le!==void 0?le:void 0}function tr(R){var le=Nn(R);if(le&&c(u)){var Se=c(u).getBoundingClientRect(),Re=le.getBoundingClientRect(),Ne=Rr(Ze(c(L),R))?20:Re.height;Re.topSe.bottom-20&&p(le,{container:c(u),offset:-(Se.height-Ne-20),duration:0})}}function Ut(R,le){if(R.json!==void 0||(R==null?void 0:R.text)!==void 0){if(c(xe)!==void 0){var Se,Re={text:c(xe),json:void 0};(Se=se())===null||Se===void 0||Se(Re,R,{contentErrors:mt(),patchResult:le})}else if(c(L)!==void 0){var Ne,Ie={text:void 0,json:c(L)};(Ne=se())===null||Ne===void 0||Ne(Ie,R,{contentErrors:mt(),patchResult:le})}}}function qn(R,le){r("handlePatch",R,le);var Se={json:c(L),text:c(xe)},Re=Tt(R,le);return Ut(Se,Re),Re}function Qr(R,le){var Se={json:c(L),text:c(xe)},Re={documentState:c(ae),selection:c(W),json:c(L),text:c(xe),textIsRepaired:c(X)},Ne=Li(c(L),ii(R,c(ae)),[],sd),Ie=typeof le=="function"?le(R,Ne,c(W)):void 0;j(L,(Ie==null?void 0:Ie.json)!==void 0?Ie.json:R),j(ae,(Ie==null?void 0:Ie.state)!==void 0?Ie.state:Ne),j(W,(Ie==null?void 0:Ie.selection)!==void 0?Ie.selection:c(W)),j(xe,void 0),j(X,!1),Je=void 0,Pn(c(L)),en(Re),Ut(Se,void 0)}function Yr(R,le){r("handleChangeText");var Se={json:c(L),text:c(xe)},Re={documentState:c(ae),selection:c(W),json:c(L),text:c(xe),textIsRepaired:c(X)};try{j(L,A()(R)),j(ae,Li(c(L),ii(c(L),c(ae)),[],sd)),j(xe,void 0),j(X,!1),Je=void 0}catch(Ie){try{j(L,A()(Ss(R))),j(ae,Li(c(L),ii(c(L),c(ae)),[],sd)),j(xe,R),j(X,!0),Je=void 0}catch{j(L,void 0),j(ae,Ab({json:c(L),expand:sd})),j(xe,R),j(X,!1),Je=c(xe)!==""?cu(c(xe),Ie.message||String(Ie)):void 0}}if(typeof le=="function"){var Ne=le(c(L),c(ae),c(W));j(L,(Ne==null?void 0:Ne.json)!==void 0?Ne.json:c(L)),j(ae,(Ne==null?void 0:Ne.state)!==void 0?Ne.state:c(ae)),j(W,(Ne==null?void 0:Ne.selection)!==void 0?Ne.selection:c(W))}Pn(c(L)),en(Re),Ut(Se,void 0)}function Yt(R,le){var Se=arguments.length>2&&arguments[2]!==void 0&&arguments[2];r("handleExpand",{path:R,expanded:le,recursive:Se}),le?N(R,Se?pw:Dk):ne(R,Se),xn()}function wn(){Yt([],!0,!0)}function dt(){Yt([],!1,!0)}function Y(R){r("openFind",{findAndReplace:R}),j(Ue,!1),j(ft,!1),Pr().then(()=>{j(Ue,!0),j(ft,R)})}function ve(R,le){r("handleExpandSection",R,le),j(ae,function(Se,Re,Ne,Ie){return uu(Se,Re,Ne,(Ct,Ot)=>{if(!jo(Ot))return Ot;var At=UA(Ot.visibleSections.concat(Ie));return De(De({},Ot),{},{visibleSections:At})})}(c(L),c(ae),R,le))}function He(R){r("pasted json as text",R),j(Ee,R)}function Xt(R){var le,{anchor:Se,left:Re,top:Ne,width:Ie,height:Ct,offsetTop:Ot,offsetLeft:At,showTip:Kt}=R,Jt=function(Xn){var{json:Gt,documentState:ze,selection:Le,readOnly:Rt,onEditKey:Rn,onEditValue:cn,onToggleEnforceString:Hn,onCut:Er,onCopy:nr,onPaste:Mr,onRemove:Xr,onDuplicate:Ti,onExtract:Fr,onInsertBefore:Vo,onInsert:Pi,onConvert:Ri,onInsertAfter:Io,onSort:rr,onTransform:So}=Xn,Bn=Gt!==void 0,Tr=!!Le,Ho=!!Le&&Jn(ht(Le)),us=Le?Ze(Gt,ht(Le)):void 0,Dh=Array.isArray(us)?"Edit array":In(us)?"Edit object":"Edit value",di=Bn&&(ir(Le)||to(Le)||Wn(Le)),Ih=Le&&!Ho?Ze(Gt,jn(ht(Le))):void 0,_g=!Rt&&Bn&&dm(Le)&&!Ho&&!Array.isArray(Ih),Tu=!Rt&&Bn&&Le!==void 0&&dm(Le),Eg=Tu&&!Rr(us),qr=!Rt&&di,hi=di,Pu=!Rt&&Tr,Ru=!Rt&&Bn&&di&&!Ho,ol=!Rt&&Bn&&Le!==void 0&&(ir(Le)||Wn(Le))&&!Ho,Hr=di,il=Hr?"Convert to:":"Insert:",Ag=!Rt&&(wo(Le)&&Array.isArray(us)||xi(Le)&&Array.isArray(Ih)),$g=!Rt&&(Hr?Mf(Le)&&!In(us):Tr),Mg=!Rt&&(Hr?Mf(Le)&&!Array.isArray(us):Tr),Tg=!Rt&&(Hr?Mf(Le)&&Rr(us):Tr),Pg=Le!==void 0&&Zs(Gt,ze,ht(Le));function rc(ds){di?ds!=="structure"&&Ri(ds):Pi(ds)}return[{type:"row",items:[{type:"button",onClick:()=>Rn(),icon:Tc,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!_g},{type:"dropdown-button",main:{type:"button",onClick:()=>cn(),icon:Tc,text:Dh,title:"Edit the value (Double-click on the value)",disabled:!Tu},width:"11em",items:[{type:"button",icon:Tc,text:Dh,title:"Edit the value (Double-click on the value)",onClick:()=>cn(),disabled:!Tu},{type:"button",icon:Pg?HC:KC,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:()=>Hn(),disabled:!Eg}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:()=>Er(!0),icon:Mc,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!qr},width:"10em",items:[{type:"button",icon:Mc,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:()=>Er(!0),disabled:!qr},{type:"button",icon:Mc,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:()=>Er(!1),disabled:!qr}]},{type:"dropdown-button",main:{type:"button",onClick:()=>nr(!0),icon:Sa,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!hi},width:"12em",items:[{type:"button",icon:Sa,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:()=>nr(!0),disabled:!hi},{type:"button",icon:Sa,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:()=>nr(!1),disabled:!hi}]},{type:"button",onClick:()=>Mr(),icon:VC,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!Pu}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:()=>Ti(),icon:QC,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!Ru},{type:"button",onClick:()=>Fr(),icon:VR,text:"Extract",title:"Extract selected contents",disabled:!ol},{type:"button",onClick:()=>rr(),icon:Sp,text:"Sort",title:"Sort array or object contents",disabled:Rt||!di},{type:"button",onClick:()=>So(),icon:jp,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:Rt||!di},{type:"button",onClick:()=>Xr(),icon:o0,text:"Remove",title:"Remove selected contents (Delete)",disabled:Rt||!di}]},{type:"column",items:[{type:"label",text:il},{type:"button",onClick:()=>rc("structure"),icon:Hr?Gh:wc,text:"Structure",title:il+" structure like the first item in the array",disabled:!Ag},{type:"button",onClick:()=>rc("object"),icon:Hr?Gh:wc,text:"Object",title:il+" object",disabled:!$g},{type:"button",onClick:()=>rc("array"),icon:Hr?Gh:wc,text:"Array",title:il+" array",disabled:!Mg},{type:"button",onClick:()=>rc("value"),icon:Hr?Gh:wc,text:"Value",title:il+" value",disabled:!Tg}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:()=>Vo(),icon:zR,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:Rt||!di||Ho},{type:"button",onClick:()=>Io(),icon:MR,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:Rt||!di||Ho}]}]}({json:c(L),documentState:c(ae),selection:c(W),readOnly:m(),onEditKey:hn,onEditValue:Kn,onToggleEnforceString:lr,onCut:kt,onCopy:tn,onPaste:Sn,onRemove:zn,onDuplicate:$r,onExtract:vr,onInsertBefore:Vr,onInsert:cr,onInsertAfter:er,onConvert:oo,onSort:nn,onTransform:ke}),Vn=(le=J()(Jt))!==null&&le!==void 0?le:Jt;if(Vn!==!1){var $t={left:Re,top:Ne,offsetTop:Ot,offsetLeft:At,width:Ie,height:Ct,anchor:Se,closeOnOuterClick:!0,onClose:()=>{_e=!1,xn()}};_e=!0;var fr=a(T$,{tip:Kt?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0,items:Vn,onRequestClose:()=>l(fr)},$t)}}function Vt(R){if(!Bo(c(W)))if(R&&(R.stopPropagation(),R.preventDefault()),R&&R.type==="contextmenu"&&R.target!==c(d))Xt({left:R.clientX,top:R.clientY,width:Vs,height:Us,showTip:!1});else{var le,Se=(le=c(u))===null||le===void 0?void 0:le.querySelector(".jse-context-menu-pointer.jse-selected");if(Se)Xt({anchor:Se,offsetTop:2,width:Vs,height:Us,showTip:!1});else{var Re,Ne=(Re=c(u))===null||Re===void 0?void 0:Re.getBoundingClientRect();Ne&&Xt({top:Ne.top+2,left:Ne.left+2,width:Vs,height:Us,showTip:!1})}}}function Ft(R){Xt({anchor:FA(R.target,"BUTTON"),offsetTop:0,width:Vs,height:Us,showTip:!0})}function Ln(){return Br.apply(this,arguments)}function Br(){return(Br=gt(function*(){if(r("apply pasted json",c(Ee)),c(Ee)){var{onPasteAsJson:R}=c(Ee);j(Ee,void 0),R(),setTimeout(xn)}})).apply(this,arguments)}function br(){r("clear pasted json"),j(Ee,void 0),xn()}function qt(){pe()(Gr.text)}function Un(R){j(W,R),xn(),pt(ht(R))}function xn(){r("focus"),c(d)&&(c(d).focus(),c(d).select())}function so(R){return function(le,Se,Re){var Ne=jn(Re),Ie=[dn(Re)],Ct=Ze(le,Ne),Ot=Ct?Av(Ct,Se,Ie):void 0;return Ot?mn(Ne.concat(Ot)):ea(Re)}(c(L),c(ae),R)}function Pt(R){c(n)&&c(n).onDrag(R)}function fn(){c(n)&&c(n).onDragEnd()}var ln=U(void 0,!0);ie(()=>c(W),()=>{var R;R=c(W),gn(R,v())||(r("onSelect",R),re()(R))}),ie(()=>(B(S()),B(w())),()=>{j(rt,tw({escapeControlCharacters:S(),escapeUnicodeCharacters:w()}))}),ie(()=>c(Ue),()=>{(function(R){c(u)&&R&&c(u).scrollTop===0&&(si(u,c(u).style.overflowAnchor="none"),si(u,c(u).scrollTop+=id),setTimeout(()=>{c(u)&&si(u,c(u).style.overflowAnchor="")}))})(c(Ue))}),ie(()=>B(b()),()=>{ut(b())}),ie(()=>B(v()),()=>{(function(R){gn(c(W),R)||(r("applyExternalSelection",{selection:c(W),externalSelection:R}),th(R)&&j(W,R))})(v())}),ie(()=>(c(L),B(D()),B(_()),B(E())),()=>{Me(c(L),D(),_(),E())}),ie(()=>(c(u),Zk),()=>{j(n,c(u)?Zk(c(u)):void 0)}),ie(()=>(B(m()),B(_()),c(rt),B(be()),B(I())),()=>{j(ln,{mode:Gr.tree,readOnly:m(),parser:_(),normalization:c(rt),getJson:Bt,getDocumentState:We,getSelection:on,findElement:Nn,findNextInside:so,focus:xn,onPatch:qn,onInsert:zr,onExpand:Yt,onSelect:it,onFind:Y,onExpandSection:ve,onPasteJson:He,onRenderValue:be(),onContextMenu:Xt,onClassName:I()||(()=>{}),onDrag:Pt,onDragEnd:fn})}),ie(()=>c(ln),()=>{r("context changed",c(ln))}),En(),_t(!0);var P=OG();Oe("mousedown",Xs,function(R){!$u(R.target,le=>le===c(h))&&Bo(c(W))&&(r("click outside the editor, exit edit mode"),j(W,ys(c(W))),f&&c(d)&&(c(d).focus(),c(d).blur()),r("blur (outside editor)"),c(d)&&c(d).blur())});var de=tt(P),Ce=V(de),je=R=>{(function(le,Se){xt(Se,!1);var Re=U(void 0,!0),Ne=U(void 0,!0),Ie=U(void 0,!0),Ct=x(Se,"json",9),Ot=x(Se,"selection",9),At=x(Se,"readOnly",9),Kt=x(Se,"showSearch",13,!1),Jt=x(Se,"history",9),Vn=x(Se,"onExpandAll",9),$t=x(Se,"onCollapseAll",9),fr=x(Se,"onUndo",9),Xn=x(Se,"onRedo",9),Gt=x(Se,"onSort",9),ze=x(Se,"onTransform",9),Le=x(Se,"onContextMenu",9),Rt=x(Se,"onCopy",9),Rn=x(Se,"onRenderMenu",9);function cn(){Kt(!Kt())}var Hn=U(void 0,!0),Er=U(void 0,!0),nr=U(void 0,!0),Mr=U(void 0,!0);ie(()=>B(Ct()),()=>{j(Re,Ct()!==void 0)}),ie(()=>(c(Re),B(Ot()),Wn),()=>{j(Ne,c(Re)&&(ir(Ot())||to(Ot())||Wn(Ot())))}),ie(()=>(B(Vn()),B(Ct())),()=>{j(Hn,{type:"button",icon:DJ,title:"Expand all",className:"jse-expand-all",onClick:Vn(),disabled:!Rr(Ct())})}),ie(()=>(B($t()),B(Ct())),()=>{j(Er,{type:"button",icon:IJ,title:"Collapse all",className:"jse-collapse-all",onClick:$t(),disabled:!Rr(Ct())})}),ie(()=>B(Ct()),()=>{j(nr,{type:"button",icon:Lm,title:"Search (Ctrl+F)",className:"jse-search",onClick:cn,disabled:Ct()===void 0})}),ie(()=>(B(At()),c(Hn),c(Er),B(Gt()),B(Ct()),B(ze()),c(nr),B(Le()),B(fr()),B(Jt()),B(Xn()),B(Rt()),c(Ne)),()=>{j(Mr,At()?[c(Hn),c(Er),{type:"separator"},{type:"button",icon:Sa,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:Rt(),disabled:!c(Ne)},{type:"separator"},c(nr),{type:"space"}]:[c(Hn),c(Er),{type:"separator"},{type:"button",icon:Sp,title:"Sort",className:"jse-sort",onClick:Gt(),disabled:At()||Ct()===void 0},{type:"button",icon:jp,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:ze(),disabled:At()||Ct()===void 0},c(nr),{type:"button",icon:JC,title:sw,className:"jse-contextmenu",onClick:Le()},{type:"separator"},{type:"button",icon:g1,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:fr(),disabled:!Jt().canUndo},{type:"button",icon:m1,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:Xn(),disabled:!Jt().canRedo},{type:"space"}])}),ie(()=>(B(Rn()),c(Mr)),()=>{j(Ie,Rn()(c(Mr))||c(Mr))}),En(),_t(!0),xg(le,{get items(){return c(Ie)}}),jt()})(R,{get json(){return c(L)},get selection(){return c(W)},get readOnly(){return m()},get history(){return g()},get showSearch(){return c(Ue)},set showSearch(le){j(Ue,le)},onExpandAll:wn,onCollapseAll:dt,onUndo:ye,onRedo:Qe,onSort:Wt,onTransform:Ye,onContextMenu:Ft,onCopy:tn,get onRenderMenu(){return fe()},$$legacy:!0})};ge(Ce,R=>{y()&&R(je)});var Te=ee(Ce,2),Ke=R=>{ZJ(R,{get json(){return c(L)},get selection(){return c(W)},onSelect:Un,get onError(){return F()},get pathParser(){return z()}})};ge(Te,R=>{k()&&R(Ke)});var bt=ee(Te,2),ot=R=>{var le=SG(),Se=tt(le),Re=V(Se);Re.readOnly=!0,ar(Re,Ot=>j(d,Ot),()=>c(d));var Ne=ee(Se,2),Ie=Ot=>{var At=un(),Kt=tt(At),Jt=$t=>{(function(fr,Xn){xt(Xn,!1);var Gt=x(Xn,"readOnly",9),ze=x(Xn,"onCreateArray",9),Le=x(Xn,"onCreateObject",9),Rt=x(Xn,"onClick",9);_t(!0);var Rn=BJ(),cn=ee(V(Rn),2),Hn=ee(V(cn),2),Er=nr=>{var Mr=LJ(),Xr=ee(tt(Mr),2);Tn(Xr,"title","Create an empty JSON object (press '{')");var Ti=ee(Xr,2);Tn(Ti,"title","Create an empty JSON array (press '[')"),Oe("click",Xr,Bi(()=>Le()())),Oe("click",Ti,Bi(()=>ze()())),H(nr,Mr)};ge(Hn,nr=>{Gt()||nr(Er)}),Oe("click",Rn,()=>Rt()()),H(fr,Rn),jt()})($t,{get readOnly(){return m()},onCreateObject:()=>{xn(),io("{")},onCreateArray:()=>{xn(),io("[")},onClick:()=>{xn()}})},Vn=$t=>{var fr=xG(),Xn=tt(fr),Gt=Fe(()=>m()?[]:[{icon:kp,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:qt}]);ns(Xn,{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",get actions(){return c(Gt)}}),M$(ee(Xn,2),{get text(){return c(xe)},get json(){return c(L)},get indentation(){return G()},get parser(){return _()}}),H($t,fr)};ge(Kt,$t=>{c(xe)===""||c(xe)===void 0?$t(Jt):$t(Vn,!1)}),H(Ot,At)},Ct=Ot=>{var At=kG(),Kt=tt(At);k$(V(Kt),{get json(){return c(L)},get documentState(){return c(ae)},get parser(){return _()},get showSearch(){return c(Ue)},get showReplace(){return c(ft)},get readOnly(){return m()},columns:void 0,onSearch:Et,onFocus:et,onPatch:qn,onClose:O});var Jt=ee(Kt,2);Tn(Jt,"data-jsoneditor-scrollable-contents",!0);var Vn=V(Jt),$t=Le=>{H(Le,jG())};ge(Vn,Le=>{c(Ue)&&Le($t)}),zb(ee(Vn,2),{get value(){return c(L)},pointer:"",get state(){return c(ae)},get validationErrors(){return c(te)},get searchResults(){return c(Ge)},get selection(){return c(W)},get context(){return c(ln)},onDragSelectionStart:Ur}),ar(Jt,Le=>j(u,Le),()=>c(u));var fr=ee(Jt,2),Xn=Le=>{var Rt=Fe(()=>"You pasted a JSON ".concat(Array.isArray(c(Ee).contents)?"array":"object"," as text"));ns(Le,{type:"info",get message(){return c(Rt)},actions:[{icon:Xc,text:"Paste as JSON instead",title:"Replace the value with the pasted JSON",onMouseDown:Ln},{text:"Leave as is",title:"Keep the JSON embedded in the value",onClick:br}]})};ge(fr,Le=>{c(Ee)&&Le(Xn)});var Gt=ee(fr,2),ze=Le=>{var Rt=Fe(()=>m()?[]:[{icon:v1,text:"Ok",title:"Accept the repaired document",onClick:Ve},{icon:kp,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:qt}]);ns(Le,{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",get actions(){return c(Rt)},onClose:xn})};ge(Gt,Le=>{c(X)&&Le(ze)}),ww(ee(Gt,2),{get validationErrors(){return c(me)},selectError:T}),H(Ot,At)};ge(Ne,Ot=>{c(L)===void 0?Ot(Ie):Ot(Ct,!1)}),Oe("paste",Re,kn),H(R,le)},St=R=>{H(R,CG())};ge(bt,R=>{o?R(St,!1):R(ot)}),ar(de,R=>j(h,R),()=>c(h));var Zt=ee(de,2),Ht=R=>{y$(R,{onClose:()=>j(q,!1)})};ge(Zt,R=>{c(q)&&R(Ht)});var Qn=ee(Zt,2),_r=R=>{w$(R,Ia(()=>c(K),{onClose:()=>{var le;(le=c(K))===null||le===void 0||le.onClose(),j(K,void 0)}}))};return ge(Qn,R=>{c(K)&&R(_r)}),$e(()=>lt(de,"no-main-menu",!y())),Oe("keydown",de,function(R){var le=oa(R),Se=R.shiftKey;if(r("keydown",{combo:le,key:R.key}),le==="Ctrl+X"&&(R.preventDefault(),kt(!0)),le==="Ctrl+Shift+X"&&(R.preventDefault(),kt(!1)),le==="Ctrl+C"&&(R.preventDefault(),tn(!0)),le==="Ctrl+Shift+C"&&(R.preventDefault(),tn(!1)),le==="Ctrl+D"&&(R.preventDefault(),$r()),le!=="Delete"&&le!=="Backspace"||(R.preventDefault(),zn()),le==="Insert"&&(R.preventDefault(),zr("structure")),le==="Ctrl+A"&&(R.preventDefault(),j(W,mn([]))),le==="Ctrl+Q"&&Vt(R),le==="ArrowUp"||le==="Shift+ArrowUp"){R.preventDefault();var Re=c(W)?Ik(c(L),c(ae),c(W),Se)||c(W):dc(c(L),c(ae));j(W,Re),tr(ht(Re))}if(le==="ArrowDown"||le==="Shift+ArrowDown"){R.preventDefault();var Ne=c(W)?function(Jt,Vn,$t){var fr=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if($t){var Xn=fr?ht($t):Ba(Jt,$t),Gt=Rr(Ze(Jt,Xn))?Tk(Jt,Vn,Xn,!0):Vn,ze=Av(Jt,Vn,Xn),Le=Av(Jt,Gt,Xn);if(fr)return wo($t)?ze!==void 0?Eo(ze,ze):void 0:xi($t)?Le!==void 0?Eo(Le,Le):void 0:Le!==void 0?Eo(_l($t),Le):void 0;if(xi($t))return Le!==void 0?mn(Le):void 0;if(wo($t)||Wn($t))return ze!==void 0?mn(ze):void 0;if(to($t)){if(ze===void 0||ze.length===0)return;var Rt=jn(ze),Rn=Ze(Jt,Rt);return Array.isArray(Rn)?mn(ze):sa(ze)}return ir($t)?Le!==void 0?mn(Le):ze!==void 0?mn(ze):void 0:void 0}}(c(L),c(ae),c(W),Se)||c(W):dc(c(L),c(ae));j(W,Ne),tr(ht(Ne))}if(le==="ArrowLeft"||le==="Shift+ArrowLeft"){R.preventDefault();var Ie=c(W)?function(Jt,Vn,$t){var fr=arguments.length>3&&arguments[3]!==void 0&&arguments[3],Xn=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if($t){var{caret:Gt,previous:ze}=zk(Jt,Vn,$t,Xn);if(fr)return ir($t)?void 0:Eo($t.path,$t.path);if(Gt&&ze)return $b(ze);var Le=jn(ht($t)),Rt=Ze(Jt,Le);return Wn($t)&&Array.isArray(Rt)?Eo($t.path,$t.path):ir($t)&&!Array.isArray(Rt)?sa($t.focusPath):void 0}}(c(L),c(ae),c(W),Se,!m())||c(W):dc(c(L),c(ae));j(W,Ie),tr(ht(Ie))}if(le==="ArrowRight"||le==="Shift+ArrowRight"){R.preventDefault();var Ct=c(W)&&c(L)!==void 0?function(Jt,Vn,$t){var fr=arguments.length>3&&arguments[3]!==void 0&&arguments[3],Xn=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if($t){var{caret:Gt,next:ze}=zk(Jt,Vn,$t,Xn);return fr?ir($t)?void 0:Eo($t.path,$t.path):Gt&&ze?$b(ze):ir($t)?mn($t.focusPath):void 0}}(c(L),c(ae),c(W),Se,!m())||c(W):dc(c(L),c(ae));j(W,Ct),tr(ht(Ct))}if(le==="Enter"&&c(W)){if(vg(c(W))){var Ot=c(W).focusPath,At=Ze(c(L),jn(Ot));Array.isArray(At)&&(R.preventDefault(),j(W,mn(Ot)))}to(c(W))&&(R.preventDefault(),j(W,De(De({},c(W)),{},{edit:!0}))),Wn(c(W))&&(R.preventDefault(),Rr(Ze(c(L),c(W).path))?Yt(c(W).path,!0):j(W,De(De({},c(W)),{},{edit:!0})))}if(le.replace(/^Shift\+/,"").length===1&&c(W))return R.preventDefault(),void io(R.key);if(le==="Enter"&&(xi(c(W))||wo(c(W))))return R.preventDefault(),void io("");if(le==="Ctrl+Enter"&&Wn(c(W))){var Kt=Ze(c(L),c(W).path);fg(Kt)&&window.open(String(Kt),"_blank")}le==="Escape"&&c(W)&&(R.preventDefault(),j(W,void 0)),le==="Ctrl+F"&&(R.preventDefault(),Y(!1)),le==="Ctrl+H"&&(R.preventDefault(),Y(!0)),le==="Ctrl+Z"&&(R.preventDefault(),ye()),le==="Ctrl+Shift+Z"&&(R.preventDefault(),Qe())}),Oe("mousedown",de,function(R){r("handleMouseDown",R);var le=R.target;BA(le,"BUTTON")||le.isContentEditable||(xn(),c(W)||c(L)!==void 0||c(xe)!==""&&c(xe)!==void 0||(r("createDefaultSelection"),j(W,mn([]))))}),Oe("contextmenu",de,Vt),H(t,P),zt(e,"expand",N),zt(e,"collapse",ne),zt(e,"validate",mt),zt(e,"getJson",Bt),zt(e,"patch",Tt),zt(e,"acceptAutoRepair",Ve),zt(e,"openTransformModal",yn),zt(e,"scrollTo",pt),zt(e,"findElement",Nn),zt(e,"focus",xn),jt({expand:N,collapse:ne,validate:mt,getJson:Bt,patch:Tt,acceptAutoRepair:Ve,openTransformModal:yn,scrollTo:pt,findElement:Nn,focus:xn})}function P$(t){return typeof(e=t)!="object"||e===null?t:new Proxy(t,{get:(n,r,o)=>P$(Reflect.get(n,r,o)),set:()=>!1,deleteProperty:()=>!1});var e}var zf=ro("jsoneditor:History");function R$(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.maxItems||1e3,n=[],r=0;function o(){return r0}function s(){return{canUndo:o(),canRedo:i(),items:()=>n.slice().reverse(),add:l,undo:d,redo:h,clear:u}}function a(){t.onChange&&t.onChange(s())}function l(f){zf("add",f),n=[f].concat(n.slice(r)).slice(0,e),r=0,a()}function u(){zf("clear"),n=[],r=0,a()}function d(){if(o()){var f=n[r];return r+=1,zf("undo",f),a(),f}}function h(){if(i())return zf("redo",n[r-=1]),a(),n[r]}return{get:s}}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-transform-modal-inner.svelte-rrrjnb { + flex: 1; + display: flex; + flex-direction: column; + min-width: 0; + min-height: 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) { + color: inherit; + flex: 1; + display: flex; + flex-direction: column; + padding: 0; + overflow: auto; + min-width: 0; + min-height: 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-actions:where(.svelte-rrrjnb) { + display: flex; + flex-direction: row; + justify-content: flex-end; + padding-top: var(--jse-padding, 10px); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-actions:where(.svelte-rrrjnb) button.jse-primary:where(.svelte-rrrjnb) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-primary-background, var(--jse-theme-color, #3883fa)); + color: var(--jse-button-primary-color, #fff); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-actions:where(.svelte-rrrjnb) button.jse-primary:where(.svelte-rrrjnb):hover { + background: var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff)); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-actions:where(.svelte-rrrjnb) button.jse-primary:where(.svelte-rrrjnb):disabled { + background: var(--jse-button-primary-background-disabled, #9d9d9d); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) { + flex: 1; + display: flex; + gap: calc(2 * var(--jse-padding, 10px)); + min-height: 0; + box-sizing: border-box; + padding: 0 calc(2 * var(--jse-padding, 10px)) var(--jse-padding, 10px); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) { + flex: 1; + display: flex; + flex-direction: column; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) .jse-description:where(.svelte-rrrjnb) p { + margin: var(--jse-padding, 10px) 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) .jse-description:where(.svelte-rrrjnb) p:first-child { + margin-top: 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) .jse-description:where(.svelte-rrrjnb) p:last-child { + margin-bottom: 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) .jse-description:where(.svelte-rrrjnb) code { + background: var(--jse-modal-code-background, rgba(0, 0, 0, 0.05)); + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) .query-error:where(.svelte-rrrjnb) { + color: var(--jse-error-color, #ee5341); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) textarea.jse-query:where(.svelte-rrrjnb) { + flex: 1; + outline: none; + resize: vertical; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-data-contents:where(.svelte-rrrjnb) { + flex: 1; + display: flex; + flex-direction: column; + gap: calc(2 * var(--jse-padding, 10px)); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-data-contents:where(.svelte-rrrjnb) .jse-original-data:where(.svelte-rrrjnb) { + flex: 1; + display: flex; + flex-direction: column; + min-height: 0; + box-sizing: border-box; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-data-contents:where(.svelte-rrrjnb) .jse-original-data.jse-hide:where(.svelte-rrrjnb) { + flex: none; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-data-contents:where(.svelte-rrrjnb) .jse-preview-data:where(.svelte-rrrjnb) { + flex: 1; + display: flex; + flex-direction: column; + min-height: 0; + box-sizing: border-box; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-data-contents.jse-hide-original-data:where(.svelte-rrrjnb) { + flex-direction: column; + gap: 0; + margin-bottom: 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-actions:where(.svelte-rrrjnb) { + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)) calc(2 * var(--jse-padding, 10px)); +} +@media screen and (max-width: 1200px) { + .jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) { + flex-direction: column; + overflow: auto; + } + .jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-query-contents:where(.svelte-rrrjnb) textarea.jse-query:where(.svelte-rrrjnb) { + min-height: 150px; + flex: none; + } + .jse-transform-modal-inner.svelte-rrrjnb .jse-modal-contents:where(.svelte-rrrjnb) .jse-main-contents:where(.svelte-rrrjnb) .jse-data-contents:where(.svelte-rrrjnb) .jse-tree-mode { + height: 300px; + flex: none; + } +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-label:where(.svelte-rrrjnb) { + font-weight: bold; + display: block; + box-sizing: border-box; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-label:where(.svelte-rrrjnb) .jse-label-inner:where(.svelte-rrrjnb) { + margin-top: calc(2 * var(--jse-padding, 10px)); + margin-bottom: calc(0.5 * var(--jse-padding, 10px)); + box-sizing: border-box; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-label:where(.svelte-rrrjnb) .jse-label-inner:where(.svelte-rrrjnb) button:where(.svelte-rrrjnb) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + font-weight: bold; + padding: 0; +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-tree-mode { + flex: 1; + background: var(--jse-input-background-readonly, transparent); + box-shadow: none; + box-sizing: border-box; + --jse-main-border: var(--jse-input-border, 1px solid #d8dbdf); +} +.jse-transform-modal-inner.svelte-rrrjnb input:where(.svelte-rrrjnb), +.jse-transform-modal-inner.svelte-rrrjnb textarea:where(.svelte-rrrjnb) { + border: var(--jse-input-border, 1px solid #d8dbdf); + outline: none; + box-sizing: border-box; + padding: calc(0.5 * var(--jse-padding, 10px)); + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + color: inherit; + background: var(--jse-input-background, var(--jse-background-color, #fff)); +} +.jse-transform-modal-inner.svelte-rrrjnb input:where(.svelte-rrrjnb):focus, +.jse-transform-modal-inner.svelte-rrrjnb textarea:where(.svelte-rrrjnb):focus { + border: var(--jse-input-border-focus, 1px solid var(--jse-input-border-focus, var(--jse-theme-color, #3883fa))); +} +.jse-transform-modal-inner.svelte-rrrjnb input:where(.svelte-rrrjnb):read-only, +.jse-transform-modal-inner.svelte-rrrjnb textarea:where(.svelte-rrrjnb):read-only { + background: var(--jse-input-background-readonly, transparent); +} +.jse-transform-modal-inner.svelte-rrrjnb .jse-preview.jse-error:where(.svelte-rrrjnb) { + flex: 1; + background: var(--jse-input-background-readonly, transparent); + border: var(--jse-input-border, 1px solid #d8dbdf); + color: var(--jse-error-color, #ee5341); + padding: calc(0.5 * var(--jse-padding, 10px)); +} +.jse-transform-modal-inner.svelte-rrrjnb a { + color: var(--jse-a-color, #156fc5); +} +.jse-transform-modal-inner.svelte-rrrjnb a:hover { + color: var(--jse-a-color-highlight, #0f508d); +}`);var Ku=hg(()=>HW),hc=hg(()=>WW),_G=ue('
      '),EG=ue(" ",1),AG=ue('
      '),$G=ue('
      Language
      Path
      Query
      Preview
      ',1),MG=ue('
      ');function TG(t,e){var n,r,o;xt(e,!1);var i=ro("jsoneditor:TransformModal"),s=x(e,"id",25,()=>"transform-modal-"+Oc()),a=x(e,"json",9),l=x(e,"rootPath",25,()=>[]),u=x(e,"indentation",9),d=x(e,"escapeControlCharacters",9),h=x(e,"escapeUnicodeCharacters",9),f=x(e,"parser",9),p=x(e,"parseMemoizeOne",9),m=x(e,"validationParser",9),b=x(e,"pathParser",9),v=x(e,"queryLanguages",9),g=x(e,"queryLanguageId",13),y=x(e,"onChangeQueryLanguage",9),k=x(e,"onRenderValue",9),S=x(e,"onRenderMenu",9),w=x(e,"onRenderContextMenu",9),_=x(e,"onClassName",9),A=x(e,"onTransform",9),D=x(e,"onClose",9),E=U(void 0,!0),z=U(R$({onChange:ae=>j(z,ae)}).get(),!0),G=U(void 0,!0),F=U(void 0,!0),se=U(!1,!0),pe="".concat(s(),":").concat(yt(l())),re=(n=Ku()[pe])!==null&&n!==void 0?n:{},Z=U(hc().showWizard!==!1,!0),he=U(hc().showOriginal!==!1,!0),be=U((r=re.queryOptions)!==null&&r!==void 0?r:{},!0),fe=U(g()===re.queryLanguageId&&re.query?re.query:"",!0),J=U((o=re.isManual)!==null&&o!==void 0&&o,!0),I=U(void 0,!0),Q=U(void 0,!0),M=U({text:""},!0);function C(ae){var W;return(W=v().find(it=>it.id===ae))!==null&&W!==void 0?W:v()[0]}function $(ae){try{j(be,ae),j(fe,C(g()).createQuery(c(G),ae)),j(I,void 0),j(J,!1),i("updateQueryByWizard",{queryOptions:c(be),query:c(fe),isManual:c(J)})}catch(W){j(I,String(W))}}function oe(ae){j(fe,ae.target.value),j(J,!0),i("handleChangeQuery",{query:c(fe),isManual:c(J)})}c(J)||$(c(be)),ko(()=>{var ae;(ae=c(E))===null||ae===void 0||ae.focus()});var _e=xp(function(ae,W){if(ae===void 0)return j(M,{text:""}),void j(Q,"Error: No JSON");if(W.trim()!=="")try{i("previewTransform",{query:W});var it=C(g()).executeQuery(ae,W,f());j(M,{json:it}),j(Q,void 0)}catch(vt){j(M,{text:""}),j(Q,String(vt))}else j(M,{json:ae})},300);function q(){if(c(G)===void 0)return j(M,{text:""}),void j(Q,"Error: No JSON");try{i("handleTransform",{query:c(fe)});var ae=C(g()).executeQuery(c(G),c(fe),f());A()([{op:"replace",path:yt(l()),value:ae}]),D()()}catch(W){console.error(W),j(M,{text:""}),j(Q,String(W))}}function K(){j(Z,!c(Z)),hc(hc().showWizard=c(Z))}function L(){j(he,!c(he)),hc(hc().showOriginal=c(he))}function xe(ae){ae.focus()}function Je(ae){i("handleChangeQueryLanguage",ae),g(ae),y()(ae),$(c(be))}function ce(){c(se)?j(se,!c(se)):D()()}ie(()=>(B(a()),B(l())),()=>{j(G,P$(Ze(a(),l())))}),ie(()=>c(G),()=>{j(F,c(G)?{json:c(G)}:{text:""})}),ie(()=>(c(G),c(fe)),()=>{_e(c(G),c(fe))}),ie(()=>(Ku(),c(be),c(fe),B(g()),c(J)),()=>{Ku(Ku()[pe]={queryOptions:c(be),query:c(fe),queryLanguageId:g(),isManual:c(J)}),i("store state in memory",pe,Ku()[pe])}),En(),_t(!0),ih(t,{get onClose(){return D()},className:"jse-transform-modal",get fullscreen(){return c(se)},children:(ae,W)=>{var it=MG();Ob(V(it),{children:(vt,rt)=>{var Ee=$G(),Ge=tt(Ee);(function(Ve,kt){xt(kt,!1);var Qt,tn=x(kt,"queryLanguages",9),an=x(kt,"queryLanguageId",9),kn=x(kt,"fullscreen",13),Sn=x(kt,"onChangeQueryLanguage",9),Yn=x(kt,"onClose",9),zn=U(void 0,!0),{openAbsolutePopup:$r,closeAbsolutePopup:vr}=nl("absolute-popup");function zr(){var cr={queryLanguages:tn(),queryLanguageId:an(),onChangeQueryLanguage:oo=>{vr(Qt),Sn()(oo)}};Qt=$r(EK,cr,{offsetTop:-2,offsetLeft:0,anchor:c(zn),closeOnOuterClick:!0})}_t(!0),ym(Ve,{title:"Transform",fullScreenButton:!0,get fullscreen(){return kn()},set fullscreen(cr){kn(cr)},get onClose(){return Yn()},$$slots:{actions:(cr,oo)=>{var Vr=MK();vn(V(Vr),{data:WR}),ar(Vr,er=>j(zn,er),()=>c(zn)),$e(()=>lt(Vr,"hide",tn().length<=1)),Oe("click",Vr,zr),H(cr,Vr)}},$$legacy:!0}),jt()})(Ge,{get queryLanguages(){return v()},get queryLanguageId(){return g()},onChangeQueryLanguage:Je,get onClose(){return D()},get fullscreen(){return c(se)},set fullscreen(Ve){j(se,Ve)},$$legacy:!0});var Ue=V(ee(Ge,2)),ft=V(Ue),Et=ee(V(ft),2);CA(V(Et),()=>C(g()).description,!1,!1);var et=ee(Et,4);$e(()=>Fl(et,Jn(l())?"(document root)":Wi(l())));var Pe=ee(et,2),O=V(Pe),T=V(O),N=V(T),ne=Fe(()=>c(Z)?qa:Cd);vn(N,{get data(){return c(ne)}});var X=ee(Pe,2),me=Ve=>{var kt=un(),Qt=tt(kt),tn=kn=>{var Sn=EG(),Yn=tt(Sn);CK(Yn,{get queryOptions(){return c(be)},get json(){return c(G)},onChange:$});var zn=ee(Yn,2),$r=vr=>{var zr=_G(),cr=V(zr);$e(()=>Mt(cr,c(I))),H(vr,zr)};ge(zn,vr=>{c(I)&&vr($r)}),H(kn,Sn)},an=kn=>{H(kn,Po("(Only available for arrays, not for objects)"))};ge(Qt,kn=>{Array.isArray(c(G))?kn(tn):kn(an,!1)}),H(Ve,kt)};ge(X,Ve=>{c(Z)&&Ve(me)});var te=ee(X,4);ar(te,Ve=>j(E,Ve),()=>c(E));var qe=ee(ft,2),Me=V(qe),mt=V(Me),Bt=V(mt),We=V(Bt),on=V(We),ut=Fe(()=>c(he)?qa:Cd);vn(on,{get data(){return c(ut)}});var $n=ee(mt,2),Pn=Ve=>{Vb(Ve,{get externalContent(){return c(F)},externalSelection:void 0,get history(){return c(z)},readOnly:!0,mainMenuBar:!1,navigationBar:!1,get indentation(){return u()},get escapeControlCharacters(){return d()},get escapeUnicodeCharacters(){return h()},get parser(){return f()},get parseMemoizeOne(){return p()},get onRenderValue(){return k()},get onRenderMenu(){return S()},get onRenderContextMenu(){return w()},onError:console.error,onChange:Ur,onChangeMode:Ur,onSelect:Ur,onUndo:Ur,onRedo:Ur,onFocus:Ur,onBlur:Ur,onSortModal:Ur,onTransformModal:Ur,onJSONEditorModal:Ur,get onClassName(){return _()},validator:void 0,get validationParser(){return m()},get pathParser(){return b()}})};ge($n,Ve=>{c(he)&&Ve(Pn)});var en=ee(Me,2),Tt=ee(V(en),2),hn=Ve=>{Vb(Ve,{get externalContent(){return c(M)},externalSelection:void 0,get history(){return c(z)},readOnly:!0,mainMenuBar:!1,navigationBar:!1,get indentation(){return u()},get escapeControlCharacters(){return d()},get escapeUnicodeCharacters(){return h()},get parser(){return f()},get parseMemoizeOne(){return p()},get onRenderValue(){return k()},get onRenderMenu(){return S()},get onRenderContextMenu(){return w()},onError:console.error,onChange:Ur,onChangeMode:Ur,onSelect:Ur,onUndo:Ur,onRedo:Ur,onFocus:Ur,onBlur:Ur,onSortModal:Ur,onTransformModal:Ur,onJSONEditorModal:Ur,get onClassName(){return _()},validator:void 0,get validationParser(){return m()},get pathParser(){return b()}})},Kn=Ve=>{var kt=AG(),Qt=V(kt);$e(()=>Mt(Qt,c(Q))),H(Ve,kt)};ge(Tt,Ve=>{c(Q)?Ve(Kn,!1):Ve(hn)});var lr=V(ee(Ue,2));ho(()=>Oe("click",lr,q)),To(lr,Ve=>xe==null?void 0:xe(Ve)),$e(()=>{Fl(te,c(fe)),lt(qe,"jse-hide-original-data",!c(he)),lt(Me,"jse-hide",!c(he)),lr.disabled=!!c(Q)}),Oe("click",T,K),Oe("input",te,oe),Oe("click",We,L),H(vt,Ee)},$$slots:{default:!0}}),To(it,(vt,rt)=>wm==null?void 0:wm(vt,rt),()=>ce),H(ae,it)},$$slots:{default:!0}}),jt()}function pi(){}function iS(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(t<.9*e)return t.toFixed()+" B";var n=t/e;if(n<.9*e)return n.toFixed(1)+" KB";var r=n/e;if(r<.9*e)return r.toFixed(1)+" MB";var o=r/e;return o<.9*e?o.toFixed(1)+" GB":(o/e).toFixed(1)+" TB"}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-status-bar.svelte-1ulj7zd { + background: var(--jse-panel-background, #ebebeb); + color: var(--jse-panel-color-readonly, #b2b2b2); + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + margin: 0; + border-top: var(--jse-panel-border, var(--jse-main-border, 1px solid #d7d7d7)); + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); + display: flex; + gap: var(--jse-padding, 10px); +} +.jse-status-bar.svelte-1ulj7zd:last-child { + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-status-bar.svelte-1ulj7zd .jse-status-bar-info:where(.svelte-1ulj7zd) { + padding: 2px; +}`);var PG=ue('
      '),RG=ue('
      '),NG=ue('
      '),DG=ue('
      '),jw=wh.define([{tag:Be.propertyName,color:"var(--internal-key-color)"},{tag:Be.number,color:"var(--internal-value-color-number)"},{tag:Be.bool,color:"var(--internal-value-color-boolean)"},{tag:Be.string,color:"var(--internal-value-color-string)"},{tag:Be.keyword,color:"var(--internal-value-color-null)"}]),IG=F_(jw),zG=jw.style;jw.style=t=>zG(t||[]);It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-text-mode.svelte-xt61xw { + --internal-key-color: var(--jse-key-color, #1a1a1a); + --internal-value-color-number: var(--jse-value-color-number, #ee422e); + --internal-value-color-boolean: var(--jse-value-color-boolean, #ff8c00); + --internal-value-color-string: var(--jse-value-color-string, #008000); + --internal-value-color-null: var(--jse-value-color-null, #004ed0); + flex: 1; + box-sizing: border-box; + display: flex; + flex-direction: column; + background: var(--jse-background-color, #fff); +} +.jse-text-mode.no-main-menu.svelte-xt61xw { + border-top: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) { + flex: 1; + display: flex; + position: relative; + flex-direction: column; + overflow: hidden; + min-width: 0; + min-height: 0; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw):last-child { + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-text-mode.svelte-xt61xw .jse-contents.jse-hidden:where(.svelte-xt61xw) { + visibility: hidden; + position: absolute; + top: 0; + left: 0; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor { + flex: 1; + overflow: hidden; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-scroller { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + line-height: var(--jse-line-height, calc(1em + 4px)); + color: var(--jse-delimiter-color, rgba(0, 0, 0, 0.38)); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-gutters { + background: var(--jse-panel-background, #ebebeb); + color: var(--jse-panel-color-readonly, #b2b2b2); + border-right: var(--jse-panel-border, var(--jse-main-border, 1px solid #d7d7d7)); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-activeLine, +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-activeLineGutter { + background: var(--jse-active-line-background-color, rgba(0, 0, 0, 0.06)); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-selectionBackground { + background: var(--jse-selection-background-color, #d3d3d3); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-searchMatch { + background-color: var(--jse-search-match-color, #ffe665); + outline: var(--jse-search-match-outline, none); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-searchMatch.cm-searchMatch-selected { + background-color: var(--jse-search-match-active-color, var(--jse-search-match-color, #ffe665)); + outline: var(--jse-search-match-outline, 2px solid #e0be00); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-selectionMatch { + background-color: var(--jse-search-match-background-color, rgba(153, 255, 119, 0.5019607843)); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-foldPlaceholder { + background: var(--jse-tag-background, rgba(0, 0, 0, 0.2)); + color: var(--jse-tag-color, var(--jse-text-color-inverse, #fff)); + border: none; + padding: 0 var(--jse-padding, 10px); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-tooltip { + font-size: var(--jse-font-size, 16px); + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + color: var(--jse-tooltip-color, var(--jse-text-color, #4d4d4d)); + background: var(--jse-tooltip-background, var(--jse-modal-background, #f5f5f5)); + border: var(--jse-tooltip-border, var(--jse-main-border, 1px solid #d7d7d7)); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-diagnosticAction { + background: var(--jse-tooltip-action-button-color, var(--jse-text-color-inverse, #fff)); + background: var(--jse-tooltip-action-button-background, #4d4d4d); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-panels { + border-bottom: var(--jse-panel-border, var(--jse-main-border, 1px solid #d7d7d7)); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search { + background: var(--jse-panel-background, #ebebeb); + color: var(--jse-panel-color, var(--jse-text-color, #4d4d4d)); + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search input { + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size-text-mode-search, 80%); + color: var(--jse-input-color, var(--jse-text-color, #4d4d4d)); + border: var(--jse-input-border, 1px solid #d8dbdf); + background: var(--jse-input-background, var(--jse-background-color, #fff)); + margin-right: 2px; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search button { + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size-text-mode-search, 80%); + color: var(--jse-panel-button-color, inherit); + background: var(--jse-panel-button-background, transparent); + border: none; + cursor: pointer; + text-transform: capitalize; + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px); + margin: 0; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search button:hover { + color: var(--panel-button-color-highlight, var(--jse-text-color, #4d4d4d)); + background: var(--jse-panel-button-background-highlight, #e0e0e0); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search label { + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size-text-mode-search, 80%); + padding-left: var(--jse-padding, 10px); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search label input { + margin-right: 2px; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-search button[name="close"] { + width: 32px; + height: 32px; + font-size: 24px; + line-height: 24px; + padding: 0; + right: 0; + top: -4px; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .cm-editor .cm-cursor-primary { + border-color: var(--jse-text-color, #4d4d4d); +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .jse-loading-space:where(.svelte-xt61xw) { + flex: 1; +} +.jse-text-mode.svelte-xt61xw .jse-contents:where(.svelte-xt61xw) .jse-loading:where(.svelte-xt61xw) { + flex: 2; + text-align: center; + color: var(--jse-panel-color-readonly, #b2b2b2); + box-sizing: border-box; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); +} +.jse-text-mode.svelte-xt61xw .jse-contents.jse-preview:where(.svelte-xt61xw) { + flex: 1; + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + color: var(--jse-panel-color-readonly, #b2b2b2); + overflow: auto; + white-space: pre-wrap; + word-break: break-word; + padding: 2px; +}`);var LG=ue('
      ',1),BG=ue(" ",1),FG=ue('
      ',1),qG=ue('
      loading...
      '),UG=ue('
      ');function VG(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=x(e,"readOnly",9),i=x(e,"mainMenuBar",9),s=x(e,"statusBar",9),a=x(e,"askToFormat",9),l=x(e,"externalContent",9),u=x(e,"externalSelection",9),d=x(e,"history",9),h=x(e,"indentation",9),f=x(e,"tabSize",9),p=x(e,"escapeUnicodeCharacters",9),m=x(e,"parser",9),b=x(e,"validator",9),v=x(e,"validationParser",9),g=x(e,"onChange",9),y=x(e,"onChangeMode",9),k=x(e,"onSelect",9),S=x(e,"onUndo",9),w=x(e,"onRedo",9),_=x(e,"onError",9),A=x(e,"onFocus",9),D=x(e,"onBlur",9),E=x(e,"onRenderMenu",9),z=x(e,"onSortModal",9),G=x(e,"onTransformModal",9),F=ro("jsoneditor:TextMode"),se={key:"Mod-i",run:Ee,shift:Ge,preventDefault:!0},pe=typeof window>"u";F("isSSR:",pe);var re,Z=U(void 0,!0),he=U(void 0,!0),be=U(void 0,!0),fe=U(!1,!0),J=U(a(),!0),I=U([],!0),Q=new Fs,M=new Fs,C=new Fs,$=new Fs,oe=new Fs,_e=l(),q=U(Sb(_e,h(),m()),!0),K=Xa.define(),L=null;function xe(){if(!L||L.length===0)return!1;var ye=L[0].startState,Qe=L[L.length-1].state,Dt=L.map(Wt=>Wt.changes).reduce((Wt,yn)=>Wt.compose(yn)),nn={type:"text",undo:{changes:Dt.invert(ye.doc).toJSON(),selection:tn(ye.selection)},redo:{changes:Dt.toJSON(),selection:tn(Qe.selection)}};return F("add history item",nn),d().add(nn),L=null,!0}var Je=U(p(),!0);ko(gt(function*(){if(!pe)try{re=function(ye){var{target:Qe,initialText:Dt,readOnly:nn,indentation:Wt}=ye;F("Create CodeMirror editor",{readOnly:nn,indentation:Wt});var yn=function(Ye,pt){return Mv(Ye)?Ye.ranges.every(sn=>sn.anchor{if(j(be,Ye.state),Ye.docChanged){var pt;Ye.transactions.some(sn=>!!sn.annotation(K))||(L=[...(pt=L)!==null&&pt!==void 0?pt:[],Ye]),lr()}Ye.selectionSet&&Qt()}),PU(),JU({top:!0}),nt.lineWrapping,M.of(Mn.readOnly.of(nn)),$.of(Mn.tabSize.of(f())),C.of(Kn(Wt)),oe.of(nt.theme({},{dark:mt()}))]});return re=new nt({state:ke,parent:Qe}),yn&&re.dispatch(re.state.update({selection:yn.main,scrollIntoView:!0})),re}({target:c(Z),initialText:an(c(q),c(fe))?"":c(n).escapeValue(c(q)),readOnly:o(),indentation:h()})}catch(ye){console.error(ye)}})),Ai(()=>{Ve(),re&&(F("Destroy CodeMirror editor"),re.destroy())});var ce=Yc(),ae=Yc();function W(){re&&(F("focus"),re.focus())}var it=!1;function vt(ye){return rt(ye,!1)}function rt(ye,Qe){F("handlePatch",ye,Qe);var Dt=m().parse(c(q)),nn=Ki(Dt,ye),Wt=QS(Dt,ye);return ut({text:m().stringify(nn,null,h())},Qe,!1),{json:nn,previousJson:Dt,undo:Wt,redo:ye}}function Ee(){if(F("format"),o())return!1;try{var ye=m().parse(c(q));return ut({text:m().stringify(ye,null,h())},!0,!1),j(J,a()),!0}catch(Qe){_()(Qe)}return!1}function Ge(){if(F("compact"),o())return!1;try{var ye=m().parse(c(q));return ut({text:m().stringify(ye)},!0,!1),j(J,!1),!0}catch(Qe){_()(Qe)}return!1}function Ue(){if(F("repair"),!o())try{ut({text:Ss(c(q))},!0,!1),j(kn,_v),j(Sn,void 0)}catch(ye){_()(ye)}}function ft(){var ye;if(!o())try{var Qe=m().parse(c(q));it=!0,z()({id:ce,json:Qe,rootPath:[],onSort:(ye=gt(function*(Dt){var{operations:nn}=Dt;F("onSort",nn),rt(nn,!0)}),function(Dt){return ye.apply(this,arguments)}),onClose:()=>{it=!1,W()}})}catch(Dt){_()(Dt)}}function Et(ye){var{id:Qe,rootPath:Dt,onTransform:nn,onClose:Wt}=ye;try{var yn=m().parse(c(q));it=!0,G()({id:Qe||ae,json:yn,rootPath:Dt||[],onTransform:ke=>{nn?nn({operations:ke,json:yn,transformedJson:Ki(yn,ke)}):(F("onTransform",ke),rt(ke,!0))},onClose:()=>{it=!1,W(),Wt&&Wt()}})}catch(ke){_()(ke)}}function et(){o()||Et({rootPath:[]})}function Pe(){re&&(c(Z)&&c(Z).querySelector(".cm-search")?Ly(re):zy(re))}function O(){if(o())return!1;Ve();var ye=d().undo();return F("undo",ye),$k(ye)?(re.dispatch({annotations:K.of("undo"),changes:eo.fromJSON(ye.undo.changes),selection:Ae.fromJSON(ye.undo.selection),scrollIntoView:!0}),!0):(S()(ye),!1)}function T(){if(o())return!1;Ve();var ye=d().redo();return F("redo",ye),$k(ye)?(re.dispatch({annotations:K.of("redo"),changes:eo.fromJSON(ye.redo.changes),selection:Ae.fromJSON(ye.redo.selection),scrollIntoView:!0}),!0):(w()(ye),!1)}function N(){j(fe,!0),ut(l(),!0,!0)}function ne(){y()(Gr.tree)}function X(){Tt()}function me(ye){F("select validation error",ye);var{from:Qe,to:Dt}=Bt(ye);Qe!==void 0&&Dt!==void 0&&(te(Qe,Dt),W())}function te(ye,Qe){F("setSelection",{anchor:ye,head:Qe}),re&&re.dispatch(re.state.update({selection:{anchor:ye,head:Qe},scrollIntoView:!0}))}function qe(ye,Qe){if(Qe.state.selection.ranges.length===1){var Dt=Qe.state.selection.ranges[0],nn=c(q).slice(Dt.from,Dt.to);if(nn==="{"||nn==="["){var Wt=gp.parse(c(q)),yn=Object.keys(Wt.pointers).find(Ye=>{var pt;return((pt=Wt.pointers[Ye].value)===null||pt===void 0?void 0:pt.pos)===Dt.from}),ke=Wt.pointers[yn];yn&&ke&&ke.value&&ke.valueEnd&&(F("pointer found, selecting inner contents of path:",yn,ke),te(ke.value.pos+1,ke.valueEnd.pos-1))}}}function Me(){return dU(Yn,{delay:300})}function mt(){return!!c(Z)&&getComputedStyle(c(Z)).getPropertyValue("--jse-theme").includes("dark")}function Bt(ye){var{path:Qe,message:Dt,severity:nn}=ye,{line:Wt,column:yn,from:ke,to:Ye}=function(pt,sn){try{var Nn=gp.parse(pt),tr=yt(sn),Ut=Nn.pointers[tr];if(Ut)return{path:sn,line:Ut.key?Ut.key.line:Ut.value?Ut.value.line:0,column:Ut.key?Ut.key.column:Ut.value?Ut.value.column:0,from:Ut.key?Ut.key.pos:Ut.value?Ut.value.pos:0,to:Ut.keyEnd?Ut.keyEnd.pos:Ut.valueEnd?Ut.valueEnd.pos:0}}catch(qn){console.error(qn)}return{path:sn,line:0,column:0,from:0,to:0}}(c(n).escapeValue(c(q)),Qe);return{path:Qe,line:Wt,column:yn,from:ke,to:Ye,message:Dt,severity:nn,actions:[]}}function We(ye,Qe){var{line:Dt,column:nn,position:Wt,message:yn}=ye;return{path:[],line:Dt,column:nn,from:Wt,to:Wt,severity:Yi.error,message:yn,actions:Qe&&!o()?[{name:"Auto repair",apply:()=>Ue()}]:void 0}}function on(ye){return{from:ye.from||0,to:ye.to||0,message:ye.message||"",actions:ye.actions,severity:ye.severity}}function ut(ye,Qe,Dt){var nn=Sb(ye,h(),m()),Wt=!gn(ye,_e),yn=_e;F("setCodeMirrorContent",{isChanged:Wt,emitChange:Qe,forceUpdate:Dt}),re&&(Wt||Dt)&&(_e=ye,j(q,nn),an(c(q),c(fe))||re.dispatch({changes:{from:0,to:re.state.doc.length,insert:c(n).escapeValue(c(q))}}),xe(),Wt&&Qe&&kt(_e,yn))}function $n(ye){return Mv(ye)?Ae.fromJSON(ye):void 0}function Pn(){return en.apply(this,arguments)}function en(){return en=gt(function*(){F("refresh"),yield function(){return hn.apply(this,arguments)}()}),en.apply(this,arguments)}function Tt(){if(re){var ye=re?c(n).unescapeValue(re.state.doc.toString()):"",Qe=ye!==c(q);if(F("onChangeCodeMirrorValue",{isChanged:Qe}),Qe){var Dt=_e;j(q,ye),_e={text:c(q)},xe(),kt(_e,Dt),Pr().then(Qt)}}}function hn(){return(hn=gt(function*(){if(yield Pr(),re){var ye=mt();F("updateTheme",{dark:ye}),re.dispatch({effects:[oe.reconfigure(nt.theme({},{dark:ye}))]})}})).apply(this,arguments)}function Kn(ye){var Qe=Xm.of(typeof ye=="number"?" ".repeat(ye):ye);return ye===" "?[Qe]:[Qe,tH]}yw({onMount:ko,onDestroy:Ai,getWindow:()=>Mh(c(he)),hasFocus:()=>it&&document.hasFocus()||rw(c(he)),onFocus:A(),onBlur:()=>{Ve(),D()()}});var lr=xp(Tt,300);function Ve(){lr.flush()}function kt(ye,Qe){g()&&g()(ye,Qe,{contentErrors:zn(),patchResult:void 0})}function Qt(){k()(tn(c(be).selection))}function tn(ye){return De({type:Gn.text},ye.toJSON())}function an(ye,Qe){return!!ye&&ye.length>Sk&&!Qe}var kn=U(_v,!0),Sn=U(void 0,!0);function Yn(){if(an(c(q),c(fe)))return[];var ye=zn();if(Ek(ye)){var{parseError:Qe,isRepairable:Dt}=ye;return[on(We(Qe,Dt))]}return OW(ye)?ye.validationErrors.map(Bt).map(on):[]}function zn(){F("validate:start"),Ve();var ye=$r(c(n).escapeValue(c(q)),b(),m(),v());return Ek(ye)?(j(kn,ye.isRepairable?Ok:"invalid"),j(Sn,ye.parseError),j(I,[])):(j(kn,_v),j(Sn,void 0),j(I,(ye==null?void 0:ye.validationErrors)||[])),F("validate:end"),ye}var $r=Od(RK);function vr(){c(Sn)&&function(ye){F("select parse error",ye);var Qe=We(ye,!1);te(Qe.from!=null?Qe.from:0,Qe.to!=null?Qe.to:0),W()}(c(Sn))}var zr={icon:BR,text:"Show me",title:"Move to the parse error location",onClick:vr};ie(()=>B(p()),()=>{j(n,tw({escapeControlCharacters:!1,escapeUnicodeCharacters:p()}))}),ie(()=>B(l()),()=>{ut(l(),!1,!1)}),ie(()=>B(u()),()=>{(function(ye){if(Mv(ye)){var Qe=$n(ye);!re||!Qe||c(be)&&c(be).selection.eq(Qe)||(F("applyExternalSelection",Qe),re.dispatch({selection:Qe}))}})(u())}),ie(()=>B(b()),()=>{(function(ye){F("updateLinter",ye),re&&re.dispatch({effects:Q.reconfigure(Me())})})(b())}),ie(()=>B(h()),()=>{(function(ye){re&&(F("updateIndentation",ye),re.dispatch({effects:C.reconfigure(Kn(ye))}))})(h())}),ie(()=>B(f()),()=>{(function(ye){re&&(F("updateTabSize",ye),re.dispatch({effects:$.reconfigure(Mn.tabSize.of(ye))}))})(f())}),ie(()=>B(o()),()=>{(function(ye){re&&(F("updateReadOnly",ye),re.dispatch({effects:[M.reconfigure(Mn.readOnly.of(ye))]}))})(o())}),ie(()=>(c(Je),B(p())),()=>{c(Je)!==p()&&(j(Je,p()),F("forceUpdateText",{escapeUnicodeCharacters:p()}),re&&re.dispatch({changes:{from:0,to:re.state.doc.length,insert:c(n).escapeValue(c(q))}}))}),ie(()=>(c(kn),B(o()),Xc),()=>{j(r,c(kn)!==Ok||o()?[zr]:[{icon:Xc,text:"Auto repair",title:"Automatically repair JSON",onClick:Ue},zr])}),En(),_t(!0);var cr=UG(),oo=V(cr),Vr=ye=>{var Qe=Fe(()=>c(q).length===0),Dt=Fe(()=>!c(Qe)),nn=Fe(()=>!c(Qe)),Wt=Fe(()=>!c(Qe)),yn=Fe(()=>!c(Qe));(function(ke,Ye){xt(Ye,!1);var pt=U(void 0,!0),sn=x(Ye,"readOnly",9,!1),Nn=x(Ye,"onFormat",9),tr=x(Ye,"onCompact",9),Ut=x(Ye,"onSort",9),qn=x(Ye,"onTransform",9),Qr=x(Ye,"onToggleSearch",9),Yr=x(Ye,"onUndo",9),Yt=x(Ye,"onRedo",9),wn=x(Ye,"canUndo",9),dt=x(Ye,"canRedo",9),Y=x(Ye,"canFormat",9),ve=x(Ye,"canCompact",9),He=x(Ye,"canSort",9),Xt=x(Ye,"canTransform",9),Vt=x(Ye,"onRenderMenu",9),Ft={type:"button",icon:Lm,title:"Search (Ctrl+F)",className:"jse-search",onClick:Qr()},Ln=U(void 0,!0);ie(()=>(B(sn()),B(Nn()),B(Y()),B(tr()),B(ve()),B(Ut()),B(He()),B(qn()),B(Xt()),B(Yr()),B(wn()),B(Yt()),B(dt())),()=>{j(Ln,sn()?[Ft,{type:"space"}]:[{type:"button",icon:tS,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:Nn(),disabled:sn()||!Y()},{type:"button",icon:zJ,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:tr(),disabled:sn()||!ve()},{type:"separator"},{type:"button",icon:Sp,title:"Sort",className:"jse-sort",onClick:Ut(),disabled:sn()||!He()},{type:"button",icon:jp,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:qn(),disabled:sn()||!Xt()},Ft,{type:"separator"},{type:"button",icon:g1,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:Yr(),disabled:!wn()},{type:"button",icon:m1,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:Yt(),disabled:!dt()},{type:"space"}])}),ie(()=>(B(Vt()),c(Ln)),()=>{j(pt,Vt()(c(Ln))||c(Ln))}),En(),_t(!0),xg(ke,{get items(){return c(pt)}}),jt()})(ye,{get readOnly(){return o()},onFormat:Ee,onCompact:Ge,onSort:ft,onTransform:et,onToggleSearch:Pe,onUndo:O,onRedo:T,get canFormat(){return c(Dt)},get canCompact(){return c(nn)},get canSort(){return c(Wt)},get canTransform(){return c(yn)},get canUndo(){return d().canUndo},get canRedo(){return d().canRedo},get onRenderMenu(){return E()}})};ge(oo,ye=>{i()&&ye(Vr)});var er=ee(oo,2),io=ye=>{var Qe=FG(),Dt=Fe(()=>an(c(q),c(fe))),nn=tt(Qe);ar(nn,pt=>j(Z,pt),()=>c(Z));var Wt=ee(nn,2),yn=pt=>{var sn=LG(),Nn=tt(sn),tr=Fe(()=>"The JSON document is larger than ".concat(iS(Sk,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(iS(c(q).length,1024),"."));ns(Nn,{icon:Tl,type:"error",get message(){return c(tr)},actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:N},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:ne},{text:"Cancel",title:"Cancel opening this large document.",onClick:X}],onClose:W});var Ut=V(ee(Nn,2));$e(()=>Mt(Ut,Yd(c(q)||"",_b))),H(pt,sn)};ge(Wt,pt=>{c(Dt)&&pt(yn)});var ke=ee(Wt,2),Ye=pt=>{var sn=BG(),Nn=tt(sn),tr=Yt=>{(function(wn,dt){xt(dt,!1);var Y=x(dt,"editorState",8),ve=U(),He=U(),Xt=U(),Vt=U(),Ft=U();ie(()=>B(Y()),()=>{var Pt;j(ve,(Pt=Y())===null||Pt===void 0||(Pt=Pt.selection)===null||Pt===void 0||(Pt=Pt.main)===null||Pt===void 0?void 0:Pt.head)}),ie(()=>(c(ve),B(Y())),()=>{var Pt;j(He,c(ve)!==void 0?(Pt=Y())===null||Pt===void 0||(Pt=Pt.doc)===null||Pt===void 0?void 0:Pt.lineAt(c(ve)):void 0)}),ie(()=>c(He),()=>{j(Xt,c(He)!==void 0?c(He).number:void 0)}),ie(()=>(c(He),c(ve)),()=>{j(Vt,c(He)!==void 0&&c(ve)!==void 0?c(ve)-c(He).from+1:void 0)}),ie(()=>B(Y()),()=>{var Pt;j(Ft,(Pt=Y())===null||Pt===void 0||(Pt=Pt.selection)===null||Pt===void 0||(Pt=Pt.ranges)===null||Pt===void 0?void 0:Pt.reduce((fn,ln)=>fn+ln.to-ln.from,0))}),En(),_t();var Ln=DG(),Br=V(Ln),br=Pt=>{var fn=PG(),ln=V(fn);$e(()=>{var P;return Mt(ln,"Line: ".concat((P=c(Xt))!==null&&P!==void 0?P:""))}),H(Pt,fn)};ge(Br,Pt=>{c(Xt)!==void 0&&Pt(br)});var qt=ee(Br,2),Un=Pt=>{var fn=RG(),ln=V(fn);$e(()=>{var P;return Mt(ln,"Column: ".concat((P=c(Vt))!==null&&P!==void 0?P:""))}),H(Pt,fn)};ge(qt,Pt=>{c(Vt)!==void 0&&Pt(Un)});var xn=ee(qt,2),so=Pt=>{var fn=NG(),ln=V(fn);$e(()=>{var P;return Mt(ln,"Selection: ".concat((P=c(Ft))!==null&&P!==void 0?P:""," characters"))}),H(Pt,fn)};ge(xn,Pt=>{c(Ft)!==void 0&&c(Ft)>0&&Pt(so)}),H(wn,Ln),jt()})(Yt,{get editorState(){return c(be)}})};ge(Nn,Yt=>{s()&&Yt(tr)});var Ut=ee(Nn,2),qn=Yt=>{ns(Yt,{type:"error",icon:Tl,get message(){return c(Sn).message},get actions(){return c(r)},onClick:vr,onClose:W})};ge(Ut,Yt=>{c(Sn)&&Yt(qn)});var Qr=ee(Ut,2),Yr=Yt=>{var wn=Fe(()=>[{icon:tS,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:Ee},{icon:Bm,text:"No thanks",title:"Close this message",onClick:()=>j(J,!1)}]);ns(Yt,{type:"success",message:"Do you want to format the JSON?",get actions(){return c(wn)},onClose:W})};ge(Qr,Yt=>{var wn,dt;!c(Sn)&&c(J)&&(wn=c(q),!(dt=wn.substring(0,999).trim()).includes(` +`)&&QH.test(dt))&&Yt(Yr)}),ww(ee(Qr,2),{get validationErrors(){return c(I)},selectError:me}),H(pt,sn)};ge(ke,pt=>{c(Dt)||pt(Ye)}),$e(()=>lt(nn,"jse-hidden",c(Dt))),H(ye,Qe)},Lr=ye=>{H(ye,qG())};return ge(er,ye=>{pe?ye(Lr,!1):ye(io)}),ar(cr,ye=>j(he,ye),()=>c(he)),$e(()=>lt(cr,"no-main-menu",!i())),H(t,cr),zt(e,"focus",W),zt(e,"patch",vt),zt(e,"handlePatch",rt),zt(e,"openTransformModal",Et),zt(e,"refresh",Pn),zt(e,"flush",Ve),zt(e,"validate",zn),jt({focus:W,patch:vt,handlePatch:rt,openTransformModal:Et,refresh:Pn,flush:Ve,validate:zn})}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-inline-value.svelte-h57m0p { + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + line-height: var(--jse-line-height, calc(1em + 4px)); + border: none; + padding: 0 calc(0.5 * var(--jse-padding, 10px)); + background: transparent; + color: inherit; + cursor: inherit; +} +.jse-inline-value.jse-highlight.svelte-h57m0p { + background-color: var(--jse-search-match-color, #ffe665); + outline: var(--jse-search-match-outline, none); +} +.jse-inline-value.jse-highlight.jse-active.svelte-h57m0p { + background-color: var(--jse-search-match-active-color, var(--jse-search-match-color, #ffe665)); + outline: var(--jse-search-match-outline, 2px solid #e0be00); +}`);var HG=ue('');It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-column-header.svelte-2i3vdx { + background: none; + border: none; + font-family: inherit; + font-size: inherit; + color: inherit; + display: flex; + gap: var(--jse-padding, 10px); + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)) calc(0.5 * var(--jse-padding, 10px)); + width: 100%; +} +.jse-column-header.svelte-2i3vdx:hover { + background: var(--jse-table-header-background-highlight, #e8e8e8); +} +.jse-column-header.svelte-2i3vdx:not(.jse-column-header.jse-readonly) { + cursor: pointer; +} +.jse-column-header.svelte-2i3vdx span.jse-column-sort-icon:where(.svelte-2i3vdx) { + height: 1em; +}`);var WG=ue(''),KG=ue('');It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-table-mode-welcome.svelte-1q0ce0e { + flex: 1; + display: flex; + flex-direction: column; + overflow: auto; + align-items: center; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-table-mode-welcome.svelte-1q0ce0e:last-child { + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-space.jse-before:where(.svelte-1q0ce0e) { + flex: 1; +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-nested-arrays:where(.svelte-1q0ce0e) { + display: flex; + flex-direction: column; + gap: var(--jse-padding, 10px); + max-width: 300px; + margin: 2em var(--jse-padding, 10px); + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-nested-arrays:where(.svelte-1q0ce0e) .jse-nested-arrays-info:where(.svelte-1q0ce0e) { + color: var(--jse-panel-color-readonly, #b2b2b2); +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-nested-arrays:where(.svelte-1q0ce0e) button.jse-nested-array-action:where(.svelte-1q0ce0e) { + text-align: left; + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-primary-background, var(--jse-theme-color, #3883fa)); + color: var(--jse-button-primary-color, #fff); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-nested-arrays:where(.svelte-1q0ce0e) button.jse-nested-array-action:where(.svelte-1q0ce0e):hover { + background: var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff)); +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-nested-arrays:where(.svelte-1q0ce0e) button.jse-nested-array-action:where(.svelte-1q0ce0e):disabled { + background: var(--jse-button-primary-background-disabled, #9d9d9d); +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-nested-arrays:where(.svelte-1q0ce0e) button.jse-nested-array-action:where(.svelte-1q0ce0e) .jse-nested-array-count:where(.svelte-1q0ce0e) { + opacity: 0.5; + white-space: nowrap; +} +.jse-table-mode-welcome.svelte-1q0ce0e .jse-space.jse-after:where(.svelte-1q0ce0e) { + flex: 2; +}`);var JG=ue("You can open the document in tree mode instead, or paste a JSON Array using Ctrl+V.",1),GG=ue(''),QG=ue('
      ');function YG(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=U(void 0,!0),i=U(void 0,!0),s=x(e,"text",9),a=x(e,"json",9),l=x(e,"readOnly",9),u=x(e,"parser",9),d=x(e,"openJSONEditorModal",9),h=x(e,"onChangeMode",9),f=x(e,"onClick",9),p=U(void 0,!0);ie(()=>B(l()),()=>{j(n,l()?"View":"Edit")}),ie(()=>(B(a()),oS),()=>{j(p,a()?oS(a()).slice(0,99).filter(F=>F.length>0):[])}),ie(()=>c(p),()=>{j(r,!Jn(c(p)))}),ie(()=>(B(a()),B(s())),()=>{j(o,a()===void 0&&(s()===""||s()===void 0))}),ie(()=>(c(r),c(o),B(a()),B(u())),()=>{j(i,c(r)?"Object with nested arrays":c(o)?"An empty document":Nr(a())?"An object":Cr(a())?"An empty array":"A ".concat(ew(a(),u())))}),En(),_t(!0);var m=QG(),b=ee(V(m),2),v=V(b),g=V(v),y=ee(v,2),k=V(y),S=F=>{H(F,Po(`An object cannot be opened in table mode. You can open a nested array instead, or open the + document in tree mode.`))},w=F=>{var se=Po();$e(()=>{var pe;return Mt(se,"".concat((pe=c(i))!==null&&pe!==void 0?pe:""," cannot be opened in table mode."))}),H(F,se)};ge(k,F=>{c(r)?F(S):F(w,!1)});var _=ee(k,2),A=F=>{H(F,JG())},D=F=>{H(F,Po("You can open the document in tree mode instead."))};ge(_,F=>{c(o)&&!l()?F(A):F(D,!1)});var E=ee(y,2);Or(E,1,()=>c(p),Dr,(F,se)=>{var pe=GG(),re=Fe(()=>function(be){return Ze(a(),be).length}(c(se))),Z=V(pe);$e(()=>{var be,fe;return Mt(Z,"".concat((be=c(n))!==null&&be!==void 0?be:"",' "').concat((fe=Wi(c(se)))!==null&&fe!==void 0?fe:"",'" '))});var he=V(ee(Z));$e(()=>{var be,fe;return Mt(he,"(".concat((be=c(re))!==null&&be!==void 0?be:""," ").concat((fe=c(re)!==1?"items":"item")!==null&&fe!==void 0?fe:"",")"))}),Oe("click",pe,()=>d()(c(se))),H(F,pe)});var z=ee(E,2),G=V(z);$e(()=>{var F;Mt(g,c(i)),Mt(G,"".concat((F=c(n))!==null&&F!==void 0?F:""," in tree mode"))}),Oe("click",z,()=>h()(Gr.tree)),Oe("click",m,()=>f()()),H(t,m),jt()}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-column-header.svelte-fzj761 { + background: none; + border: none; + font-family: inherit; + font-size: inherit; + color: inherit; + display: flex; + gap: var(--jse-padding, 10px); + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)) calc(0.5 * var(--jse-padding, 10px)); + width: 100%; +} +.jse-column-header.svelte-fzj761:hover { + background: var(--jse-table-header-background-highlight, #e8e8e8); +} +.jse-column-header.svelte-fzj761:not(.jse-column-header.jse-readonly) { + cursor: pointer; +}`);var XG=ue('');It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-table-mode.svelte-u14cgx { + flex: 1; + display: flex; + flex-direction: column; + position: relative; + background: var(--jse-background-color, #fff); + min-width: 0; + min-height: 0; + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + color: var(--jse-text-color, #4d4d4d); + line-height: var(--jse-line-height, calc(1em + 4px)); +} +.jse-table-mode.no-main-menu.svelte-u14cgx { + border-top: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-table-mode.svelte-u14cgx .jse-search-box-container:where(.svelte-u14cgx) { + position: relative; + height: 0; + top: calc(var(--jse-line-height, calc(1em + 4px)) + 2 * var(--jse-padding, 10px)); + margin-right: calc(var(--jse-padding, 10px) + 20px); + margin-left: var(--jse-padding, 10px); + text-align: right; + z-index: 3; +} +.jse-table-mode.svelte-u14cgx .jse-hidden-input-label:where(.svelte-u14cgx) { + position: fixed; + right: 0; + top: 0; + width: 0; + height: 0; +} +.jse-table-mode.svelte-u14cgx .jse-hidden-input-label:where(.svelte-u14cgx) .jse-hidden-input:where(.svelte-u14cgx) { + width: 0; + height: 0; + padding: 0; + border: 0; + outline: none; +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) { + flex: 1; + align-items: flex-start; + flex-direction: column; + display: flex; + overflow: auto; + overflow-anchor: none; + scrollbar-gutter: stable; + border-left: var(--jse-main-border, 1px solid #d7d7d7); + border-right: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx):last-child { + border-bottom: var(--jse-main-border, 1px solid #d7d7d7); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) { + border-collapse: collapse; + border-spacing: 0; +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-invisible-start-section:where(.svelte-u14cgx) td:where(.svelte-u14cgx), +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-invisible-end-section:where(.svelte-u14cgx) td:where(.svelte-u14cgx) { + margin: 0; + padding: 0; +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-search-box-background:where(.svelte-u14cgx) { + background: var(--jse-table-header-background, #f5f5f5); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-invisible-end-section:where(.svelte-u14cgx) td:where(.svelte-u14cgx) { + padding-bottom: var(--jse-padding, 10px); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx):hover { + background-color: var(--jse-table-row-odd-background, rgba(0, 0, 0, 0.05)); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell:where(.svelte-u14cgx) { + padding: 0 var(--jse-padding, 10px) 0 0; + vertical-align: top; + white-space: nowrap; + height: var(--jse-line-height, calc(1em + 4px)); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell.jse-table-cell-header:where(.svelte-u14cgx), .jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell.jse-table-cell-gutter:where(.svelte-u14cgx) { + font-weight: normal; + text-align: left; + color: var(--jse-text-readonly, #8d8d8d); + background: var(--jse-table-header-background, #f5f5f5); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell.jse-table-cell-header:where(.svelte-u14cgx) { + padding: 0; + position: sticky; + top: 0; +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell.jse-table-cell-header:where(.svelte-u14cgx) .jse-table-root-error:where(.svelte-u14cgx) { + padding: calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)) calc(0.5 * var(--jse-padding, 10px)); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell.jse-table-cell-gutter:where(.svelte-u14cgx) { + padding: 0 var(--jse-padding, 10px) 0 calc(0.5 * var(--jse-padding, 10px)); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell:where(.svelte-u14cgx) .jse-value-outer:where(.svelte-u14cgx) { + display: inline-block; + cursor: var(--jse-contents-cursor, pointer); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell:where(.svelte-u14cgx) .jse-value-outer:where(.svelte-u14cgx):hover { + background: var(--jse-hover-background-color, rgba(0, 0, 0, 0.06)); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell:where(.svelte-u14cgx) .jse-value-outer.jse-selected-value:where(.svelte-u14cgx) { + background: var(--jse-selection-background-color, #d3d3d3); +} +.jse-table-mode.svelte-u14cgx .jse-contents:where(.svelte-u14cgx) table.jse-table-main:where(.svelte-u14cgx) .jse-table-row:where(.svelte-u14cgx) .jse-table-cell:where(.svelte-u14cgx) .jse-context-menu-anchor:where(.svelte-u14cgx) { + display: inline-flex; + position: relative; + vertical-align: top; +} +.jse-table-mode.svelte-u14cgx .jse-contents.jse-contents-loading:where(.svelte-u14cgx) { + align-items: unset; +} +.jse-table-mode.svelte-u14cgx .jse-contents.jse-contents-loading:where(.svelte-u14cgx) .jse-loading-space:where(.svelte-u14cgx) { + flex: 1; +} +.jse-table-mode.svelte-u14cgx .jse-contents.jse-contents-loading:where(.svelte-u14cgx) .jse-loading:where(.svelte-u14cgx) { + flex: 2; + text-align: center; + color: var(--jse-panel-color-readonly, #b2b2b2); + box-sizing: border-box; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); +}`);var ZG=ue('
      '),eQ=ue(''),tQ=ue(''),nQ=ue(' '),rQ=ue('
      '),oQ=ue('
      '),iQ=ue(''),sQ=ue(''),aQ=ue('
      ',1),lQ=ue(" ",1),cQ=ue(' ',1),uQ=ue('
      loading...
      '),dQ=ue('
      ',1);function hQ(t,e){xt(e,!1);var n=U(void 0,!0),r=U(void 0,!0),o=U(void 0,!0),i=ro("jsoneditor:TableMode"),{openAbsolutePopup:s,closeAbsolutePopup:a}=nl("absolute-popup"),l=v$(),u=Yc(),d=Yc(),h=typeof window>"u";i("isSSR:",h);var f=x(e,"readOnly",9),p=x(e,"externalContent",9),m=x(e,"externalSelection",9),b=x(e,"history",9),v=x(e,"mainMenuBar",9),g=x(e,"escapeControlCharacters",9),y=x(e,"escapeUnicodeCharacters",9),k=x(e,"flattenColumns",9),S=x(e,"parser",9),w=x(e,"parseMemoizeOne",9),_=x(e,"validator",9),A=x(e,"validationParser",9),D=x(e,"indentation",9),E=x(e,"onChange",9),z=x(e,"onChangeMode",9),G=x(e,"onSelect",9),F=x(e,"onUndo",9),se=x(e,"onRedo",9),pe=x(e,"onRenderValue",9),re=x(e,"onRenderMenu",9),Z=x(e,"onRenderContextMenu",9),he=x(e,"onFocus",9),be=x(e,"onBlur",9),fe=x(e,"onSortModal",9),J=x(e,"onTransformModal",9),I=x(e,"onJSONEditorModal",9),Q=U(void 0,!0),M=U(void 0,!0),C=U(void 0,!0),$=U(void 0,!0),oe=U(void 0,!0);yw({onMount:ko,onDestroy:Ai,getWindow:()=>Mh(c(M)),hasFocus:()=>ft&&document.hasFocus()||rw(c(M)),onFocus:()=>{Et=!0,he()&&he()()},onBlur:()=>{Et=!1,be()&&be()()}});var _e,q=U(void 0,!0),K=U(void 0,!0),L=U(void 0,!0),xe=U(void 0,!0),Je=U(void 0,!0),ce=U(!1,!0),ae=U(!1,!0);function W(P){j(Je,(_e=P)?o$(c(q),_e.items):void 0)}function it(P){return vt.apply(this,arguments)}function vt(){return(vt=gt(function*(P){j(te,void 0),yield an(P)})).apply(this,arguments)}function rt(){j(ce,!1),j(ae,!1),Ve()}var Ee=U(1e4,!0),Ge=U([],!0),Ue=U(void 0,!0),ft=!1,Et=!1,et=U(!1,!0),Pe=U({},!0),O=U(600,!0),T=U(0,!0),N=18;function ne(P){j(te,P)}function X(P){c(te)&&P!==void 0&&(yi(P,_l(c(te)))&&yi(P,ht(c(te)))||(i("clearing selection: path does not exist anymore",c(te)),j(te,void 0)))}var me=U(c(q)!==void 0?Ab({json:c(q)}):void 0,!0),te=U(th(m())?m():void 0,!0),qe=U(void 0,!0),Me=U(!1,!0);function mt(P){if(!f()){i("onSortByHeader",P);var de=P.sortDirection===zi.desc?-1:1;Tt(j$(c(q),[],P.path,de),(Ce,je)=>({state:je,sortedColumn:P}))}}ko(()=>{c(te)&&Sn(ht(c(te)))});var Bt=U(void 0,!0);function We(P){if(P.json!==void 0||P.text!==void 0){var de=c(q)!==void 0&&P.json!==void 0;b().add({type:"tree",undo:{patch:de?[{op:"replace",path:"",value:P.json}]:void 0,json:P.json,text:P.text,documentState:P.documentState,textIsRepaired:P.textIsRepaired,selection:ys(P.selection),sortedColumn:P.sortedColumn},redo:{patch:de?[{op:"replace",path:"",value:c(q)}]:void 0,json:c(q),text:c(K),documentState:c(me),textIsRepaired:c(Me),selection:ys(c(te)),sortedColumn:c(qe)}})}}var on=U([],!0),ut=Od(b$);function $n(P,de,Ce,je){Ac(()=>{var Te;try{Te=ut(P,de,Ce,je)}catch(Ke){Te=[{path:[],message:"Failed to validate: "+Ke.message,severity:Yi.warning}]}gn(Te,c(on))||(i("validationErrors changed:",Te),j(on,Te))},Te=>i("validationErrors updated in ".concat(Te," ms")))}function Pn(){return i("validate"),c(L)?{parseError:c(L),isRepairable:!1}:($n(c(q),_(),S(),A()),Jn(c(on))?void 0:{validationErrors:c(on)})}function en(P,de){if(i("patch",P,de),c(q)===void 0)throw new Error("Cannot apply patch: no JSON");var Ce=c(q),je={json:void 0,text:c(K),documentState:c(me),selection:ys(c(te)),sortedColumn:c(qe),textIsRepaired:c(Me)},Te=r$(c(q),P),Ke=WA(c(q),c(me),P),bt=aG(c(qe),P,c(Ge)),ot=typeof de=="function"?de(Ke.json,Ke.documentState,c(te)):void 0;return j(q,(ot==null?void 0:ot.json)!==void 0?ot.json:Ke.json),j(me,(ot==null?void 0:ot.state)!==void 0?ot.state:Ke.documentState),j(te,(ot==null?void 0:ot.selection)!==void 0?ot.selection:c(te)),j(qe,(ot==null?void 0:ot.sortedColumn)!==void 0?ot.sortedColumn:bt),j(K,void 0),j(Me,!1),j(xe,void 0),j(L,void 0),b().add({type:"tree",undo:De({patch:Te},je),redo:{patch:P,json:void 0,text:void 0,documentState:c(me),selection:ys(c(te)),sortedColumn:c(qe),textIsRepaired:c(Me)}}),{json:c(q),previousJson:Ce,undo:Te,redo:P}}function Tt(P,de){i("handlePatch",P,de);var Ce={json:c(q),text:c(K)},je=en(P,de);return hn(Ce,je),je}function hn(P,de){if((P.json!==void 0||(P==null?void 0:P.text)!==void 0)&&E()){if(c(K)!==void 0){var Ce={text:c(K),json:void 0};E()(Ce,P,{contentErrors:Pn(),patchResult:de})}else if(c(q)!==void 0){var je={text:void 0,json:c(q)};E()(je,P,{contentErrors:Pn(),patchResult:de})}}}function Kn(P){i("pasted json as text",P),j(xe,P)}function lr(P){var de=parseInt(P[0],10),Ce=[String(de+1),...P.slice(1)];return yi(c(q),Ce)?mn(Ce):mn(P)}function Ve(){i("focus"),c($)&&(c($).focus(),c($).select())}function kt(P){j(T,P.target.scrollTop)}function Qt(){c(te)||j(te,function(){if(Cr(c(q))&&!Jn(c(q))&&!Jn(c(Ge)))return mn(["0",...c(Ge)[0]])}())}function tn(){if(c(Me)&&c(q)!==void 0){var P={json:c(q),text:c(K)},de={json:c(q),documentState:c(me),selection:c(te),sortedColumn:c(qe),text:c(K),textIsRepaired:c(Me)};j(K,void 0),j(Me,!1),X(c(q)),We(de),hn(P,void 0)}return{json:c(q),text:c(K)}}function an(P){var de=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],Ce=c(ce)?id:0,je=rS(P,c(Ge),Pe,N),Te=je-c(T)+Ce+N,Ke=Yn(P);if(i("scrollTo",{path:P,top:je,scrollTop:c(T),elem:Ke}),!c(C))return Promise.resolve();var bt=c(C).getBoundingClientRect();if(Ke&&!de){var ot=Ke.getBoundingClientRect();if(ot.bottom>bt.top&&ot.top{l(Ke,{container:c(C),offset:St,duration:300,callback:()=>{kn(P),Zt()}})}:Zt=>{var Ht;l(Te,{container:c(C),offset:St,duration:300,callback:(Ht=gt(function*(){yield Pr(),kn(P),Zt()}),function(){return Ht.apply(this,arguments)})})})}function kn(P){var de=Yn(P);if(de&&c(C)){var Ce=c(C).getBoundingClientRect(),je=de.getBoundingClientRect();if(je.right>Ce.right){var Te=je.right-Ce.right;si(C,c(C).scrollLeft+=Te)}if(je.leftSt){var Zt=Te-St;si(C,c(C).scrollTop+=Zt)}if(jeia(P.slice(1),Ke)),Te=je?P.slice(0,1).concat(je):P;return(de=(Ce=c(C))===null||Ce===void 0?void 0:Ce.querySelector('td[data-path="'.concat(Cb(Te),'"]')))!==null&&de!==void 0?de:void 0}function zn(P){var de,{anchor:Ce,left:je,top:Te,width:Ke,height:bt,offsetTop:ot,offsetLeft:St,showTip:Zt}=P,Ht=function(le){var{json:Se,documentState:Re,selection:Ne,readOnly:Ie,onEditValue:Ct,onEditRow:Ot,onToggleEnforceString:At,onCut:Kt,onCopy:Jt,onPaste:Vn,onRemove:$t,onDuplicateRow:fr,onInsertBeforeRow:Xn,onInsertAfterRow:Gt,onRemoveRow:ze}=le,Le=Se!==void 0,Rt=!!Ne,Rn=Se!==void 0&&Ne?Ze(Se,ht(Ne)):void 0,cn=Le&&(ir(Ne)||to(Ne)||Wn(Ne)),Hn=!Ie&&Le&&Ne!==void 0&&dm(Ne),Er=Hn&&!Rr(Rn),nr=!Ie&&cn,Mr=Ne!==void 0&&Zs(Se,Re,ht(Ne));return[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:()=>Ct(),icon:Tc,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!Hn},width:"11em",items:[{type:"button",icon:Tc,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:()=>Ct(),disabled:!Hn},{type:"button",icon:Mr?HC:KC,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:()=>At(),disabled:!Er}]},{type:"dropdown-button",main:{type:"button",onClick:()=>Kt(!0),icon:Mc,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!nr},width:"10em",items:[{type:"button",icon:Mc,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:()=>Kt(!0),disabled:Ie||!cn},{type:"button",icon:Mc,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:()=>Kt(!1),disabled:Ie||!cn}]},{type:"dropdown-button",main:{type:"button",onClick:()=>Jt(!0),icon:Sa,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!cn},width:"12em",items:[{type:"button",icon:Sa,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:()=>Jt(!1),disabled:!cn},{type:"button",icon:Sa,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:()=>Jt(!1),disabled:!cn}]},{type:"button",onClick:()=>Vn(),icon:VC,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:Ie||!Rt},{type:"button",onClick:()=>$t(),icon:o0,text:"Remove",title:"Remove selected contents (Delete)",disabled:Ie||!cn}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:()=>Ot(),icon:Tc,text:"Edit row",title:"Edit the current row",disabled:Ie||!Rt||!Le},{type:"button",onClick:()=>fr(),icon:QC,text:"Duplicate row",title:"Duplicate the current row (Ctrl+D)",disabled:Ie||!Rt||!Le},{type:"button",onClick:()=>Xn(),icon:wc,text:"Insert before",title:"Insert a row before the current row",disabled:Ie||!Rt||!Le},{type:"button",onClick:()=>Gt(),icon:wc,text:"Insert after",title:"Insert a row after the current row",disabled:Ie||!Rt||!Le},{type:"button",onClick:()=>ze(),icon:o0,text:"Remove row",title:"Remove current row",disabled:Ie||!Rt||!Le}]}]}]}({json:c(q),documentState:c(me),selection:c(te),readOnly:f(),onEditValue:zr,onEditRow:cr,onToggleEnforceString:oo,onCut:Qe,onCopy:nn,onPaste:io,onRemove:yn,onDuplicateRow:ke,onInsertBeforeRow:Ye,onInsertAfterRow:pt,onRemoveRow:sn}),Qn=(de=Z()(Ht))!==null&&de!==void 0?de:Ht;if(Qn!==!1){var _r={left:je,top:Te,offsetTop:ot,offsetLeft:St,width:Ke,height:bt,anchor:Ce,closeOnOuterClick:!0,onClose:()=>{ft=!1,Ve()}};ft=!0;var R=s(T$,{tip:Zt?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0,items:Qn,onRequestClose(){a(R),Ve()}},_r)}}function $r(P){if(!Bo(c(te)))if(P&&(P.stopPropagation(),P.preventDefault()),P&&P.type==="contextmenu"&&P.target!==c($))zn({left:P.clientX,top:P.clientY,width:Vs,height:Us,showTip:!1});else{var de,Ce=(de=c(C))===null||de===void 0?void 0:de.querySelector(".jse-table-cell.jse-selected-value");if(Ce)zn({anchor:Ce,offsetTop:2,width:Vs,height:Us,showTip:!1});else{var je,Te=(je=c(C))===null||je===void 0?void 0:je.getBoundingClientRect();Te&&zn({top:Te.top+2,left:Te.left+2,width:Vs,height:Us,showTip:!1})}}}function vr(P){zn({anchor:FA(P.target,"BUTTON"),offsetTop:0,width:Vs,height:Us,showTip:!0})}function zr(){if(!f()&&c(te)){var P=ht(c(te));Rr(Ze(c(q),P))?Yt(P):j(te,mn(P))}}function cr(){!f()&&c(te)&&Yt(ht(c(te)).slice(0,1))}function oo(){if(!f()&&Wn(c(te))){var P=c(te).path,de=yt(P),Ce=Ze(c(q),P),je=!Zs(c(q),c(me),P),Te=je?String(Ce):Au(String(Ce),S());i("handleToggleEnforceString",{enforceString:je,value:Ce,updatedValue:Te}),Tt([{op:"replace",path:de,value:Te}],(Ke,bt)=>({state:gg(c(q),bt,P,{type:"value",enforceString:je})}))}}function Vr(){return er.apply(this,arguments)}function er(){return(er=gt(function*(){if(i("apply pasted json",c(xe)),c(xe)){var{onPasteAsJson:P}=c(xe);P(),setTimeout(Ve)}})).apply(this,arguments)}function io(){j(et,!0)}function Lr(){i("clear pasted json"),j(xe,void 0),Ve()}function ye(){z()(Gr.text)}function Qe(P){return Dt.apply(this,arguments)}function Dt(){return(Dt=gt(function*(P){yield O$({json:c(q),selection:c(te),indentation:P?D():void 0,readOnly:f(),parser:S(),onPatch:Tt})})).apply(this,arguments)}function nn(){return Wt.apply(this,arguments)}function Wt(){return Wt=gt(function*(){var P=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];c(q)!==void 0&&(yield _$({json:c(q),selection:c(te),indentation:P?D():void 0,parser:S()}))}),Wt.apply(this,arguments)}function yn(){A$({json:c(q),text:c(K),selection:c(te),keepSelection:!0,readOnly:f(),onChange:E(),onPatch:Tt})}function ke(){(function(P){var{json:de,selection:Ce,columns:je,readOnly:Te,onPatch:Ke}=P;if(!Te&&de!==void 0&&Ce&&_c(Ce)){var{rowIndex:bt,columnIndex:ot}=fi(ht(Ce),je);$o("duplicate row",{rowIndex:bt});var St=[String(bt)];Ke(e$(de,[St]),(Zt,Ht)=>({state:Ht,selection:mn(ul({rowIndex:bt({state:_r,selection:mn(ul({rowIndex:St,columnIndex:ot},je))}))}})({json:c(q),selection:c(te),columns:c(Ge),readOnly:f(),onPatch:Tt})}function sn(){(function(P){var{json:de,selection:Ce,columns:je,readOnly:Te,onPatch:Ke}=P;if(!Te&&de!==void 0&&Ce&&_c(Ce)){var{rowIndex:bt,columnIndex:ot}=fi(ht(Ce),je);$o("remove row",{rowIndex:bt}),Ke(fm([[String(bt)]]),(St,Zt)=>{var Ht=bt0?bt-1:void 0,Qn=Ht!==void 0?mn(ul({rowIndex:Ht,columnIndex:ot},je)):void 0;return $o("remove row new selection",{rowIndex:bt,newRowIndex:Ht,newSelection:Qn}),{state:Zt,selection:Qn}})}})({json:c(q),selection:c(te),columns:c(Ge),readOnly:f(),onPatch:Tt})}function Nn(){return(Nn=gt(function*(P){yield $$({char:P,selectInside:!1,json:c(q),selection:c(te),readOnly:f(),parser:S(),onPatch:Tt,onReplaceJson:Ut,onSelect:ne})})).apply(this,arguments)}function tr(P){var de;P.preventDefault();var Ce=(de=P.clipboardData)===null||de===void 0?void 0:de.getData("text/plain");Ce!==void 0&&E$({clipboardText:Ce,json:c(q),selection:c(te),readOnly:f(),parser:S(),onPatch:Tt,onChangeText:qn,openRepairModal:wn})}function Ut(P,de){var Ce={json:c(q),text:c(K)},je={json:c(q),documentState:c(me),selection:c(te),sortedColumn:c(qe),text:c(K),textIsRepaired:c(Me)},Te=ii(P,c(me)),Ke=typeof de=="function"?de(P,Te,c(te)):void 0;j(q,(Ke==null?void 0:Ke.json)!==void 0?Ke.json:P),j(me,(Ke==null?void 0:Ke.state)!==void 0?Ke.state:Te),j(te,(Ke==null?void 0:Ke.selection)!==void 0?Ke.selection:c(te)),j(qe,void 0),j(K,void 0),j(Me,!1),j(L,void 0),X(c(q)),We(je),hn(Ce,void 0)}function qn(P,de){i("handleChangeText");var Ce={json:c(q),text:c(K)},je={json:c(q),documentState:c(me),selection:c(te),sortedColumn:c(qe),text:c(K),textIsRepaired:c(Me)};try{j(q,w()(P)),j(me,ii(c(q),c(me))),j(K,void 0),j(Me,!1),j(L,void 0)}catch(Ke){try{j(q,w()(Ss(P))),j(me,ii(c(q),c(me))),j(K,P),j(Me,!0),j(L,void 0)}catch{j(q,void 0),j(me,void 0),j(K,P),j(Me,!1),j(L,c(K)!==""?cu(c(K),Ke.message||String(Ke)):void 0)}}if(typeof de=="function"){var Te=de(c(q),c(me),c(te));j(q,(Te==null?void 0:Te.json)!==void 0?Te.json:c(q)),j(me,(Te==null?void 0:Te.state)!==void 0?Te.state:c(me)),j(te,(Te==null?void 0:Te.selection)!==void 0?Te.selection:c(te))}X(c(q)),We(je),hn(Ce,void 0)}function Qr(P){i("select validation error",P),j(te,mn(P.path)),an(P.path)}function Yr(P){if(c(q)!==void 0){var{id:de,onTransform:Ce,onClose:je}=P,Te=P.rootPath||[];ft=!0,J()({id:de||d,json:c(q),rootPath:Te||[],onTransform:Ke=>{Ce?Ce({operations:Ke,json:c(q),transformedJson:Ki(c(q),Ke)}):(i("onTransform",Te,Ke),Tt(Ke))},onClose:()=>{ft=!1,setTimeout(Ve),je&&je()}})}}function Yt(P){i("openJSONEditorModal",{path:P}),ft=!0,I()({content:{json:Ze(c(q),P)},path:P,onPatch:Tt,onClose:()=>{ft=!1,setTimeout(Ve)}})}function wn(P,de){j(oe,{text:P,onParse:Ce=>pg(Ce,je=>$h(je,S())),onRepair:PA,onApply:de,onClose:Ve})}function dt(){(function(P){f()||c(q)===void 0||(ft=!0,fe()({id:u,json:c(q),rootPath:P,onSort:de=>{var{operations:Ce,itemPath:je,direction:Te}=de;i("onSort",Ce,P,je,Te),Tt(Ce,(Ke,bt)=>({state:bt,sortedColumn:{path:je,sortDirection:Te===-1?zi.desc:zi.asc}}))},onClose:()=>{ft=!1,setTimeout(Ve)}}))})([])}function Y(){Yr({rootPath:[]})}function ve(P){i("openFind",{findAndReplace:P}),j(ce,!1),j(ae,!1),Pr().then(()=>{j(ce,!0),j(ae,P)})}function He(){if(!f()&&b().canUndo){var P=b().undo();if(um(P)){var de={json:c(q),text:c(K)};j(q,P.undo.patch?Ki(c(q),P.undo.patch):P.undo.json),j(me,P.undo.documentState),j(te,P.undo.selection),j(qe,P.undo.sortedColumn),j(K,P.undo.text),j(Me,P.undo.textIsRepaired),j(L,void 0),i("undo",{item:P,json:c(q)}),hn(de,P.undo.patch&&P.redo.patch?{json:c(q),previousJson:de.json,redo:P.undo.patch,undo:P.redo.patch}:void 0),Ve(),c(te)&&an(ht(c(te)),!1)}else F()(P)}}function Xt(){if(!f()&&b().canRedo){var P=b().redo();if(um(P)){var de={json:c(q),text:c(K)};j(q,P.redo.patch?Ki(c(q),P.redo.patch):P.redo.json),j(me,P.redo.documentState),j(te,P.redo.selection),j(qe,P.redo.sortedColumn),j(K,P.redo.text),j(Me,P.redo.textIsRepaired),j(L,void 0),i("redo",{item:P,json:c(q)}),hn(de,P.undo.patch&&P.redo.patch?{json:c(q),previousJson:de.json,redo:P.redo.patch,undo:P.undo.patch}:void 0),Ve(),c(te)&&an(ht(c(te)),!1)}else se()(P)}}function Vt(P){j(O,P.getBoundingClientRect().height)}ie(()=>(B(g()),B(y())),()=>{j(Q,tw({escapeControlCharacters:g(),escapeUnicodeCharacters:y()}))}),ie(()=>c(ce),()=>{(function(P){if(c(C)){var de=P?id:-100;c(C).scrollTo({top:si(C,c(C).scrollTop+=de),left:c(C).scrollLeft})}})(c(ce))}),ie(()=>B(p()),()=>{(function(P){var de={json:c(q)},Ce=Gd(P)?P.text!==c(K):!gn(de.json,P.json);if(i("update external content",{isChanged:Ce}),Ce){var je={json:c(q),documentState:c(me),selection:c(te),sortedColumn:c(qe),text:c(K),textIsRepaired:c(Me)};if(Gd(P))try{j(q,w()(P.text)),j(me,ii(c(q),c(me))),j(K,P.text),j(Me,!1),j(L,void 0)}catch(Te){try{j(q,w()(Ss(P.text))),j(me,ii(c(q),c(me))),j(K,P.text),j(Me,!0),j(L,void 0)}catch{j(q,void 0),j(me,void 0),j(K,P.text),j(Me,!1),j(L,c(K)!==""?cu(c(K),Te.message||String(Te)):void 0)}}else j(q,P.json),j(me,ii(c(q),c(me))),j(K,void 0),j(Me,!1),j(L,void 0);X(c(q)),j(qe,void 0),We(je)}})(p())}),ie(()=>B(m()),()=>{(function(P){gn(c(te),P)||(i("applyExternalSelection",{selection:c(te),externalSelection:P}),th(P)&&j(te,P))})(m())}),ie(()=>(c(Ge),c(q),B(k()),c(Ee)),()=>{j(Ge,Cr(c(q))?function(P,de){var Ce=new Set(de.map(yt)),je=new Set(P.map(yt));for(var Te of Ce)je.has(Te)||Ce.delete(Te);for(var Ke of je)Ce.has(Ke)||Ce.add(Ke);return[...Ce].map(ji)}(rG(c(q),k(),c(Ee)),c(Ge)):[])}),ie(()=>(c(q),c(Ge)),()=>{j(Ue,!(!c(q)||Jn(c(Ge))))}),ie(()=>(c(q),c(Ee)),()=>{j(n,Array.isArray(c(q))&&c(q).length>c(Ee))}),ie(()=>(c(T),c(O),c(q),c(ce),id),()=>{j(r,oG(c(T),c(O),c(q),Pe,N,c(ce)?id:0))}),ie(()=>c(q),()=>{c(q),c(C)&&c(C).scrollTo({top:c(C).scrollTop,left:c(C).scrollLeft})}),ie(()=>c(te),()=>{var P;P=c(te),gn(P,m())||(i("onSelect",P),G()(P))}),ie(()=>(B(f()),B(S()),c(Q),c(q),c(me),B(pe())),()=>{j(Bt,{mode:Gr.table,readOnly:f(),parser:S(),normalization:c(Q),getJson:()=>c(q),getDocumentState:()=>c(me),findElement:Yn,findNextInside:lr,focus:Ve,onPatch:(P,de)=>Tt(function(Ce,je){return Ce.flatMap(Te=>{if(Zb(Te)){var Ke=ji(Te.path);if(Ke.length>0){for(var bt=[Te],ot=jn(Ke);ot.length>0&&!yi(je,ot);)bt.unshift({op:"add",path:yt(ot),value:{}}),ot=jn(ot);return bt}}return Te})}(P,c(q)),de),onSelect:ne,onFind:ve,onPasteJson:Kn,onRenderValue:pe()})}),ie(()=>(c(q),B(_()),B(S()),B(A())),()=>{$n(c(q),_(),S(),A())}),ie(()=>(c(on),c(Ge)),()=>{j(o,iG(c(on),c(Ge)))}),En(),_t(!0);var Ft=dQ();Oe("mousedown",Xs,function(P){!$u(P.target,de=>de===c(M))&&Bo(c(te))&&(i("click outside the editor, exit edit mode"),j(te,ys(c(te))),Et&&c($)&&(c($).focus(),c($).blur()),i("blur (outside editor)"),c($)&&c($).blur())});var Ln=tt(Ft),Br=V(Ln),br=P=>{(function(de,Ce){xt(Ce,!1);var je=x(Ce,"containsValidArray",9),Te=x(Ce,"readOnly",9),Ke=x(Ce,"showSearch",13,!1),bt=x(Ce,"history",9),ot=x(Ce,"onSort",9),St=x(Ce,"onTransform",9),Zt=x(Ce,"onContextMenu",9),Ht=x(Ce,"onUndo",9),Qn=x(Ce,"onRedo",9),_r=x(Ce,"onRenderMenu",9);function R(){Ke(!Ke())}var le=U(void 0,!0),Se=U(void 0,!0);ie(()=>(B(Te()),B(ot()),B(je()),B(St()),B(Zt()),B(Ht()),B(bt()),B(Qn())),()=>{j(le,Te()?[{type:"space"}]:[{type:"button",icon:Sp,title:"Sort",className:"jse-sort",onClick:ot(),disabled:Te()||!je()},{type:"button",icon:jp,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:St(),disabled:Te()||!je()},{type:"button",icon:Lm,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:!je()},{type:"button",icon:JC,title:sw,className:"jse-contextmenu",onClick:Zt()},{type:"separator"},{type:"button",icon:g1,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:Ht(),disabled:!bt().canUndo},{type:"button",icon:m1,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:Qn(),disabled:!bt().canRedo},{type:"space"}])}),ie(()=>(B(_r()),c(le)),()=>{j(Se,_r()(c(le))||c(le))}),En(),_t(!0),xg(de,{get items(){return c(Se)}}),jt()})(P,{get containsValidArray(){return c(Ue)},get readOnly(){return f()},get showSearch(){return c(ce)},set showSearch(de){j(ce,de)},get history(){return b()},onSort:dt,onTransform:Y,onUndo:He,onRedo:Xt,onContextMenu:vr,get onRenderMenu(){return re()},$$legacy:!0})};ge(Br,P=>{v()&&P(br)});var qt=ee(Br,2),Un=P=>{var de=cQ(),Ce=tt(de),je=V(Ce);je.readOnly=!0,ar(je,ot=>j($,ot),()=>c($));var Te=ee(Ce,2),Ke=ot=>{var St=aQ(),Zt=tt(St);k$(V(Zt),{get json(){return c(q)},get documentState(){return c(me)},get parser(){return S()},get showSearch(){return c(ce)},get showReplace(){return c(ae)},get readOnly(){return f()},get columns(){return c(Ge)},onSearch:W,onFocus:it,onPatch:Tt,onClose:rt});var Ht=ee(Zt,2),Qn=V(Ht),_r=V(Qn),R=V(_r),le=V(R),Se=V(le),Re=Gt=>{var ze=un(),Le=Fe(()=>{var cn;return Lv([],(cn=c(o))===null||cn===void 0?void 0:cn.root)}),Rt=tt(ze),Rn=cn=>{var Hn=ZG();Gc(V(Hn),{get validationError(){return c(Le)},onExpand:pi}),H(cn,Hn)};ge(Rt,cn=>{c(Le)&&cn(Rn)}),H(Gt,ze)};ge(Se,Gt=>{var ze;Jn((ze=c(o))===null||ze===void 0?void 0:ze.root)||Gt(Re)});var Ne=ee(le);Or(Ne,1,()=>c(Ge),Dr,(Gt,ze)=>{var Le=eQ();(function(Rt,Rn){xt(Rn,!1);var cn=U(void 0,!0),Hn=U(void 0,!0),Er=U(void 0,!0),nr=x(Rn,"path",9),Mr=x(Rn,"sortedColumn",9),Xr=x(Rn,"readOnly",9),Ti=x(Rn,"onSort",9);ie(()=>(B(nr()),Wi),()=>{j(cn,Jn(nr())?"values":Wi(nr()))}),ie(()=>(B(Mr()),B(nr())),()=>{var rr;j(Hn,Mr()&&gn(nr(),(rr=Mr())===null||rr===void 0?void 0:rr.path)?Mr().sortDirection:void 0)}),ie(()=>(c(Hn),_k),()=>{j(Er,c(Hn)?_k[c(Hn)]:void 0)}),En(),_t(!0);var Fr=KG(),Vo=V(Fr),Pi=V(Vo);$e(()=>Mt(Pi,Yd(c(cn),50)));var Ri=ee(Vo,2),Io=rr=>{var So=WG(),Bn=V(So),Tr=Fe(()=>c(Hn)===zi.asc?qa:LR);vn(Bn,{get data(){return c(Tr)}}),$e(()=>Tn(So,"title","Currently sorted in ".concat(c(Er)," order"))),H(rr,So)};ge(Ri,rr=>{c(Hn)!==void 0&&rr(Io)}),$e(()=>{Tn(Fr,"title",Xr()?c(cn):c(cn)+" (Click to sort the data by this column)"),lt(Fr,"jse-readonly",Xr())}),Oe("click",Fr,function(){Xr()||Ti()({path:nr(),sortDirection:c(Hn)===zi.asc?zi.desc:zi.asc})}),H(Rt,Fr),jt()})(V(Le),{get path(){return c(ze)},get sortedColumn(){return c(qe)},get readOnly(){return f()},onSort:mt}),H(Gt,Le)});var Ie=ee(Ne),Ct=Gt=>{var ze=tQ(),Le=V(ze),Rt=Fe(()=>Array.isArray(c(q))?c(q).length:0);(function(Rn,cn){xt(cn,!1);var Hn=x(cn,"count",9),Er=x(cn,"maxSampleCount",9),nr=x(cn,"readOnly",9),Mr=x(cn,"onRefresh",9);_t(!0);var Xr=XG();vn(V(Xr),{data:ZR}),$e(()=>{Tn(Xr,"title","The Columns are created by sampling ".concat(Er()," items out of ").concat(Hn(),". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."),lt(Xr,"jse-readonly",nr())}),Oe("click",Xr,()=>Mr()()),H(Rn,Xr),jt()})(Le,{get count(){return c(Rt)},get maxSampleCount(){return c(Ee)},get readOnly(){return f()},onRefresh:()=>j(Ee,1/0)}),H(Gt,ze)};ge(Ie,Gt=>{c(n)&&Gt(Ct)});var Ot=ee(R),At=V(Ot),Kt=ee(Ot);Or(Kt,1,()=>c(r).visibleItems,Dr,(Gt,ze,Le)=>{var Rt=sQ(),Rn=Fe(()=>c(r).startIndex+Le),cn=Fe(()=>c(o).rows[c(Rn)]),Hn=Fe(()=>{var Fr;return Lv([String(c(Rn))],(Fr=c(cn))===null||Fr===void 0?void 0:Fr.row)}),Er=Fe(()=>Ol(c(q),c(Je),[String(c(Rn))])),nr=V(Rt);SA(nr,()=>c(Rn),Fr=>{var Vo=nQ(),Pi=V(Vo),Ri=ee(Pi),Io=rr=>{Gc(rr,{get validationError(){return c(Hn)},onExpand:pi})};ge(Ri,rr=>{c(Hn)&&rr(Io)}),To(Vo,(rr,So)=>If==null?void 0:If(rr,So),()=>rr=>function(So,Bn){Pe[Bn]=So.getBoundingClientRect().height}(rr,c(Rn))),$e(()=>{var rr;return Mt(Pi,"".concat((rr=c(Rn))!==null&&rr!==void 0?rr:""," "))}),H(Fr,Vo)});var Mr=ee(nr);Or(Mr,1,()=>c(Ge),Dr,(Fr,Vo,Pi)=>{var Ri=oQ(),Io=Fe(()=>[String(c(Rn))].concat(c(Vo))),rr=Fe(()=>Ze(c(ze),c(Vo))),So=Fe(()=>Wn(c(te))&&ia(c(te).path,c(Io))),Bn=Fe(()=>{var qr;return(qr=c(cn))===null||qr===void 0?void 0:qr.columns[Pi]}),Tr=Fe(()=>Lv(c(Io),c(Bn)));$e(()=>Tn(Ri,"data-path",Cb(c(Io))));var Ho=V(Ri),us=V(Ho),Dh=qr=>{var hi=Fe(()=>Pb(Ol(c(ze),c(Er),c(Vo)))),Pu=Fe(()=>!!c(hi)&&c(hi).some(ol=>ol.active)),Ru=Fe(()=>!Jn(c(hi)));(function(ol,Hr){xt(Hr,!1);var il=x(Hr,"path",9),Ag=x(Hr,"value",9),$g=x(Hr,"parser",9),Mg=x(Hr,"isSelected",9),Tg=x(Hr,"containsSearchResult",9),Pg=x(Hr,"containsActiveSearchResult",9),rc=x(Hr,"onEdit",9);_t(!0);var ds=HG(),d3=V(ds);$e(()=>{var Rg;return Mt(d3,Yd((Rg=$g().stringify(Ag()))!==null&&Rg!==void 0?Rg:"",50))}),$e(()=>{lt(ds,"jse-selected",Mg()),lt(ds,"jse-highlight",Tg()),lt(ds,"jse-active",Pg())}),Oe("dblclick",ds,()=>rc()(il())),H(ol,ds),jt()})(qr,{get path(){return c(Io)},get value(){return c(rr)},get parser(){return S()},get isSelected(){return c(So)},get containsSearchResult(){return c(Ru)},get containsActiveSearchResult(){return c(Pu)},onEdit:Yt})},di=qr=>{var hi=Fe(()=>{var Hr;return(Hr=Ol(c(q),c(Je),c(Io)))===null||Hr===void 0?void 0:Hr.searchResults}),Pu=Fe(()=>c(rr)!==void 0?c(rr):""),Ru=Fe(()=>Zs(c(q),c(me),c(Io))),ol=Fe(()=>c(So)?c(te):void 0);x$(qr,{get path(){return c(Io)},get value(){return c(Pu)},get enforceString(){return c(Ru)},get selection(){return c(ol)},get searchResultItems(){return c(hi)},get context(){return c(Bt)}})};ge(us,qr=>{Rr(c(rr))?qr(Dh):qr(di,!1)});var Ih=ee(us),_g=qr=>{var hi=rQ();va(V(hi),{selected:!0,onContextMenu:zn}),H(qr,hi)};ge(Ih,qr=>{f()||!c(So)||Bo(c(te))||qr(_g)});var Tu=ee(Ho,2),Eg=qr=>{Gc(qr,{get validationError(){return c(Tr)},onExpand:pi})};ge(Tu,qr=>{c(Tr)&&qr(Eg)}),$e(()=>lt(Ho,"jse-selected-value",c(So))),H(Fr,Ri)});var Xr=ee(Mr),Ti=Fr=>{H(Fr,iQ())};ge(Xr,Fr=>{c(n)&&Fr(Ti)}),H(Gt,Rt)});var Jt=V(ee(Kt));ar(Ht,Gt=>j(C,Gt),()=>c(C)),To(Ht,(Gt,ze)=>If==null?void 0:If(Gt,ze),()=>Vt),ho(()=>Oe("scroll",Ht,kt));var Vn=ee(Ht,2),$t=Gt=>{var ze=Fe(()=>"You pasted a JSON ".concat(Array.isArray(c(xe).contents)?"array":"object"," as text"));ns(Gt,{type:"info",get message(){return c(ze)},actions:[{icon:Xc,text:"Paste as JSON instead",title:"Paste the text as JSON instead of a single value",onMouseDown:Vr},{text:"Leave as is",title:"Keep the pasted content as a single value",onClick:Lr}]})};ge(Vn,Gt=>{c(xe)&&Gt($t)});var fr=ee(Vn,2),Xn=Gt=>{var ze=Fe(()=>f()?[]:[{icon:v1,text:"Ok",title:"Accept the repaired document",onClick:tn},{icon:kp,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:ye}]);ns(Gt,{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",get actions(){return c(ze)},onClose:Ve})};ge(fr,Gt=>{c(Me)&&Gt(Xn)}),ww(ee(fr,2),{get validationErrors(){return c(on)},selectError:Qr}),$e(()=>{lt(Ot,"jse-search-box-background",c(ce)),Tn(At,"colspan",c(Ge).length),Hc(At,"height",c(r).startHeight+"px"),Tn(Jt,"colspan",c(Ge).length),Hc(Jt,"height",c(r).endHeight+"px")}),H(ot,St)},bt=ot=>{var St=un(),Zt=tt(St),Ht=_r=>{var R=lQ(),le=tt(R),Se=Fe(()=>f()?[]:[{icon:kp,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:ye}]);ns(le,{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",get actions(){return c(Se)}}),M$(ee(le,2),{get text(){return c(K)},get json(){return c(q)},get indentation(){return D()},get parser(){return S()}}),H(_r,R)},Qn=_r=>{YG(_r,{get text(){return c(K)},get json(){return c(q)},get readOnly(){return f()},get parser(){return S()},openJSONEditorModal:Yt,get onChangeMode(){return z()},onClick:()=>{Ve()}})};ge(Zt,_r=>{c(L)&&c(K)!==void 0&&c(K)!==""?_r(Ht):_r(Qn,!1)},!0),H(ot,St)};ge(Te,ot=>{c(Ue)?ot(Ke):ot(bt,!1)}),Oe("paste",je,tr),H(P,de)},xn=P=>{H(P,uQ())};ge(qt,P=>{h?P(xn,!1):P(Un)}),ar(Ln,P=>j(M,P),()=>c(M));var so=ee(Ln,2),Pt=P=>{y$(P,{onClose:()=>j(et,!1)})};ge(so,P=>{c(et)&&P(Pt)});var fn=ee(so,2),ln=P=>{w$(P,Ia(()=>c(oe),{onClose:()=>{var de;(de=c(oe))===null||de===void 0||de.onClose(),j(oe,void 0)}}))};return ge(fn,P=>{c(oe)&&P(ln)}),$e(()=>lt(Ln,"no-main-menu",!v())),Oe("mousedown",Ln,function(P){if(P.buttons===1||P.buttons===2){var de=P.target;de.isContentEditable||Ve();var Ce=qA(de);if(Ce){if(Bo(c(te))&&nh(c(q),c(te),Ce))return;j(te,mn(Ce)),P.preventDefault()}}}),Oe("keydown",Ln,function(P){var de=oa(P);if(i("keydown",{combo:de,key:P.key}),de==="Ctrl+X"&&(P.preventDefault(),Qe(!0)),de==="Ctrl+Shift+X"&&(P.preventDefault(),Qe(!1)),de==="Ctrl+C"&&(P.preventDefault(),nn(!0)),de==="Ctrl+Shift+C"&&(P.preventDefault(),nn(!1)),de==="Ctrl+D"&&(P.preventDefault(),ke()),de!=="Delete"&&de!=="Backspace"||(P.preventDefault(),yn()),de==="Insert"&&P.preventDefault(),de==="Ctrl+A"&&P.preventDefault(),de==="Ctrl+Q"&&$r(P),de==="ArrowLeft"&&(P.preventDefault(),Qt(),c(te))){var Ce=function(St,Zt){var{rowIndex:Ht,columnIndex:Qn}=fi(ht(Zt),St);return Qn>0?mn(ul({rowIndex:Ht,columnIndex:Qn-1},St)):Zt}(c(Ge),c(te));j(te,Ce),Sn(ht(Ce))}if(de==="ArrowRight"&&(P.preventDefault(),Qt(),c(te))){var je=function(St,Zt){var{rowIndex:Ht,columnIndex:Qn}=fi(ht(Zt),St);return Qn0?mn(ul({rowIndex:Ht-1,columnIndex:Qn},St)):Zt}(c(Ge),c(te));j(te,Te),Sn(ht(Te))}if(de==="ArrowDown"&&(P.preventDefault(),Qt(),c(te))){var Ke=function(St,Zt,Ht){var{rowIndex:Qn,columnIndex:_r}=fi(ht(Ht),Zt);return Qnj(Q,Pe)}).get()),M=U(a());function C(Pe){if(Mk(Pe)){j(M,Pe.undo.mode);var O=c(Q).items(),T=O.findIndex(ne=>ne===Pe),N=T!==-1?O[T-1]:void 0;I("handleUndo",{index:T,item:Pe,items:O,prevItem:N}),N&&r(N.redo.selection),_()(c(M))}}function $(Pe){if(Mk(Pe)){j(M,Pe.redo.mode);var O=c(Q).items(),T=O.findIndex(ne=>ne===Pe),N=T!==-1?O[T+1]:void 0;I("handleRedo",{index:T,item:Pe,items:O,nextItem:N}),N&&r(N.undo.selection),_()(c(M))}}var oe=U(),_e={type:"separator"},q=U(),K=U();function L(Pe){if(c(be))return c(be).patch(Pe);if(c(fe))return c(fe).patch(Pe);if(c(J))return c(J).patch(Pe);throw new Error('Method patch is not available in mode "'.concat(c(M),'"'))}function xe(Pe,O){if(c(be))return c(be).expand(Pe,O);throw new Error('Method expand is not available in mode "'.concat(c(M),'"'))}function Je(Pe,O){if(c(be))return c(be).collapse(Pe,O);throw new Error('Method collapse is not available in mode "'.concat(c(M),'"'))}function ce(Pe){if(c(J))c(J).openTransformModal(Pe);else if(c(be))c(be).openTransformModal(Pe);else{if(!c(fe))throw new Error('Method transform is not available in mode "'.concat(c(M),'"'));c(fe).openTransformModal(Pe)}}function ae(){if(c(J))return c(J).validate();if(c(be))return c(be).validate();if(c(fe))return c(fe).validate();throw new Error('Method validate is not available in mode "'.concat(c(M),'"'))}function W(){return c(be)?c(be).acceptAutoRepair():n()}function it(Pe){if(c(be))return c(be).scrollTo(Pe);if(c(fe))return c(fe).scrollTo(Pe);throw new Error('Method scrollTo is not available in mode "'.concat(c(M),'"'))}function vt(Pe){if(c(be))return c(be).findElement(Pe);if(c(fe))return c(fe).findElement(Pe);throw new Error('Method findElement is not available in mode "'.concat(c(M),'"'))}function rt(){c(J)?c(J).focus():c(be)?c(be).focus():c(fe)&&c(fe).focus()}function Ee(){return Ge.apply(this,arguments)}function Ge(){return(Ge=gt(function*(){c(J)&&(yield c(J).refresh())})).apply(this,arguments)}ie(()=>B(a()),()=>{(function(Pe){if(Pe!==c(M)){var O={type:"mode",undo:{mode:c(M),selection:void 0},redo:{mode:Pe,selection:void 0}};c(M)==="text"&&c(J)&&c(J).flush(),I("add history item",O),c(Q).add(O),j(M,Pe)}})(a())}),ie(()=>(c(M),B(_())),()=>{j(oe,[{type:"button",text:"text",title:"Switch to text mode (current mode: ".concat(c(M),")"),className:"jse-group-button jse-first"+(c(M)===Gr.text?" jse-selected":""),onClick:()=>_()(Gr.text)},{type:"button",text:"tree",title:"Switch to tree mode (current mode: ".concat(c(M),")"),className:"jse-group-button "+(c(M)===Gr.tree?" jse-selected":""),onClick:()=>_()(Gr.tree)},{type:"button",text:"table",title:"Switch to table mode (current mode: ".concat(c(M),")"),className:"jse-group-button jse-last"+(c(M)===Gr.table?" jse-selected":""),onClick:()=>_()(Gr.table)}])}),ie(()=>(c(oe),B(z()),c(M),B(S()),B(o())),()=>{j(q,Pe=>{var O=VA(Pe[0])?c(oe).concat(Pe):c(oe).concat(_e,Pe),T=r0(O);return z()(O,{mode:c(M),modal:S(),readOnly:o()})||T})}),ie(()=>(B(G()),c(M),B(S()),B(o()),B(r())),()=>{j(K,Pe=>{var O,T=r0(Pe);return(O=G()(Pe,{mode:c(M),modal:S(),readOnly:o(),selection:r()}))!==null&&O!==void 0?O:!o()&&T})}),En(),_t();var Ue=un(),ft=tt(Ue),Et=Pe=>{ar(VG(Pe,{get externalContent(){return n()},get externalSelection(){return r()},get history(){return c(Q)},get readOnly(){return o()},get indentation(){return i()},get tabSize(){return s()},get mainMenuBar(){return l()},get statusBar(){return d()},get askToFormat(){return h()},get escapeUnicodeCharacters(){return p()},get parser(){return b()},get validator(){return g()},get validationParser(){return y()},get onChange(){return w()},get onChangeMode(){return _()},get onSelect(){return A()},onUndo:C,onRedo:$,get onError(){return F()},get onFocus(){return se()},get onBlur(){return pe()},get onRenderMenu(){return c(q)},get onSortModal(){return re()},get onTransformModal(){return Z()},$$legacy:!0}),O=>j(J,O),()=>c(J))},et=Pe=>{var O=un(),T=tt(O),N=X=>{ar(hQ(X,{get externalContent(){return n()},get externalSelection(){return r()},get history(){return c(Q)},get readOnly(){return o()},get mainMenuBar(){return l()},get escapeControlCharacters(){return f()},get escapeUnicodeCharacters(){return p()},get flattenColumns(){return m()},get parser(){return b()},get parseMemoizeOne(){return v()},get validator(){return g()},get validationParser(){return y()},get indentation(){return i()},get onChange(){return w()},get onChangeMode(){return _()},get onSelect(){return A()},onUndo:C,onRedo:$,get onRenderValue(){return D()},get onFocus(){return se()},get onBlur(){return pe()},get onRenderMenu(){return c(q)},get onRenderContextMenu(){return c(K)},get onSortModal(){return re()},get onTransformModal(){return Z()},get onJSONEditorModal(){return he()},$$legacy:!0}),me=>j(fe,me),()=>c(fe))},ne=X=>{ar(Vb(X,{get externalContent(){return n()},get externalSelection(){return r()},get history(){return c(Q)},get readOnly(){return o()},get indentation(){return i()},get mainMenuBar(){return l()},get navigationBar(){return u()},get escapeControlCharacters(){return f()},get escapeUnicodeCharacters(){return p()},get parser(){return b()},get parseMemoizeOne(){return v()},get validator(){return g()},get validationParser(){return y()},get pathParser(){return k()},get onError(){return F()},get onChange(){return w()},get onChangeMode(){return _()},get onSelect(){return A()},onUndo:C,onRedo:$,get onRenderValue(){return D()},get onClassName(){return E()},get onFocus(){return se()},get onBlur(){return pe()},get onRenderMenu(){return c(q)},get onRenderContextMenu(){return c(K)},get onSortModal(){return re()},get onTransformModal(){return Z()},get onJSONEditorModal(){return he()},$$legacy:!0}),me=>j(be,me),()=>c(be))};ge(T,X=>{c(M)===Gr.table?X(N):X(ne,!1)},!0),H(Pe,O)};return ge(ft,Pe=>{c(M)===Gr.text||String(c(M))==="code"?Pe(Et):Pe(et,!1)}),H(t,Ue),zt(e,"patch",L),zt(e,"expand",xe),zt(e,"collapse",Je),zt(e,"transform",ce),zt(e,"validate",ae),zt(e,"acceptAutoRepair",W),zt(e,"scrollTo",it),zt(e,"findElement",vt),zt(e,"focus",rt),zt(e,"refresh",Ee),jt({patch:L,expand:xe,collapse:Je,transform:ce,validate:ae,acceptAutoRepair:W,scrollTo:it,findElement:vt,focus:rt,refresh:Ee})}It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-modal-wrapper.svelte-v0el4e { + flex: 1; + display: flex; + min-width: 0; + min-height: 0; + flex-direction: column; +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) { + flex: 1; + display: flex; + flex-direction: column; + padding: 20px; + overflow: auto; + min-width: 0; + min-height: 0; +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-actions:where(.svelte-v0el4e) { + display: flex; + flex-direction: row; + justify-content: flex-end; + padding-top: var(--jse-padding, 10px); +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-actions:where(.svelte-v0el4e) button.jse-primary:where(.svelte-v0el4e) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-primary-background, var(--jse-theme-color, #3883fa)); + color: var(--jse-button-primary-color, #fff); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-actions:where(.svelte-v0el4e) button.jse-primary:where(.svelte-v0el4e):hover { + background: var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff)); +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-actions:where(.svelte-v0el4e) button.jse-primary:where(.svelte-v0el4e):disabled { + background: var(--jse-button-primary-background-disabled, #9d9d9d); +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-label:where(.svelte-v0el4e) { + font-weight: bold; + display: block; + box-sizing: border-box; +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-label:where(.svelte-v0el4e) .jse-label-inner:where(.svelte-v0el4e) { + margin-top: calc(2 * var(--jse-padding, 10px)); + margin-bottom: calc(0.5 * var(--jse-padding, 10px)); + box-sizing: border-box; +} +.jse-modal-wrapper.svelte-v0el4e .jse-modal-contents:where(.svelte-v0el4e) .jse-modal-inline-editor:where(.svelte-v0el4e) { + flex: 1; + min-height: 150px; + min-width: 0; + max-width: 100%; + display: flex; + --jse-theme-color: var(--jse-modal-editor-theme-color, #707070); + --jse-theme-color-highlight: var(--jse-modal-editor-theme-color-highlight, #646464); +} +.jse-modal-wrapper.svelte-v0el4e .jse-actions:where(.svelte-v0el4e) { + gap: var(--jse-padding, 10px); + align-items: center; +} +.jse-modal-wrapper.svelte-v0el4e .jse-actions:where(.svelte-v0el4e) .jse-error:where(.svelte-v0el4e) { + flex: 1; + color: var(--jse-error-color, #ee5341); +} +.jse-modal-wrapper.svelte-v0el4e .jse-actions:where(.svelte-v0el4e) button.jse-secondary:where(.svelte-v0el4e) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-secondary-background, #d3d3d3); + color: var(--jse-button-secondary-color, var(--jse-text-color, #4d4d4d)); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-modal-wrapper.svelte-v0el4e .jse-actions:where(.svelte-v0el4e) button.jse-secondary:where(.svelte-v0el4e):hover { + background: var(--jse-button-secondary-background-highlight, #e1e1e1); +} +.jse-modal-wrapper.svelte-v0el4e .jse-actions:where(.svelte-v0el4e) button.jse-secondary:where(.svelte-v0el4e):disabled { + background: var(--jse-button-secondary-background-disabled, #9d9d9d); +} +.jse-modal-wrapper.svelte-v0el4e input:where(.svelte-v0el4e) { + border: var(--jse-input-border, 1px solid #d8dbdf); + outline: none; + box-sizing: border-box; + padding: calc(0.5 * var(--jse-padding, 10px)); + font-family: var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace); + font-size: var(--jse-font-size-mono, 14px); + color: inherit; + background: var(--jse-input-background, var(--jse-background-color, #fff)); +} +.jse-modal-wrapper.svelte-v0el4e input:where(.svelte-v0el4e):focus { + border: var(--jse-input-border-focus, 1px solid var(--jse-input-border-focus, var(--jse-theme-color, #3883fa))); +} +.jse-modal-wrapper.svelte-v0el4e input:where(.svelte-v0el4e):read-only { + background: var(--jse-input-background-readonly, transparent); +}`);var fQ=ue('
      '),pQ=ue(''),mQ=ue(''),gQ=ue(''),vQ=ue('
      Path
      Contents
      ',1),bQ=ue('
      '),yQ={};It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-modal-contents.svelte-1v9c92j { + flex: 1; + display: flex; + flex-direction: column; + padding: 20px; + overflow: auto; + min-width: 0; + min-height: 0; +} +.jse-modal-contents.svelte-1v9c92j .jse-actions:where(.svelte-1v9c92j) { + display: flex; + flex-direction: row; + justify-content: flex-end; + padding-top: var(--jse-padding, 10px); +} +.jse-modal-contents.svelte-1v9c92j .jse-actions:where(.svelte-1v9c92j) button.jse-primary:where(.svelte-1v9c92j) { + border: none; + background: transparent; + color: inherit; + cursor: pointer; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + padding: 5px; + margin: 0; + background: var(--jse-button-primary-background, var(--jse-theme-color, #3883fa)); + color: var(--jse-button-primary-color, #fff); + padding: var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)); + border-radius: 3px; +} +.jse-modal-contents.svelte-1v9c92j .jse-actions:where(.svelte-1v9c92j) button.jse-primary:where(.svelte-1v9c92j):hover { + background: var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff)); +} +.jse-modal-contents.svelte-1v9c92j .jse-actions:where(.svelte-1v9c92j) button.jse-primary:where(.svelte-1v9c92j):disabled { + background: var(--jse-button-primary-background-disabled, #9d9d9d); +} +.jse-modal-contents.svelte-1v9c92j table:where(.svelte-1v9c92j) { + width: 100%; + border-collapse: collapse; + border-spacing: 0; +} +.jse-modal-contents.svelte-1v9c92j table:where(.svelte-1v9c92j) th:where(.svelte-1v9c92j), +.jse-modal-contents.svelte-1v9c92j table:where(.svelte-1v9c92j) td:where(.svelte-1v9c92j) { + text-align: left; + vertical-align: middle; + font-weight: normal; + padding-bottom: var(--jse-padding, 10px); +} +.jse-modal-contents.svelte-1v9c92j input.jse-path:where(.svelte-1v9c92j) { + width: 100%; + box-sizing: border-box; + padding: 5px 10px; + border: var(--jse-input-border, 1px solid #d8dbdf); + border-radius: var(--jse-input-radius, 3px); + font-family: inherit; + font-size: inherit; + background: inherit; + background: var(--jse-input-background-readonly, transparent); + color: inherit; + outline: none; +} +.jse-modal-contents.svelte-1v9c92j .svelte-select input { + box-sizing: border-box; +} +.jse-modal-contents.svelte-1v9c92j .jse-space:where(.svelte-1v9c92j) { + height: 200px; +} +.jse-modal-contents.svelte-1v9c92j .jse-space:where(.svelte-1v9c92j) .jse-error:where(.svelte-1v9c92j) { + color: var(--jse-error-color, #ee5341); +}`);var fc=hg(()=>yQ),wQ=ue('Property'),xQ=ue('
      '),jQ=ue('
      Path
      Direction
      ',1);It(`/* over all fonts, sizes, and colors */ +/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */ +/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */ +/* main, menu, modal */ +/* jsoneditor modal */ +/* tooltip in text mode */ +/* panels: navigation bar, gutter, search box */ +/* navigation-bar */ +/* context menu */ +/* contents: json key and values */ +/* contents: selected or hovered */ +/* contents: section of collapsed items in an array */ +/* contents: highlighting of search matches */ +/* contents: inline tags inside the JSON document */ +/* contents: table */ +/* controls in modals: inputs, buttons, and \`a\` */ +/* messages */ +/* svelte-select */ +/* color picker */ +.jse-main.svelte-57bmz4 { + width: 100%; + height: 100%; + min-width: 0; + min-height: 150px; + font-family: var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif); + font-size: var(--jse-font-size, 16px); + line-height: normal; + position: relative; + display: flex; + flex-direction: row; +} +.jse-main.svelte-57bmz4:not(.jse-focus) { + --jse-selection-background-color: var(--jse-selection-background-inactive-color, #e8e8e8); + --jse-context-menu-pointer-background: var(--jse-context-menu-pointer-hover-background, #b2b2b2); +}`);var kQ=ue('
      ',1);function SQ(t,e){xt(e,!1);var n=U(void 0,!0),r=ro("jsoneditor:JSONEditor"),o={text:""},i=void 0,s=!1,a=Gr.tree,l=!0,u=!0,d=!0,h=!0,f=!1,p=!1,m=!0,b=JSON,v=void 0,g=JSON,y={parse:UW,stringify:Wi},k=[cW],S=k[0].id,w=pi,_=void 0,A=void 0,D=qW,E=pi,z=pi,G=pi,F=pi,se=ke=>{console.error(ke),alert(ke.toString())},pe=pi,re=pi,Z=x(e,"content",13,o),he=x(e,"selection",13,i),be=x(e,"readOnly",13,s),fe=x(e,"indentation",13,2),J=x(e,"tabSize",13,4),I=x(e,"mode",13,a),Q=x(e,"mainMenuBar",13,l),M=x(e,"navigationBar",13,u),C=x(e,"statusBar",13,d),$=x(e,"askToFormat",13,h),oe=x(e,"escapeControlCharacters",13,f),_e=x(e,"escapeUnicodeCharacters",13,p),q=x(e,"flattenColumns",13,m),K=x(e,"parser",13,b),L=x(e,"validator",13,v),xe=x(e,"validationParser",13,g),Je=x(e,"pathParser",13,y),ce=x(e,"queryLanguages",13,k),ae=x(e,"queryLanguageId",13,S),W=x(e,"onChangeQueryLanguage",13,w),it=x(e,"onChange",13,_),vt=x(e,"onSelect",13,A),rt=x(e,"onRenderValue",13,D),Ee=x(e,"onClassName",13,E),Ge=x(e,"onRenderMenu",13,z),Ue=x(e,"onRenderContextMenu",13,G),ft=x(e,"onChangeMode",13,F),Et=x(e,"onError",13,se),et=x(e,"onFocus",13,pe),Pe=x(e,"onBlur",13,re),O=U(Oc(),!0),T=U(!1,!0),N=U(void 0,!0),ne=U(void 0,!0),X=U(void 0,!0),me=U(void 0,!0),te=U(K(),!0);function qe(){return Z()}function Me(ke){return mt.apply(this,arguments)}function mt(){return(mt=gt(function*(ke){r("set");var Ye=jv(ke);if(Ye)throw new Error(Ye);j(O,Oc()),Z(ke)})).apply(this,arguments)}function Bt(ke){return We.apply(this,arguments)}function We(){return(We=gt(function*(ke){r("update");var Ye=jv(ke);if(Ye)throw new Error(Ye);Z(ke),yield Pr()})).apply(this,arguments)}function on(ke){return ut.apply(this,arguments)}function ut(){return(ut=gt(function*(ke){var Ye=c(N).patch(ke);return yield Pr(),Ye})).apply(this,arguments)}function $n(ke){return Pn.apply(this,arguments)}function Pn(){return(Pn=gt(function*(ke){he(ke),yield Pr()})).apply(this,arguments)}function en(ke,Ye){return Tt.apply(this,arguments)}function Tt(){return(Tt=gt(function*(ke,Ye){c(N).expand(ke,Ye),yield Pr()})).apply(this,arguments)}function hn(ke){return Kn.apply(this,arguments)}function Kn(){return Kn=gt(function*(ke){var Ye=arguments.length>1&&arguments[1]!==void 0&&arguments[1];c(N).collapse(ke,Ye),yield Pr()}),Kn.apply(this,arguments)}function lr(ke){c(N).transform(ke)}function Ve(){return c(N).validate()}function kt(){return Qt.apply(this,arguments)}function Qt(){return Qt=gt(function*(){var ke=c(N).acceptAutoRepair();return yield Pr(),ke}),Qt.apply(this,arguments)}function tn(ke){return an.apply(this,arguments)}function an(){return(an=gt(function*(ke){yield c(N).scrollTo(ke)})).apply(this,arguments)}function kn(ke){return c(N).findElement(ke)}function Sn(){return Yn.apply(this,arguments)}function Yn(){return(Yn=gt(function*(){c(N).focus(),yield Pr()})).apply(this,arguments)}function zn(){return $r.apply(this,arguments)}function $r(){return($r=gt(function*(){yield c(N).refresh()})).apply(this,arguments)}function vr(ke){return zr.apply(this,arguments)}function zr(){return(zr=gt(function*(ke){var Ye,pt,sn,Nn,tr,Ut,qn,Qr,Yr,Yt,wn,dt,Y,ve,He,Xt,Vt,Ft,Ln,Br,br,qt,Un,xn,so,Pt,fn,ln,P,de,Ce=Object.keys(ke);for(var je of Ce)switch(je){case"content":Z((Ye=ke[je])!==null&&Ye!==void 0?Ye:o);break;case"selection":he((pt=ke[je])!==null&&pt!==void 0?pt:i);break;case"readOnly":be((sn=ke[je])!==null&&sn!==void 0?sn:s);break;case"indentation":fe((Nn=ke[je])!==null&&Nn!==void 0?Nn:2);break;case"tabSize":J((tr=ke[je])!==null&&tr!==void 0?tr:4);break;case"mode":I((Ut=ke[je])!==null&&Ut!==void 0?Ut:a);break;case"mainMenuBar":Q((qn=ke[je])!==null&&qn!==void 0?qn:l);break;case"navigationBar":M((Qr=ke[je])!==null&&Qr!==void 0?Qr:u);break;case"statusBar":C((Yr=ke[je])!==null&&Yr!==void 0?Yr:d);break;case"askToFormat":$((Yt=ke[je])!==null&&Yt!==void 0?Yt:h);break;case"escapeControlCharacters":oe((wn=ke[je])!==null&&wn!==void 0?wn:f);break;case"escapeUnicodeCharacters":_e((dt=ke[je])!==null&&dt!==void 0?dt:p);break;case"flattenColumns":q((Y=ke[je])!==null&&Y!==void 0?Y:m);break;case"parser":K((ve=ke[je])!==null&&ve!==void 0?ve:b);break;case"validator":L((He=ke[je])!==null&&He!==void 0?He:v);break;case"validationParser":xe((Xt=ke[je])!==null&&Xt!==void 0?Xt:g);break;case"pathParser":Je((Vt=ke[je])!==null&&Vt!==void 0?Vt:y);break;case"queryLanguages":ce((Ft=ke[je])!==null&&Ft!==void 0?Ft:k);break;case"queryLanguageId":ae((Ln=ke[je])!==null&&Ln!==void 0?Ln:S);break;case"onChangeQueryLanguage":W((Br=ke[je])!==null&&Br!==void 0?Br:w);break;case"onChange":it((br=ke[je])!==null&&br!==void 0?br:_);break;case"onRenderValue":rt((qt=ke[je])!==null&&qt!==void 0?qt:D);break;case"onClassName":Ee((Un=ke[je])!==null&&Un!==void 0?Un:E);break;case"onRenderMenu":Ge((xn=ke[je])!==null&&xn!==void 0?xn:z);break;case"onRenderContextMenu":Ue((so=ke[je])!==null&&so!==void 0?so:G);break;case"onChangeMode":ft((Pt=ke[je])!==null&&Pt!==void 0?Pt:F);break;case"onSelect":vt((fn=ke[je])!==null&&fn!==void 0?fn:A);break;case"onError":Et((ln=ke[je])!==null&&ln!==void 0?ln:se);break;case"onFocus":et((P=ke[je])!==null&&P!==void 0?P:pe);break;case"onBlur":Pe((de=ke[je])!==null&&de!==void 0?de:re);break;default:Te(je)}function Te(Ke){r('Unknown property "'.concat(Ke,'"'))}ce().some(Ke=>Ke.id===ae())||ae(ce()[0].id),yield Pr()})).apply(this,arguments)}function cr(){return oo.apply(this,arguments)}function oo(){return(oo=gt(function*(){throw new Error("class method destroy() is deprecated. It is replaced with a method destroy() in the vanilla library.")})).apply(this,arguments)}function Vr(ke,Ye,pt){Z(ke),it()&&it()(ke,Ye,pt)}function er(ke){he(ke),vt()&&vt()(r0(ke))}function io(){j(T,!0),et()&&et()()}function Lr(){j(T,!1),Pe()&&Pe()()}function ye(ke){return Qe.apply(this,arguments)}function Qe(){return(Qe=gt(function*(ke){I()!==ke&&(I(ke),yield Pr(),yield Sn(),ft()(ke))})).apply(this,arguments)}function Dt(ke){r("handleChangeQueryLanguage",ke),ae(ke),W()(ke)}function nn(ke){var{id:Ye,json:pt,rootPath:sn,onTransform:Nn,onClose:tr}=ke;be()||j(me,{id:Ye,json:pt,rootPath:sn,indentation:fe(),escapeControlCharacters:oe(),escapeUnicodeCharacters:_e(),parser:K(),parseMemoizeOne:c(n),validationParser:xe(),pathParser:Je(),queryLanguages:ce(),queryLanguageId:ae(),onChangeQueryLanguage:Dt,onRenderValue:rt(),onRenderMenu:Ut=>Ge()(Ut,{mode:I(),modal:!0,readOnly:be()}),onRenderContextMenu:Ut=>Ue()(Ut,{mode:I(),modal:!0,readOnly:be(),selection:he()}),onClassName:Ee(),onTransform:Nn,onClose:tr})}function Wt(ke){be()||j(X,ke)}function yn(ke){var{content:Ye,path:pt,onPatch:sn,onClose:Nn}=ke;r("onJSONEditorModal",{content:Ye,path:pt}),j(ne,{content:Ye,path:pt,onPatch:sn,readOnly:be(),indentation:fe(),tabSize:J(),mainMenuBar:Q(),navigationBar:M(),statusBar:C(),askToFormat:$(),escapeControlCharacters:oe(),escapeUnicodeCharacters:_e(),flattenColumns:q(),parser:K(),validator:void 0,validationParser:xe(),pathParser:Je(),onRenderValue:rt(),onClassName:Ee(),onRenderMenu:Ge(),onRenderContextMenu:Ue(),onSortModal:Wt,onTransformModal:nn,onClose:Nn})}return ie(()=>(B(K()),c(te),B(Z()),Oc),()=>{if(!GH(K(),c(te))){if(r("parser changed, recreate editor"),Qd(Z())){var ke=c(te).stringify(Z().json);Z({json:ke!==void 0?K().parse(ke):void 0})}j(te,K()),j(O,Oc())}}),ie(()=>B(Z()),()=>{var ke=jv(Z());ke&&console.error("Error: "+ke)}),ie(()=>B(he()),()=>{he()===null&&console.warn("selection is invalid: it is null but should be undefined")}),ie(()=>B(K()),()=>{j(n,Od(K().parse))}),ie(()=>B(I()),()=>{r("mode changed to",I())}),En(),_t(!0),Ob(t,{children:(ke,Ye)=>{var pt=kQ(),sn=tt(pt);SA(V(sn),()=>c(O),Yt=>{ar(sS(Yt,{get externalMode(){return I()},get content(){return Z()},get selection(){return he()},get readOnly(){return be()},get indentation(){return fe()},get tabSize(){return J()},get statusBar(){return C()},get askToFormat(){return $()},get mainMenuBar(){return Q()},get navigationBar(){return M()},get escapeControlCharacters(){return oe()},get escapeUnicodeCharacters(){return _e()},get flattenColumns(){return q()},get parser(){return K()},get parseMemoizeOne(){return c(n)},get validator(){return L()},get validationParser(){return xe()},get pathParser(){return Je()},insideModal:!1,get onError(){return Et()},onChange:Vr,onChangeMode:ye,onSelect:er,get onRenderValue(){return rt()},get onClassName(){return Ee()},onFocus:io,onBlur:Lr,get onRenderMenu(){return Ge()},get onRenderContextMenu(){return Ue()},onSortModal:Wt,onTransformModal:nn,onJSONEditorModal:yn,$$legacy:!0}),wn=>j(N,wn),()=>c(N))});var Nn=ee(sn,2),tr=Yt=>{(function(wn,dt){var Y,ve;xt(dt,!1);var He=U(void 0,!0),Xt=U(void 0,!0),Vt=U(void 0,!0),Ft=U(void 0,!0),Ln=ro("jsoneditor:SortModal"),Br=x(dt,"id",9),br=x(dt,"json",9),qt=x(dt,"rootPath",9),Un=x(dt,"onSort",9),xn=x(dt,"onClose",9),so={value:1,label:"ascending"},Pt=[so,{value:-1,label:"descending"}],fn="".concat(Br(),":").concat(yt(qt())),ln=U((Y=fc()[fn])===null||Y===void 0?void 0:Y.selectedProperty,!0),P=U(((ve=fc()[fn])===null||ve===void 0?void 0:ve.selectedDirection)||so,!0),de=U(void 0,!0);function Ce(){try{var Te,Ke,bt;j(de,void 0);var ot=((Te=c(ln))===null||Te===void 0?void 0:Te.value)||((Ke=c(Ft))===null||Ke===void 0||(Ke=Ke[0])===null||Ke===void 0?void 0:Ke.value)||[],St=(bt=c(P))===null||bt===void 0?void 0:bt.value,Zt=j$(br(),qt(),ot,St);Un()!==void 0&&qt()!==void 0&&Un()({operations:Zt,rootPath:qt(),itemPath:ot,direction:St}),xn()()}catch(Ht){j(de,String(Ht))}}function je(Te){Te.focus()}ie(()=>(B(br()),B(qt())),()=>{j(He,Ze(br(),qt()))}),ie(()=>c(He),()=>{j(Xt,Array.isArray(c(He)))}),ie(()=>(c(Xt),c(He)),()=>{j(Vt,c(Xt)?kb(c(He)):void 0)}),ie(()=>(c(Vt),xa),()=>{j(Ft,c(Vt)?c(Vt).map(xa):void 0)}),ie(()=>(fc(),c(ln),c(P)),()=>{fc(fc()[fn]={selectedProperty:c(ln),selectedDirection:c(P)}),Ln("store state in memory",fn,fc()[fn])}),En(),_t(!0),ih(wn,{get onClose(){return xn()},className:"jse-sort-modal",children:(Te,Ke)=>{var bt=jQ(),ot=tt(bt),St=Fe(()=>c(Xt)?"Sort array items":"Sort object keys");ym(ot,{get title(){return c(St)},get onClose(){return xn()}});var Zt=V(ee(ot,2)),Ht=ee(V(Zt)),Qn=V(Ht),_r=ee(V(Qn)),R=V(_r);$e(()=>Fl(R,qt()&&!Jn(qt())?Wi(qt()):"(document root)"));var le=ee(Qn),Se=Kt=>{var Jt=wQ(),Vn=ee(V(Jt));bl(V(Vn),{showChevron:!0,get items(){return c(Ft)},get value(){return c(ln)},set value($t){j(ln,$t)},$$legacy:!0}),H(Kt,Jt)};ge(le,Kt=>{var Jt;c(Xt)&&(c(Ft)&&((Jt=c(Ft))===null||Jt===void 0?void 0:Jt.length)>1||c(ln)===void 0)&&Kt(Se)});var Re=ee(le),Ne=ee(V(Re));bl(V(Ne),{showChevron:!0,clearable:!1,items:Pt,get value(){return c(P)},set value(Kt){j(P,Kt)},$$legacy:!0});var Ie=ee(Zt,2),Ct=V(Ie),Ot=Kt=>{var Jt=xQ(),Vn=V(Jt);$e(()=>Mt(Vn,c(de))),H(Kt,Jt)};ge(Ct,Kt=>{c(de)&&Kt(Ot)});var At=V(ee(Ie,2));ho(()=>Oe("click",At,Ce)),To(At,Kt=>je==null?void 0:je(Kt)),$e(()=>{var Kt;return At.disabled=!!(c(Xt)&&c(Ft)&&((Kt=c(Ft))===null||Kt===void 0?void 0:Kt.length)>1)&&!c(ln)}),H(Te,bt)},$$slots:{default:!0}}),jt()})(Yt,Ia(()=>c(X),{onClose:()=>{var wn;(wn=c(X))===null||wn===void 0||wn.onClose(),j(X,void 0)}}))};ge(Nn,Yt=>{c(X)&&Yt(tr)});var Ut=ee(Nn,2),qn=Yt=>{TG(Yt,Ia(()=>c(me),{onClose:()=>{var wn;(wn=c(me))===null||wn===void 0||wn.onClose(),j(me,void 0)}}))};ge(Ut,Yt=>{c(me)&&Yt(qn)});var Qr=ee(Ut,2),Yr=Yt=>{(function(wn,dt){xt(dt,!1);var Y=U(void 0,!0),ve=U(void 0,!0),He=U(void 0,!0),Xt=U(void 0,!0),Vt=ro("jsoneditor:JSONEditorModal"),Ft=x(dt,"content",9),Ln=x(dt,"path",9),Br=x(dt,"onPatch",9),br=x(dt,"readOnly",9),qt=x(dt,"indentation",9),Un=x(dt,"tabSize",9),xn=x(dt,"mainMenuBar",9),so=x(dt,"navigationBar",9),Pt=x(dt,"statusBar",9),fn=x(dt,"askToFormat",9),ln=x(dt,"escapeControlCharacters",9),P=x(dt,"escapeUnicodeCharacters",9),de=x(dt,"flattenColumns",9),Ce=x(dt,"parser",9),je=x(dt,"validator",9),Te=x(dt,"validationParser",9),Ke=x(dt,"pathParser",9),bt=x(dt,"onRenderValue",9),ot=x(dt,"onClassName",9),St=x(dt,"onRenderMenu",9),Zt=x(dt,"onRenderContextMenu",9),Ht=x(dt,"onSortModal",9),Qn=x(dt,"onTransformModal",9),_r=x(dt,"onClose",9),R=U(void 0,!0),le=U(void 0,!0),Se={mode:Ie(Ft()),content:Ft(),selection:void 0,relativePath:Ln()},Re=U([Se],!0),Ne=U(void 0,!0);function Ie(ze){return Qd(ze)&&Cr(ze.json)?Gr.table:Gr.tree}function Ct(){var ze,Le=(ze=dn(c(Re)))===null||ze===void 0?void 0:ze.selection;th(Le)&&c(R).scrollTo(ht(Le))}function Ot(){if(Vt("handleApply"),!br())try{j(Ne,void 0);var ze=c(Y).relativePath,Le=c(Y).content,Rt=[{op:"replace",path:yt(ze),value:jk(Le,Ce()).json}];if(c(Re).length>1){var Rn=jk(c(Re)[c(Re).length-2].content,Ce()).json,cn={json:Ki(Rn,Rt)},Hn=De(De({},c(Re)[c(Re).length-2]||Se),{},{content:cn});j(Re,[...c(Re).slice(0,c(Re).length-2),Hn]),Pr().then(Ct)}else Br()(Rt),_r()()}catch(Er){j(Ne,String(Er))}}function At(){Vt("handleClose"),c(le)?j(le,!1):c(Re).length>1?(j(Re,jn(c(Re))),Pr().then(()=>{var ze;(ze=c(R))===null||ze===void 0||ze.focus(),Ct()}),j(Ne,void 0)):_r()()}function Kt(ze){Vt("handleChange",ze),$t(Le=>De(De({},Le),{},{content:ze}))}function Jt(ze){Vt("handleChangeSelection",ze),$t(Le=>De(De({},Le),{},{selection:ze}))}function Vn(ze){Vt("handleChangeMode",ze),$t(Le=>De(De({},Le),{},{mode:ze}))}function $t(ze){var Le=ze(dn(c(Re)));j(Re,[...jn(c(Re)),Le])}function fr(ze){j(Ne,ze.toString()),console.error(ze)}function Xn(ze){var{content:Le,path:Rt}=ze;Vt("handleJSONEditorModal",{content:Le,path:Rt});var Rn={mode:Ie(Le),content:Le,selection:void 0,relativePath:Rt};j(Re,[...c(Re),Rn]),Pr().then(()=>{var cn;return(cn=c(R))===null||cn===void 0?void 0:cn.focus()})}function Gt(ze){ze.focus()}ko(()=>{var ze;(ze=c(R))===null||ze===void 0||ze.focus()}),ie(()=>c(Re),()=>{j(Y,dn(c(Re))||Se)}),ie(()=>c(Re),()=>{j(ve,c(Re).flatMap(ze=>ze.relativePath))}),ie(()=>(c(ve),Wi),()=>{j(He,Jn(c(ve))?"(document root)":Wi(c(ve)))}),ie(()=>B(Ce()),()=>{j(Xt,Od(Ce().parse))}),En(),_t(!0),ih(wn,{onClose:At,className:"jse-jsoneditor-modal",get fullscreen(){return c(le)},children:(ze,Le)=>{var Rt=bQ();Ob(V(Rt),{children:(Rn,cn)=>{var Hn=vQ(),Er=tt(Hn),nr=Fe(()=>{var Bn;return"Edit nested content ".concat((Bn=c(Re).length>1?" (".concat(c(Re).length,")"):"")!==null&&Bn!==void 0?Bn:"")});ym(Er,{get title(){return c(nr)},fullScreenButton:!0,get fullscreen(){return c(le)},set fullscreen(Bn){j(le,Bn)},onClose:At,$$legacy:!0});var Mr=ee(Er,2),Xr=ee(V(Mr),2),Ti=ee(Xr,4);ar(sS(V(Ti),{get externalMode(){return c(Y).mode},get content(){return c(Y).content},get selection(){return c(Y).selection},get readOnly(){return br()},get indentation(){return qt()},get tabSize(){return Un()},get statusBar(){return Pt()},get askToFormat(){return fn()},get mainMenuBar(){return xn()},get navigationBar(){return so()},get escapeControlCharacters(){return ln()},get escapeUnicodeCharacters(){return P()},get flattenColumns(){return de()},get parser(){return Ce()},get parseMemoizeOne(){return c(Xt)},get validator(){return je()},get validationParser(){return Te()},get pathParser(){return Ke()},insideModal:!0,onError:fr,onChange:Kt,onChangeMode:Vn,onSelect:Jt,get onRenderValue(){return bt()},get onClassName(){return ot()},onFocus:pi,onBlur:pi,get onRenderMenu(){return St()},get onRenderContextMenu(){return Zt()},get onSortModal(){return Ht()},get onTransformModal(){return Qn()},onJSONEditorModal:Xn,$$legacy:!0}),Bn=>j(R,Bn),()=>c(R));var Fr=V(ee(Ti,2)),Vo=Bn=>{var Tr=fQ(),Ho=V(Tr);$e(()=>Mt(Ho,c(Ne))),H(Bn,Tr)};ge(Fr,Bn=>{c(Ne)&&Bn(Vo)});var Pi=ee(Fr,2),Ri=Bn=>{var Tr=pQ();vn(V(Tr),{data:TR}),Oe("click",Tr,At),H(Bn,Tr)};ge(Pi,Bn=>{c(Re).length>1&&Bn(Ri)});var Io=ee(Pi,2),rr=Bn=>{var Tr=mQ();ho(()=>Oe("click",Tr,Ot)),To(Tr,Ho=>Gt==null?void 0:Gt(Ho)),H(Bn,Tr)},So=Bn=>{var Tr=gQ();Oe("click",Tr,At),H(Bn,Tr)};ge(Io,Bn=>{br()?Bn(So,!1):Bn(rr)}),$e(()=>Fl(Xr,c(He))),H(Rn,Hn)},$$slots:{default:!0}}),H(ze,Rt)},$$slots:{default:!0}}),jt()})(Yt,Ia(()=>c(ne),{onClose:()=>{var wn;(wn=c(ne))===null||wn===void 0||wn.onClose(),j(ne,void 0)}}))};ge(Qr,Yt=>{c(ne)&&Yt(Yr)}),$e(()=>lt(sn,"jse-focus",c(T))),H(ke,pt)},$$slots:{default:!0}}),zt(e,"get",qe),zt(e,"set",Me),zt(e,"update",Bt),zt(e,"patch",on),zt(e,"select",$n),zt(e,"expand",en),zt(e,"collapse",hn),zt(e,"transform",lr),zt(e,"validate",Ve),zt(e,"acceptAutoRepair",kt),zt(e,"scrollTo",tn),zt(e,"findElement",kn),zt(e,"focus",Sn),zt(e,"refresh",zn),zt(e,"updateProps",vr),zt(e,"destroy",cr),jt({get:qe,set:Me,update:Bt,patch:on,select:$n,expand:en,collapse:hn,transform:lr,validate:Ve,acceptAutoRepair:kt,scrollTo:tn,findElement:kn,focus:Sn,refresh:zn,updateProps:vr,destroy:cr})}function CQ(t){var{target:e,props:n}=t,r=EH(SQ,{target:e,props:n});return r.destroy=gt(function*(){return AH(r),new Promise(o=>setTimeout(o))}),r}f3.util.warn;const OQ=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,_Q=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,EQ=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function AQ(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){$Q(t);return}return e}function $Q(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function dp(t,e={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!EQ.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(OQ.test(t)||_Q.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,AQ)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}function MQ(t,e={}){return dp(t,{...e,strict:!0})}var TQ=typeof global=="object"&&global&&global.Object===Object&&global,PQ=typeof self=="object"&&self&&self.Object===Object&&self,N$=TQ||PQ||Function("return this")(),jm=N$.Symbol,D$=Object.prototype,RQ=D$.hasOwnProperty,NQ=D$.toString,Ju=jm?jm.toStringTag:void 0;function DQ(t){var e=RQ.call(t,Ju),n=t[Ju];try{t[Ju]=void 0;var r=!0}catch{}var o=NQ.call(t);return r&&(e?t[Ju]=n:delete t[Ju]),o}var IQ=Object.prototype,zQ=IQ.toString;function LQ(t){return zQ.call(t)}var BQ="[object Null]",FQ="[object Undefined]",aS=jm?jm.toStringTag:void 0;function qQ(t){return t==null?t===void 0?FQ:BQ:aS&&aS in Object(t)?DQ(t):LQ(t)}function UQ(t){return t!=null&&typeof t=="object"}var VQ="[object Symbol]";function HQ(t){return typeof t=="symbol"||UQ(t)&&qQ(t)==VQ}var WQ=/\s/;function KQ(t){for(var e=t.length;e--&&WQ.test(t.charAt(e)););return e}var JQ=/^\s+/;function GQ(t){return t&&t.slice(0,KQ(t)+1).replace(JQ,"")}function Hb(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var lS=NaN,QQ=/^[-+]0x[0-9a-f]+$/i,YQ=/^0b[01]+$/i,XQ=/^0o[0-7]+$/i,ZQ=parseInt;function cS(t){if(typeof t=="number")return t;if(HQ(t))return lS;if(Hb(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Hb(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=GQ(t);var n=YQ.test(t);return n||XQ.test(t)?ZQ(t.slice(2),n?2:8):QQ.test(t)?lS:+t}var qv=function(){return N$.Date.now()},eY="Expected a function",tY=Math.max,nY=Math.min;function rY(t,e,n){var r,o,i,s,a,l,u=0,d=!1,h=!1,f=!0;if(typeof t!="function")throw new TypeError(eY);e=cS(e)||0,Hb(n)&&(d=!!n.leading,h="maxWait"in n,i=h?tY(cS(n.maxWait)||0,e):i,f="trailing"in n?!!n.trailing:f);function p(_){var A=r,D=o;return r=o=void 0,u=_,s=t.apply(D,A),s}function m(_){return u=_,a=setTimeout(g,e),d?p(_):s}function b(_){var A=_-l,D=_-u,E=e-A;return h?nY(E,i-D):E}function v(_){var A=_-l,D=_-u;return l===void 0||A>=e||A<0||h&&D>=i}function g(){var _=qv();if(v(_))return y(_);a=setTimeout(g,b(_))}function y(_){return a=void 0,f&&r?p(_):(r=o=void 0,s)}function k(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function S(){return a===void 0?s:y(qv())}function w(){var _=qv(),A=v(_);if(r=arguments,o=this,l=_,A){if(a===void 0)return m(l);if(h)return clearTimeout(a),a=setTimeout(g,e),p(l)}return a===void 0&&(a=setTimeout(g,e)),s}return w.cancel=k,w.flush=S,w}var I$=typeof global=="object"&&global&&global.Object===Object&&global,oY=typeof self=="object"&&self&&self.Object===Object&&self,zs=I$||oY||Function("return this")(),Rs=zs.Symbol,z$=Object.prototype,iY=z$.hasOwnProperty,sY=z$.toString,Gu=Rs?Rs.toStringTag:void 0;function aY(t){var e=iY.call(t,Gu),n=t[Gu];try{t[Gu]=void 0;var r=!0}catch{}var o=sY.call(t);return r&&(e?t[Gu]=n:delete t[Gu]),o}var lY=Object.prototype,cY=lY.toString;function uY(t){return cY.call(t)}var dY="[object Null]",hY="[object Undefined]",uS=Rs?Rs.toStringTag:void 0;function ec(t){return t==null?t===void 0?hY:dY:uS&&uS in Object(t)?aY(t):uY(t)}function Ns(t){return t!=null&&typeof t=="object"}var fY="[object Symbol]";function kw(t){return typeof t=="symbol"||Ns(t)&&ec(t)==fY}function pY(t,e){for(var n=-1,r=t==null?0:t.length,o=Array(r);++n0){if(++e>=NY)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function LY(t){return function(){return t}}var km=function(){try{var t=nc(Object,"defineProperty");return t({},"",{}),t}catch{}}(),BY=km?function(t,e){return km(t,"toString",{configurable:!0,enumerable:!1,value:LY(e),writable:!0})}:Sw,FY=zY(BY);function qY(t,e){for(var n=-1,r=t==null?0:t.length;++n-1&&t%1==0&&t-1&&t%1==0&&t<=GY}function kg(t){return t!=null&&_w(t.length)&&!Cw(t)}function QY(t,e,n){if(!Ls(n))return!1;var r=typeof e;return(r=="number"?kg(n)&&Ow(e,n.length):r=="string"&&e in n)?Nh(n[e],t):!1}function q$(t){return JY(function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(o--,i):void 0,s&&QY(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),e=Object(e);++r-1}function aZ(t,e){var n=this.__data__,r=Sg(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ua(t){var e=-1,n=t==null?0:t.length;for(this.clear();++ea))return!1;var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var h=-1,f=!0,p=n&ate?new Om:void 0;for(i.set(t,e),i.set(e,t);++hu===0?i(l):a(l,u)).join("")+o}function ine(t){return e=>e.toLocaleLowerCase(t)}function sne(t){return e=>e.toLocaleUpperCase(t)}function ane(t,e){return(n,r)=>{const o=n[0];return(r>0&&o>="0"&&o<="9"?"_"+o:e(o))+t(n.slice(1))}}function lne(t,e={}){const n=e.split??(e.separateNumbers?rne:u3),r=e.prefixCharacters??zS,o=e.suffixCharacters??zS;let i=0,s=t.length;for(;ii;){const a=s-1,l=t.charAt(a);if(!o.includes(l))break;s=a}return[t.slice(0,i),n(t.slice(i,s)),t.slice(s)]}const fp=t=>/.+-.+/.test(t)?one(t):t,cne=t=>Object.prototype.toString.call(t).slice(8,-1)==="Object";function une(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o!!n[o]}const dne=une("String,Number,Boolean,Function,Symbol,BigInt");function hne(t){const e=t==null?void 0:t.toString().match(/^\s*function (\w+)/);return e?e[1]:t===null?"null":""}function fne(t,e){let n;const r=hne(e);if(dne(r)){const o=typeof t;n=o===r.toLowerCase(),!n&&o==="object"&&(n=t instanceof e)}else r==="Object"?n=Ls(t):r==="Array"?n=Array.isArray(t):r==="null"?n=t===null:n=t instanceof e;return{valid:n,expectedType:r}}function pne({prop:t,type:e,validator:n}){if(![void 0,null].includes(t)&&e){let r=!1;const o=Array.isArray(e)?e:[e],i=[];for(let s=0;s=0;s--)o.push(t[s]);const i=n||(r?(s,a)=>typeof s=="function"&&typeof a=="function"?r==null?void 0:r(a,s):void 0:void 0);return e==="deep"?Yte(...o,i):FX(...o,i)}function gne(t,{mergeFunction:e}){return t.reduce(e,()=>{})}function ba(t,e={}){const{type:n,default:r,defaultIsDynamic:o=!1,required:i=!1,validator:s,camelizeObjectKeys:a=!1,mergeObjectApplyOnlyToDefault:l=!1,mergeFunctionApplyOnlyToDefault:u=!0}=e;let{mergeObject:d="deep",mergeObjectCustomizer:h,mergeFunction:f=!1}=e;const p=[];let m,b=!1,v=!1;const g=y=>{if(y!==void 0){pne({type:n,prop:y,validator:s});const k=cne(y),S=typeof y=="function";return b=k,v=S,k?(y=ete(y),a?Xte(y,(w,_)=>fp(_)):y):y}};for(const y of t)p.push(g(y));if(!o)p.push(g(r));else if(typeof r!="function")throw new TypeError(`Invalid option: options.default should be Function when options.defaultIsDynamic enabled, receiving: ${r}`);b||(d=!1,v||(f=!1));for(let y=0;yfp(i)):e;else if(n){o=[];for(const i in e)o.push(fp(i))}else o=Object.keys(e);for(const i in t)if(i.startsWith("@")){const s=i.substring(1);s.startsWith("hook:")?r.hooks[s]=t[i]:r.listeners[s]=t[i]}else if(i.startsWith("#")){const s=i.substring(1);s&&(r.slots[s]=t[i])}else{const s=n?fp(i):i;o.includes(s)?r.props[s]=t[i]:r.attrs[i]=t[i]}return r}const LS="JsonEditorVue",ma={},BS={},pp="value",FS="input",mp=["mainMenuBar","navigationBar","statusBar","askToFormat","readOnly","escapeControlCharacters","escapeUnicodeCharacters","flattenColumns"],qS={[pp]:{},mode:{type:String},debounce:{type:Number},stringified:{type:Boolean,default:void 0},...Object.fromEntries(mp.map(t=>[t,{type:Boolean,default:void 0}]))},bne=p3({name:LS,install(t,e){const n=vne(e||{},{props:qS});Object.assign(ma,n.props),Object.assign(BS,n.attrs),t.component(LS,this)},props:qS,emits:{[FS](t){return!0},"update:mode":function(t){return!0}},setup(t,{attrs:e,emit:n,expose:r}){var o;const i=(o=m3())==null?void 0:o.proxy,s=Bf(),a=Bf(!1),l=Bf();g3(()=>{var g;l.value=ba([t.mode,ma.mode],{type:String}),(g=s.value)==null||g.updateProps({mode:l.value||Gr.tree})});const u=g=>{n("update:mode",g)};ma.mode!==void 0&&t.mode===void 0&&u(ma.mode);const d=Iw(()=>ba([t.debounce,ma.debounce,300],{type:Number})),h=Iw(()=>ba([t.stringified,ma.stringified,!0],{type:Boolean}));let f=dp;const p=g=>{a.value=!0,!h.value&&g.text&&(s.value&&!s.value.validate()&&(g.json=f(g.text)),g.text=void 0),n(FS,g.text===void 0?g.json:g.text)},m=rY(p,d.value),b=g=>{l.value==="text"?m(g):p(g)},v=(g,y)=>(...k)=>{g(...k),y(...k)};return r==null||r({jsonEditor:s}),v3(()=>{var g;(g=s.value)==null||g.destroy()}),US(()=>{const g=ba([t[pp],ma[pp]]),y=Object.fromEntries(Array.from(mp,S=>[S,ba([t[S],ma[S]])]).filter(([,S])=>S!==void 0)),k=ba([y,e,BS],{camelizeObjectKeys:!0,defaultIsDynamic:!0,default:S=>{var w;return f=((w=S.parser)==null?void 0:w.parse)||dp,{onChange:b,onChangeMode:u,mode:l.value,parser:{parse:MQ,stringify:JSON.stringify},...g!==void 0&&{content:{[typeof g=="string"&&l.value==="text"&&h.value?"text":"json"]:g}}}},mergeFunction:v,mergeObject:"shallow",type:Object});s.value=CQ({target:i==null?void 0:i.$refs.jsonEditorRef,props:k}),Ff(()=>t[pp],S=>{if(a.value){a.value=!1;return}s.value&&s.value.set([void 0,""].includes(S)?{text:""}:{[typeof S=="string"&&l.value==="text"&&h.value?"text":"json"]:S})},{deep:!0}),Ff(()=>Array.from(mp,S=>t[S]),S=>{var w;(w=s.value)==null||w.updateProps(Object.fromEntries(Array.from(S,(_,A)=>[mp[A],_]).filter(([,_])=>_!==void 0)))}),Ff(()=>e,S=>{var w,_;const A={};(S.onChange||S["on-change"])&&(A.onChange=b),(S.onChangeMode||S["on-change-mode"])&&(A.onChangeMode=u),f=((w=S.parser)==null?void 0:w.parse)||dp,(_=s.value)==null||_.updateProps(Object.getOwnPropertyNames(A).length>0?ba([S,A],{camelizeObjectKeys:!0,mergeFunction:v,mergeObject:"shallow",type:Object}):S)},{deep:!0}),r||(r=S=>{for(const w in S)i[w]=b3(S[w])},r({jsonEditor:s}))}),()=>y3("div",{ref:"jsonEditorRef"})}}),yne={__name:"EditorJSON",props:{apiUrl:{type:String,required:!0}},setup(t){const e=t,n=Bf({msg:"demo of jsoneditor"}),r=async u=>{try{const h=await(await fetch(u)).json();n.value=h}catch(d){alert("Failed to fetch data"),console.error("Failed to fetch data:",d)}},o=u=>{try{const d=typeof u=="string"?JSON.parse(u):u;n.value=d}catch(d){alert("Error parsing updated JSON"),console.error("Error parsing updated JSON:",d)}},i=()=>{localStorage.setItem("editor-json",JSON.stringify(n.value))},s=()=>{w3.copy(n.value)},a=()=>{alert("Copied JSON to the clipboard")},l=u=>{alert("Failed to copy JSON to the clipboard"),console.error("Failed to copy JSON to the clipboard:",u)};return Ff(n,u=>{o(u)}),US(()=>{r(e.apiUrl)}),{__sfc:!0,props:e,json:n,getData:r,updateData:o,saveData:i,copyData:s,copyDataSuccess:a,copyDataError:l,JsonEditorVue:bne}}};var wne=function(){var e=this,n=e._self._c,r=e._self._setupProxy;return n("div",{staticClass:"editor-json"},[n("h2",{staticClass:"page__subtitle"},[e._v(" JSON editor ")]),n("div",{staticClass:"editor-json__content"},[n(r.JsonEditorVue,{staticClass:"json-editor-vue jse-theme-dark",attrs:{mode:"text","ask-to-format":!0,"read-only":!1,indentation:4},model:{value:r.json,callback:function(o){r.json=o},expression:"json"}}),n("div",{staticClass:"editor-json__actions"},[n("UIButton",{directives:[{name:"clipboard",rawName:"v-clipboard",value:r.copyData,expression:"copyData"},{name:"clipboard",rawName:"v-clipboard:success",value:r.copyDataSuccess,expression:"copyDataSuccess",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:r.copyDataError,expression:"copyDataError",arg:"error"}],staticClass:"button--line button--dark",attrs:{type:"button","button-text":"Copy","button-icon":"copy","button-label":"Copy json"}}),n("UIButton",{staticClass:"button--solid button--dark",attrs:{type:"button","button-text":"Save","button-icon":"save","button-label":"Save json"},on:{click:r.saveData}})],1)],1)])},xne=[],jne=VS(yne,wne,xne,!1,null,"d8ac6322");const kne=jne.exports,Sne={name:"EditorsView",components:{EditorJSON:kne}};var Cne=function(){var e=this,n=e._self._c;return n("div",{staticClass:"page__inner page__container"},[n("h1",{staticClass:"page__title"},[e._v(" Editors page ")]),n("EditorJSON",{attrs:{"api-url":"https://pokeapi.co/api/v2/pokemon/pikachu"}})],1)},One=[],_ne=VS(Sne,Cne,One,!1,null,null);const Tne=_ne.exports;export{Tne as default}; diff --git a/assets/EditorsView-Dv4IQPF2.css b/assets/EditorsView-Dv4IQPF2.css new file mode 100644 index 00000000..ee188a09 --- /dev/null +++ b/assets/EditorsView-Dv4IQPF2.css @@ -0,0 +1 @@ +.jse-theme-dark{--jse-theme: dark;--jse-theme-color: #2f6dd0;--jse-theme-color-highlight: #467cd2;--jse-background-color: #1e1e1e;--jse-text-color: #d4d4d4;--jse-text-color-inverse: #4d4d4d;--jse-main-border: 1px solid #4f4f4f;--jse-menu-color: #fff;--jse-modal-background: #2f2f2f;--jse-modal-overlay-background: rgba(0, 0, 0, .5);--jse-modal-code-background: #2f2f2f;--jse-tooltip-color: var(--jse-text-color);--jse-tooltip-background: #4b4b4b;--jse-tooltip-border: 1px solid #737373;--jse-tooltip-action-button-color: inherit;--jse-tooltip-action-button-background: #737373;--jse-panel-background: #333333;--jse-panel-background-border: 1px solid #464646;--jse-panel-color: var(--jse-text-color);--jse-panel-color-readonly: #737373;--jse-panel-border: 1px solid #3c3c3c;--jse-panel-button-color-highlight: #e5e5e5;--jse-panel-button-background-highlight: #464646;--jse-navigation-bar-background: #656565;--jse-navigation-bar-background-highlight: #7e7e7e;--jse-navigation-bar-dropdown-color: var(--jse-text-color);--jse-context-menu-background: #4b4b4b;--jse-context-menu-background-highlight: #595959;--jse-context-menu-separator-color: #595959;--jse-context-menu-color: var(--jse-text-color);--jse-context-menu-pointer-background: #737373;--jse-context-menu-pointer-background-highlight: #818181;--jse-context-menu-pointer-color: var(--jse-context-menu-color);--jse-key-color: #9cdcfe;--jse-value-color: var(--jse-text-color);--jse-value-color-number: #b5cea8;--jse-value-color-boolean: #569cd6;--jse-value-color-null: #569cd6;--jse-value-color-string: #ce9178;--jse-value-color-url: #ce9178;--jse-delimiter-color: #949494;--jse-edit-outline: 2px solid var(--jse-text-color);--jse-selection-background-color: #464646;--jse-selection-background-inactive-color: #333333;--jse-hover-background-color: #343434;--jse-active-line-background-color: rgba(255, 255, 255, .06);--jse-search-match-background-color: #343434;--jse-collapsed-items-background-color: #333333;--jse-collapsed-items-selected-background-color: #565656;--jse-collapsed-items-link-color: #b2b2b2;--jse-collapsed-items-link-color-highlight: #ec8477;--jse-search-match-color: #724c27;--jse-search-match-outline: 1px solid #966535;--jse-search-match-active-color: #9f6c39;--jse-search-match-active-outline: 1px solid #bb7f43;--jse-tag-background: #444444;--jse-tag-color: #bdbdbd;--jse-table-header-background: #333333;--jse-table-header-background-highlight: #424242;--jse-table-row-odd-background: rgba(255, 255, 255, .1);--jse-input-background: #3d3d3d;--jse-input-border: var(--jse-main-border);--jse-button-background: #808080;--jse-button-background-highlight: #7a7a7a;--jse-button-color: #e0e0e0;--jse-button-secondary-background: #494949;--jse-button-secondary-background-highlight: #5d5d5d;--jse-button-secondary-background-disabled: #9d9d9d;--jse-button-secondary-color: var(--jse-text-color);--jse-a-color: #55abff;--jse-a-color-highlight: #4387c9;--jse-svelte-select-background: #3d3d3d;--jse-svelte-select-border: 1px solid #4f4f4f;--list-background: #3d3d3d;--item-hover-bg: #505050;--multi-item-bg: #5b5b5b;--input-color: #d4d4d4;--multi-clear-bg: #8a8a8a;--multi-item-clear-icon-color: #d4d4d4;--multi-item-outline: 1px solid #696969;--list-shadow: 0 2px 8px 0 rgba(0, 0, 0, .4);--jse-color-picker-background: #656565;--jse-color-picker-border-box-shadow: #8c8c8c 0 0 0 1px}.editor-json__content[data-v-d8ac6322] .jse-theme-dark{--jse-theme-color: #2c3e50;--jse-theme-color-highlight: #00bd7e}.editor-json__content[data-v-d8ac6322] .jse-modal .svelte-select{--item-is-active-bg: #00bd7e}.editor-json__content[data-v-d8ac6322] .jse-modal .svelte-select.focused{border-color:#00bd7e!important}.editor-json__content[data-v-d8ac6322] .json-editor-vue{display:flex;flex:1;height:50rem}.editor-json__content[data-v-d8ac6322] .json-editor-vue a,.editor-json__content[data-v-d8ac6322] .json-editor-vue span{display:initial}.editor-json__actions[data-v-d8ac6322]{display:flex;justify-content:flex-end;margin-top:1rem}.editor-json__actions>*[data-v-d8ac6322]:not(:last-child){margin-right:1rem} diff --git a/assets/HomeView-CXk3XJn4.css b/assets/HomeView-CXk3XJn4.css new file mode 100644 index 00000000..cbc0a3c1 --- /dev/null +++ b/assets/HomeView-CXk3XJn4.css @@ -0,0 +1 @@ +.welcome-item[data-v-ba2722d5]{display:flex;position:relative}.welcome-item[data-v-ba2722d5]:not(:first-child){margin-top:3.2rem}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]:not(:first-child){margin-top:0}}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]{padding:.64rem 0 1.6rem calc(var(--section-gap) / 2)}}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]:before,.welcome-item[data-v-ba2722d5]:after{content:" ";position:absolute;left:2.6rem;height:calc(50% - 2.5rem);border-left:.1rem solid var(--color-border)}}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]:before{bottom:calc(50% + 2.5rem)}}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]:after{top:calc(50% + 2.5rem)}}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]:first-of-type:before{display:none}}@media (width >= 1024px){.welcome-item[data-v-ba2722d5]:last-of-type:after{display:none}}.welcome-item__icon[data-v-ba2722d5]{display:flex;width:3.2rem;height:3.2rem;color:var(--color-text);place-items:center;place-content:center}@media (width >= 1024px){.welcome-item__icon[data-v-ba2722d5]{position:absolute;top:calc(50% - 2.5rem);left:0;width:5rem;height:5rem;border:.1rem solid var(--color-border);border-radius:.8rem;background:var(--color-background)}}.welcome-item__icon[data-v-ba2722d5] .icon{width:2rem;height:2rem}.welcome-item__details[data-v-ba2722d5]{flex:1;margin-left:1.6rem}.welcome-item__details[data-v-ba2722d5] p{font-size:1.5rem}.welcome-item__details[data-v-ba2722d5] p a{display:inline}.welcome-item__title[data-v-ba2722d5]{margin-bottom:.64rem;color:var(--color-heading);font-size:1.92rem;font-weight:500;line-height:1.6}@media (width >= 1024px){.the-welcome[data-v-06d4ea34]{overflow-y:scroll}}@media (width >= 1024px){.page-home[data-v-c8c3635f]{overflow-y:hidden}} diff --git a/assets/HomeView-DSukVaE6.js b/assets/HomeView-DSukVaE6.js new file mode 100644 index 00000000..e32fa30f --- /dev/null +++ b/assets/HomeView-DSukVaE6.js @@ -0,0 +1,42 @@ +import{n as r,r as a}from"./index-CTQU9LwT.js";const i={};var l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"welcome-item"},[t("span",{staticClass:"welcome-item__icon"},[e._t("icon")],2),t("div",{staticClass:"welcome-item__details"},[t("h3",{staticClass:"welcome-item__title"},[e._t("heading")],2),e._t("default")],2)])},c=[],u=r(i,l,c,!1,null,"ba2722d5");const _=u.exports,p={__name:"TheWelcome",setup(n){return{__sfc:!0,data:a([{title:"Documentation",icon:"documentation",text:` + Vue’s + official documentation + provides you with all information you need to get started. + `},{title:"Tooling",icon:"tooling",text:` + This project is served and bundled with + Vite. The + recommended IDE setup is + VSCode + + Volar. If + you need to test your components and web pages, check out + Cypress and + Cypress Component Testing. +
      + More instructions are available in README.md. + `},{title:"Ecosystem",icon:"ecosystem",text:` + Get official tools and libraries for your project: + Pinia, + Vue Router, + Vue Test Utils, and + Vue Dev Tools. If + you need more resources, we suggest paying + Awesome Vue + a visit. + `},{title:"Community",icon:"community",text:` + Got stuck? Ask your question on + Vue Land, our official + Discord server, or + StackOverflow. You should also subscribe to + our mailing list and follow + the official + @vuejs + twitter account for latest news in the Vue world. + `},{title:"Support Vue",icon:"support",text:` + As an independent project, Vue relies on community backing for its sustainability. You can help + us by + becoming a sponsor. + `}]),WelcomeItem:_}}};var f=function(){var e=this,t=e._self._c,s=e._self._setupProxy;return t("div",{staticClass:"the-welcome"},e._l(s.data,function(o){return t(s.WelcomeItem,{key:o.icon,scopedSlots:e._u([{key:"icon",fn:function(){return[t("UIIcon",{attrs:{name:o.icon,"aria-label":o.title,title:o.title}})]},proxy:!0},{key:"heading",fn:function(){return[e._v(" "+e._s(o.title)+" ")]},proxy:!0}],null,!0)},[t("p",{domProps:{innerHTML:e._s(o.text)}})])}),1)},m=[],d=r(p,f,m,!1,null,"06d4ea34");const h=d.exports,v={name:"HomeView",components:{TheWelcome:h}};var g=function(){var e=this,t=e._self._c;return t("TheWelcome")},b=[],k=r(v,g,b,!1,null,"c8c3635f");const w=k.exports;export{w as default}; diff --git a/assets/favicon-uSLXchjO.ico b/assets/favicon-uSLXchjO.ico new file mode 100644 index 00000000..df36fcfb Binary files /dev/null and b/assets/favicon-uSLXchjO.ico differ diff --git a/assets/index-CHnHLGCZ.css b/assets/index-CHnHLGCZ.css new file mode 100644 index 00000000..804df40a --- /dev/null +++ b/assets/index-CHnHLGCZ.css @@ -0,0 +1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}*,*:before,*:after{padding:0;margin:0;box-sizing:border-box;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400}*::selection{color:#fff;background-color:#00bd7e}html,body,textarea,select,input,button{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}html{overflow-x:hidden;font-size:62.5%;font-weight:400;background-color:#fff}body{font-size:10px;background-color:#fff}#app{font-size:1.6rem;line-height:2.4rem}a{display:inline-block;text-decoration:none;color:inherit}a:hover{color:inherit}p{font-size:1.6rem;line-height:160%}p:not(:last-child){margin-bottom:1rem}p:only-of-type{margin-bottom:0}.greetings h1[data-v-91aedd5d],.greetings h3[data-v-91aedd5d]{text-align:center}@media (width >= 1024px){.greetings h1[data-v-91aedd5d],.greetings h3[data-v-91aedd5d]{text-align:left}}.greetings h1[data-v-91aedd5d]{position:relative;top:-1rem;font-size:4.16rem;font-weight:500}.greetings h3[data-v-91aedd5d]{font-size:1.92rem}.greetings h3[data-v-91aedd5d] a{display:inline}.page-nav[data-v-8fd2e068]{display:flex;justify-content:center;width:100%;margin-top:3.2rem;font-size:1.2rem}@media (width >= 1024px){.page-nav[data-v-8fd2e068]{justify-content:flex-start;margin-top:1.6rem;margin-left:-1.6rem;padding:1.6rem 0;font-size:1.6rem}}.page-nav__list[data-v-8fd2e068]{display:flex;margin:0;padding:0;list-style:none}.page-nav__item[data-v-8fd2e068]{display:flex;align-items:center;justify-content:center;border-left:.1rem solid var(--color-border)}.page-nav__item[data-v-8fd2e068]:first-of-type{border:0}.page-nav__link[data-v-8fd2e068]{display:inline-block;padding:0 1.6rem;font-size:1.6rem;-webkit-user-select:none;user-select:none}.page-nav__link.router-link-exact-active[data-v-8fd2e068]{color:var(--color-link)}.page-nav__link.router-link-exact-active[data-v-8fd2e068]:hover{background-color:transparent}.page-header[data-v-08094135]{max-height:80vh;line-height:1.5}@media (width >= 1024px){.page-header[data-v-08094135]{display:flex;padding-right:calc(var(--section-gap) / 2);place-items:center}}.page-header .icon-logo-vue[data-v-08094135]{width:12.5rem;height:12.5rem;margin:0 auto 3.2rem}@media (width >= 1024px){.page-header .icon-logo-vue[data-v-08094135]{margin:0 3.2rem 0 0}}@media (width >= 1024px){.page-header__wrapper[data-v-08094135]{display:flex;flex-wrap:wrap;width:calc(100% - 15.7rem);place-items:flex-start}}:root{--vt-c-white: #ffffff;--vt-c-black: #181818;--vt-c-green: hsl(160deg 100% 37% / 100%);--vt-c-green-light: hsl(160deg 100% 37% / 20%);--vt-c-indigo: #2c3e50;--vt-c-divider-light-2: rgb(60 60 60 / 12%);--vt-c-divider-dark-2: rgb(84 84 84 / 48%);--vt-c-text-dark-2: rgb(235 235 235 / 64%);--color-background: var(--vt-c-white);--color-border: var(--vt-c-divider-light-2);--color-heading: var(--vt-c-indigo);--color-text: var(--vt-c-indigo);--color-link: var(--vt-c-indigo);--color-button: var(--vt-c-indigo);--section-gap: 160px}@media (prefers-color-scheme: dark){:root{--color-background: var(--vt-c-black);--color-border: var(--vt-c-divider-dark-2);--color-heading: var(--vt-c-white);--color-text: var(--vt-c-text-dark-2);--color-link: var(--vt-c-white);--color-button: var(--vt-c-white)}}.page{color:#2c3e50;font-family:Avenir,Helvetica,Arial,sans-serif}.page__container{width:100%;max-width:140rem;margin:0 auto}.page__inner{position:relative;padding-right:3rem;padding-left:3rem}@media (max-width: 768px){.page__inner{padding-right:2rem;padding-left:2rem}}.page__title{margin-bottom:3.6rem;color:var(--color-heading);font-size:3.6rem;line-height:3.6rem;text-align:center}.page__subtitle{margin-bottom:2.4rem;font-size:2.4rem;line-height:2.4rem;text-align:center}.page__body{min-height:100vh;transition:color .5s,background-color .5s;background:var(--color-background);color:var(--color-text)}@media (width >= 1024px){.page__body{display:flex;place-items:center}}.page__app{max-width:1280px;margin:0 auto;padding:3.2rem;font-weight:400}@media (width >= 1024px){.page__app{display:grid;grid-template-columns:1fr 1fr;padding:0 3.2rem}}.page__main{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-top:5rem;padding-bottom:5rem}@media (width >= 1024px){.page__main{height:80vh;padding-top:0;padding-bottom:0}}.page__section{display:flex;justify-content:center}.page__article:not(:last-child){margin-bottom:4rem}a,.green{padding:.3rem;transition:.4s;color:var(--vt-c-green);text-decoration:none}@media (hover: hover){a:hover{background-color:var(--vt-c-green-light);color:var(--vt-c-green)}}.button[data-v-f033615a]{display:flex;align-items:center;padding:.5rem 1.5rem;border:.2rem solid transparent;border-radius:.3rem;font-size:1.6rem;font-weight:700;cursor:pointer}.button>*[data-v-f033615a]:not(:last-child){margin-right:.5rem}.button--line[data-v-f033615a]{border-color:#2c3e50;background-color:transparent;color:#2c3e50}.button--line[data-v-f033615a]:hover,.button--line.button--dark[data-v-f033615a]{border-color:#00bd7e;background-color:transparent;color:#00bd7e}.button--line.button--dark[data-v-f033615a]:hover{border-color:var(--color-button);background-color:transparent;color:var(--color-button)}.button--solid[data-v-f033615a]{border-color:#2c3e50;background-color:#2c3e50;color:var(--color-background)}.button--solid[data-v-f033615a]:hover{border-color:#00bd7e;background-color:#00bd7e}.button--solid.button--dark[data-v-f033615a]{border-color:#00bd7e;background-color:#00bd7e;color:var(--color-background)}.button--solid.button--dark[data-v-f033615a]:hover{border-color:var(--color-button);background-color:var(--color-button)}.icon[data-v-b620ba1d]{display:flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem}.icon__svg[data-v-b620ba1d]{display:inline-block;width:100%;height:100%;fill:currentcolor} diff --git a/assets/index-CTQU9LwT.js b/assets/index-CTQU9LwT.js new file mode 100644 index 00000000..ef3eb850 --- /dev/null +++ b/assets/index-CTQU9LwT.js @@ -0,0 +1,14 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-DSukVaE6.js","assets/HomeView-CXk3XJn4.css","assets/EditorsView-CfbKsDLC.js","assets/EditorsView-Dv4IQPF2.css"])))=>i.map(i=>d[i]); +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Io={};/*! + * Vue.js v2.7.16 + * (c) 2014-2023 Evan You + * Released under the MIT License. + */var X=Object.freeze({}),T=Array.isArray;function x(t){return t==null}function h(t){return t!=null}function B(t){return t===!0}function No(t){return t===!1}function xe(t){return typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="boolean"}function H(t){return typeof t=="function"}function W(t){return t!==null&&typeof t=="object"}var fn=Object.prototype.toString;function tt(t){return fn.call(t)==="[object Object]"}function jo(t){return fn.call(t)==="[object RegExp]"}function ra(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function Ir(t){return h(t)&&typeof t.then=="function"&&typeof t.catch=="function"}function Ho(t){return t==null?"":Array.isArray(t)||tt(t)&&t.toString===fn?JSON.stringify(t,ko,2):String(t)}function ko(t,e){return e&&e.__v_isRef?e.value:e}function ye(t){var e=parseFloat(t);return isNaN(e)?t:e}function ut(t,e){for(var r=Object.create(null),n=t.split(","),i=0;i-1)return t.splice(n,1)}}var Fo=Object.prototype.hasOwnProperty;function q(t,e){return Fo.call(t,e)}function Gt(t){var e=Object.create(null);return function(n){var i=e[n];return i||(e[n]=t(n))}}var Zo=/-(\w)/g,Zt=Gt(function(t){return t.replace(Zo,function(e,r){return r?r.toUpperCase():""})}),Uo=Gt(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),Bo=/\B([A-Z])/g,Ee=Gt(function(t){return t.replace(Bo,"-$1").toLowerCase()});function zo(t,e){function r(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return r._length=t.length,r}function Go(t,e){return t.bind(e)}var na=Function.prototype.bind?Go:zo;function Nr(t,e){e=e||0;for(var r=t.length-e,n=new Array(r);r--;)n[r]=t[r+e];return n}function k(t,e){for(var r in e)t[r]=e[r];return t}function ia(t){for(var e={},r=0;r0,ua=ot&&ot.indexOf("edge/")>0;ot&&ot.indexOf("android")>0;var Yo=ot&&/iphone|ipad|ipod|ios/.test(ot),Fn=ot&&ot.match(/firefox\/(\d+)/),Hr={}.watch,fa=!1;if(rt)try{var Zn={};Object.defineProperty(Zn,"passive",{get:function(){fa=!0}}),window.addEventListener("test-passive",null,Zn)}catch{}var Re,Mt=function(){return Re===void 0&&(!rt&&typeof global<"u"?Re=global.process&&Io.VUE_ENV==="server":Re=!1),Re},Qe=rt&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(t){return typeof t=="function"&&/native code/.test(t.toString())}var Oe=typeof Symbol<"u"&&re(Symbol)&&typeof Reflect<"u"&&re(Reflect.ownKeys),_e;typeof Set<"u"&&re(Set)?_e=Set:_e=function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(e){return this.set[e]===!0},t.prototype.add=function(e){this.set[e]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var J=null;function vp(){return J&&{proxy:J}}function At(t){t===void 0&&(t=null),t||J&&J._scope.off(),J=t,t&&t._scope.on()}var et=function(){function t(e,r,n,i,a,o,s,c){this.tag=e,this.data=r,this.children=n,this.text=i,this.elm=a,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=r&&r.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=c,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),kt=function(t){t===void 0&&(t="");var e=new et;return e.text=t,e.isComment=!0,e};function Vt(t){return new et(void 0,void 0,void 0,String(t))}function kr(t){var e=new et(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var Jo=0,Fe=[],Qo=function(){for(var t=0;t0&&(i=_a(i,"".concat(e||"","_").concat(n)),le(i[0])&&le(o)&&(r[a]=Vt(o.text+i[0].text),i.shift()),r.push.apply(r,i)):xe(i)?le(o)?r[a]=Vt(o.text+i):i!==""&&r.push(Vt(i)):le(i)&&le(o)?r[a]=Vt(o.text+i.text):(B(t._isVList)&&h(i.tag)&&x(i.key)&&h(e)&&(i.key="__vlist".concat(e,"_").concat(n,"__")),r.push(i)));return r}function fs(t,e){var r=null,n,i,a,o;if(T(t)||typeof t=="string")for(r=new Array(t.length),n=0,i=t.length;n0,o=e?!!e.$stable:!a,s=e&&e.$key;if(!e)i={};else{if(e._normalized)return e._normalized;if(o&&n&&n!==X&&s===n.$key&&!a&&!n.$hasNormal)return n;i={};for(var c in e)e[c]&&c[0]!=="$"&&(i[c]=ws(t,r,c,e[c]))}for(var u in r)u in i||(i[u]=Cs(r,u));return e&&Object.isExtensible(e)&&(e._normalized=i),V(i,"$stable",o),V(i,"$key",s),V(i,"$hasNormal",a),i}function ws(t,e,r,n){var i=function(){var a=J;At(t);var o=arguments.length?n.apply(null,arguments):n({});o=o&&typeof o=="object"&&!T(o)?[o]:vn(o);var s=o&&o[0];return At(a),o&&(!s||o.length===1&&s.isComment&&!be(s))?void 0:o};return n.proxy&&Object.defineProperty(e,r,{get:i,enumerable:!0,configurable:!0}),i}function Cs(t,e){return function(){return t[e]}}function $s(t){var e=t.$options,r=e.setup;if(r){var n=t._setupContext=Ss(t);At(t),se();var i=bt(r,null,[t._props||da({}),n],t,"setup");if(ce(),At(),H(i))e.render=i;else if(W(i))if(t._setupState=i,i.__sfc){var o=t._setupProxy={};for(var a in i)a!=="__sfc"&&Dr(o,i,a)}else for(var a in i)ca(a)||Dr(t,i,a)}}function Ss(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};V(e,"_v_attr_proxy",!0),tr(e,t.$attrs,X,t,"$attrs")}return t._attrsProxy},get listeners(){if(!t._listenersProxy){var e=t._listenersProxy={};tr(e,t.$listeners,X,t,"$listeners")}return t._listenersProxy},get slots(){return Es(t)},emit:na(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach(function(r){return Dr(t,e,r)})}}}function tr(t,e,r,n,i){var a=!1;for(var o in e)o in t?e[o]!==r[o]&&(a=!0):(a=!0,xs(t,o,n,i));for(var o in t)o in e||(a=!0,delete t[o]);return a}function xs(t,e,r,n){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return r[n][e]}})}function Es(t){return t._slotsProxy||$a(t._slotsProxy={},t.$scopedSlots),t._slotsProxy}function $a(t,e){for(var r in e)t[r]=e[r];for(var r in t)r in e||delete t[r]}function Os(t){t._vnode=null,t._staticTrees=null;var e=t.$options,r=t.$vnode=e._parentVnode,n=r&&r.context;t.$slots=hn(e._renderChildren,n),t.$scopedSlots=r?me(t.$parent,r.data.scopedSlots,t.$slots):X,t._c=function(a,o,s,c){return we(t,a,o,s,c,!1)},t.$createElement=function(a,o,s,c){return we(t,a,o,s,c,!0)};var i=r&&r.data;Pt(t,"$attrs",i&&i.attrs||X,null,!0),Pt(t,"$listeners",e._parentListeners||X,null,!0)}var Be=null;function As(t){Ca(t.prototype),t.prototype.$nextTick=function(e){return dn(e,this)},t.prototype._render=function(){var e=this,r=e.$options,n=r.render,i=r._parentVnode;i&&e._isMounted&&(e.$scopedSlots=me(e.$parent,i.data.scopedSlots,e.$slots,e.$scopedSlots),e._slotsProxy&&$a(e._slotsProxy,e.$scopedSlots)),e.$vnode=i;var a=J,o=Be,s;try{At(e),Be=e,s=n.call(e._renderProxy,e.$createElement)}catch(c){Bt(c,e,"render"),s=e._vnode}finally{Be=o,At(a)}return T(s)&&s.length===1&&(s=s[0]),s instanceof et||(s=kt()),s.parent=i,s}}function xr(t,e){return(t.__esModule||Oe&&t[Symbol.toStringTag]==="Module")&&(t=t.default),W(t)?e.extend(t):t}function Ts(t,e,r,n,i){var a=kt();return a.asyncFactory=t,a.asyncMeta={data:e,context:r,children:n,tag:i},a}function Ps(t,e){if(B(t.error)&&h(t.errorComp))return t.errorComp;if(h(t.resolved))return t.resolved;var r=Be;if(r&&h(t.owners)&&t.owners.indexOf(r)===-1&&t.owners.push(r),B(t.loading)&&h(t.loadingComp))return t.loadingComp;if(r&&!h(t.owners)){var n=t.owners=[r],i=!0,a=null,o=null;r.$on("hook:destroyed",function(){return Rt(n,r)});var s=function(v){for(var m=0,d=n.length;m1?Nr(i):i;for(var a=Nr(arguments,1),o='event handler for "'.concat(r,'"'),s=0,c=i.length;sdocument.createEvent("Event").timeStamp&&(Gr=function(){return Er.now()})}var Xs=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Ys(){Ma=Gr(),yn=!0;var t,e;for(mt.sort(Xs),te=0;tete&&mt[r].id>t.id;)r--;mt.splice(r+1,0,t)}zr||(zr=!0,dn(Ys))}}function tc(t){var e=t.$options.provide;if(e){var r=H(e)?e.call(t):e;if(!W(r))return;for(var n=ss(t),i=Oe?Reflect.ownKeys(r):Object.keys(r),a=0;a-1){if(a&&!q(i,"default"))o=!1;else if(o===""||o===Ee(t)){var c=ci(String,i.type);(c<0||s-1)return this;var n=Nr(arguments,1);return n.unshift(this),H(e.install)?e.install.apply(e,n):H(e)&&e.apply(null,n),r.push(e),this}}function Pc(t){t.mixin=function(e){return this.options=zt(this.options,e),this}}function Rc(t){t.cid=0;var e=1;t.extend=function(r){r=r||{};var n=this,i=n.cid,a=r._Ctor||(r._Ctor={});if(a[i])return a[i];var o=rr(r)||rr(n.options),s=function(u){this._init(u)};return s.prototype=Object.create(n.prototype),s.prototype.constructor=s,s.cid=e++,s.options=zt(n.options,r),s.super=n,s.options.props&&Mc(s),s.options.computed&&Lc(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,hr.forEach(function(c){s[c]=n[c]}),o&&(s.options.components[o]=s),s.superOptions=n.options,s.extendOptions=r,s.sealedOptions=k({},s.options),a[i]=s,s}}function Mc(t){var e=t.options.props;for(var r in e)Cn(t.prototype,"_props",r)}function Lc(t){var e=t.options.computed;for(var r in e)Na(t.prototype,r,e[r])}function Ic(t){hr.forEach(function(e){t[e]=function(r,n){return n?(e==="component"&&tt(n)&&(n.name=n.name||r,n=this.options._base.extend(n)),e==="directive"&&H(n)&&(n={bind:n,update:n}),this.options[e+"s"][r]=n,n):this.options[e+"s"][r]}})}function li(t){return t&&(rr(t.Ctor.options)||t.tag)}function Ie(t,e){return T(t)?t.indexOf(e)>-1:typeof t=="string"?t.split(",").indexOf(e)>-1:jo(t)?t.test(e):!1}function pi(t,e){var r=t.cache,n=t.keys,i=t._vnode,a=t.$vnode;for(var o in r){var s=r[o];if(s){var c=s.name;c&&!e(c)&&Xr(r,o,n,i)}}a.componentOptions.children=void 0}function Xr(t,e,r,n){var i=t[e];i&&(!n||i.tag!==n.tag)&&i.componentInstance.$destroy(),t[e]=null,Rt(r,e)}var vi=[String,RegExp,Array],Nc={name:"keep-alive",abstract:!0,props:{include:vi,exclude:vi,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,r=t.keys,n=t.vnodeToCache,i=t.keyToCache;if(n){var a=n.tag,o=n.componentInstance,s=n.componentOptions;e[i]={name:li(s),tag:a,componentInstance:o},r.push(i),this.max&&r.length>parseInt(this.max)&&Xr(e,r[0],r,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Xr(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",function(e){pi(t,function(r){return Ie(e,r)})}),this.$watch("exclude",function(e){pi(t,function(r){return!Ie(e,r)})})},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Sa(t),r=e&&e.componentOptions;if(r){var n=li(r),i=this,a=i.include,o=i.exclude;if(a&&(!n||!Ie(a,n))||o&&n&&Ie(o,n))return e;var s=this,c=s.cache,u=s.keys,f=e.key==null?r.Ctor.cid+(r.tag?"::".concat(r.tag):""):e.key;c[f]?(e.componentInstance=c[f].componentInstance,Rt(u,f),u.push(f)):(this.vnodeToCache=e,this.keyToCache=f),e.data.keepAlive=!0}return e||t&&t[0]}},jc={KeepAlive:Nc};function Hc(t){var e={};e.get=function(){return at},Object.defineProperty(t,"config",e),t.util={warn:sc,extend:k,mergeOptions:zt,defineReactive:Pt},t.set=pn,t.delete=va,t.nextTick=dn,t.observable=function(r){return _t(r),r},t.options=Object.create(null),hr.forEach(function(r){t.options[r+"s"]=Object.create(null)}),t.options._base=t,k(t.options.components,jc),Tc(t),Pc(t),Rc(t),Ic(t)}Hc(j);Object.defineProperty(j.prototype,"$isServer",{get:Mt});Object.defineProperty(j.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}});Object.defineProperty(j,"FunctionalRenderContext",{value:_n});j.version=Hs;var kc=ut("style,class"),Dc=ut("input,textarea,option,select,progress"),Fc=function(t,e,r){return r==="value"&&Dc(t)&&e!=="button"||r==="selected"&&t==="option"||r==="checked"&&t==="input"||r==="muted"&&t==="video"},ja=ut("contenteditable,draggable,spellcheck"),Zc=ut("events,caret,typing,plaintext-only"),Uc=function(t,e){return ir(e)||e==="false"?"false":t==="contenteditable"&&Zc(e)?e:"true"},Bc=ut("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Yr="http://www.w3.org/1999/xlink",Sn=function(t){return t.charAt(5)===":"&&t.slice(0,5)==="xlink"},Ha=function(t){return Sn(t)?t.slice(6,t.length):""},ir=function(t){return t==null||t===!1};function zc(t){for(var e=t.data,r=t,n=t;h(n.componentInstance);)n=n.componentInstance._vnode,n&&n.data&&(e=hi(n.data,e));for(;h(r=r.parent);)r&&r.data&&(e=hi(e,r.data));return Gc(e.staticClass,e.class)}function hi(t,e){return{staticClass:xn(t.staticClass,e.staticClass),class:h(t.class)?[t.class,e.class]:e.class}}function Gc(t,e){return h(t)||h(e)?xn(t,En(e)):""}function xn(t,e){return t?e?t+" "+e:t:e||""}function En(t){return Array.isArray(t)?Wc(t):W(t)?qc(t):typeof t=="string"?t:""}function Wc(t){for(var e="",r,n=0,i=t.length;n-1?Ne[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Ne[t]=/HTMLUnknownElement/.test(e.toString())}var Jr=ut("text,number,password,search,email,tel,url");function Qc(t){if(typeof t=="string"){var e=document.querySelector(t);return e||document.createElement("div")}else return t}function Vc(t,e){var r=document.createElement(t);return t!=="select"||e.data&&e.data.attrs&&e.data.attrs.multiple!==void 0&&r.setAttribute("multiple","multiple"),r}function tu(t,e){return document.createElementNS(Kc[t],e)}function eu(t){return document.createTextNode(t)}function ru(t){return document.createComment(t)}function nu(t,e,r){t.insertBefore(e,r)}function iu(t,e){t.removeChild(e)}function au(t,e){t.appendChild(e)}function ou(t){return t.parentNode}function su(t){return t.nextSibling}function cu(t){return t.tagName}function uu(t,e){t.textContent=e}function fu(t,e){t.setAttribute(e,"")}var lu=Object.freeze({__proto__:null,createElement:Vc,createElementNS:tu,createTextNode:eu,createComment:ru,insertBefore:nu,removeChild:iu,appendChild:au,parentNode:ou,nextSibling:su,tagName:cu,setTextContent:uu,setStyleScope:fu}),pu={create:function(t,e){ee(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ee(t,!0),ee(e))},destroy:function(t){ee(t,!0)}};function ee(t,e){var r=t.data.ref;if(h(r)){var n=t.context,i=t.componentInstance||t.elm,a=e?null:i,o=e?void 0:i;if(H(r)){bt(r,n,[a],n,"template ref function");return}var s=t.data.refInFor,c=typeof r=="string"||typeof r=="number",u=Q(r),f=n.$refs;if(c||u){if(s){var v=c?f[r]:r.value;e?T(v)&&Rt(v,i):T(v)?v.includes(i)||v.push(i):c?(f[r]=[i],di(n,r,f[r])):r.value=[i]}else if(c){if(e&&f[r]!==i)return;f[r]=o,di(n,r,a)}else if(u){if(e&&r.value!==i)return;r.value=a}}}}function di(t,e,r){var n=t._setupState;n&&q(n,e)&&(Q(n[e])?n[e].value=r:n[e]=r)}var St=new et("",{},[]),pe=["create","activate","update","remove","destroy"];function Ht(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&h(t.data)===h(e.data)&&vu(t,e)||B(t.isAsyncPlaceholder)&&x(e.asyncFactory.error))}function vu(t,e){if(t.tag!=="input")return!0;var r,n=h(r=t.data)&&h(r=r.attrs)&&r.type,i=h(r=e.data)&&h(r=r.attrs)&&r.type;return n===i||Jr(n)&&Jr(i)}function hu(t,e,r){var n,i,a={};for(n=e;n<=r;++n)i=t[n].key,h(i)&&(a[i]=n);return a}function du(t){var e,r,n={},i=t.modules,a=t.nodeOps;for(e=0;eO?(Xt=x(g[N+1])?null:g[N+1].elm,$(p,Xt,g,E,N,C)):E>N&&P(l,R,O)}function Z(p,l,g,C){for(var S=g;S-1?_i(t,e,r):Bc(e)?ir(r)?t.removeAttribute(e):(r=e==="allowfullscreen"&&t.tagName==="EMBED"?"true":e,t.setAttribute(e,r)):ja(e)?t.setAttribute(e,Uc(e,r)):Sn(e)?ir(r)?t.removeAttributeNS(Yr,Ha(e)):t.setAttributeNS(Yr,e,r):_i(t,e,r)}function _i(t,e,r){if(ir(r))t.removeAttribute(e);else{if(ae&&!oe&&t.tagName==="TEXTAREA"&&e==="placeholder"&&r!==""&&!t.__ieph){var n=function(i){i.stopImmediatePropagation(),t.removeEventListener("input",n)};t.addEventListener("input",n),t.__ieph=!0}t.setAttribute(e,r)}}var wu={create:gi,update:gi};function bi(t,e){var r=e.elm,n=e.data,i=t.data;if(!(x(n.staticClass)&&x(n.class)&&(x(i)||x(i.staticClass)&&x(i.class)))){var a=zc(e),o=r._transitionClasses;h(o)&&(a=xn(a,En(o))),a!==r._prevClass&&(r.setAttribute("class",a),r._prevClass=a)}}var Cu={create:bi,update:bi},Ar="__r",Tr="__c";function $u(t){if(h(t[Ar])){var e=ae?"change":"input";t[e]=[].concat(t[Ar],t[e]||[]),delete t[Ar]}h(t[Tr])&&(t.change=[].concat(t[Tr],t.change||[]),delete t[Tr])}var Se;function Su(t,e,r){var n=Se;return function i(){var a=e.apply(null,arguments);a!==null&&Da(t,i,r,n)}}var xu=Zr&&!(Fn&&Number(Fn[1])<=53);function Eu(t,e,r,n){if(xu){var i=Ma,a=e;e=a._wrapper=function(o){if(o.target===o.currentTarget||o.timeStamp>=i||o.timeStamp<=0||o.target.ownerDocument!==document)return a.apply(this,arguments)}}Se.addEventListener(t,e,fa?{capture:r,passive:n}:r)}function Da(t,e,r,n){(n||Se).removeEventListener(t,e._wrapper||e,r)}function Pr(t,e){if(!(x(t.data.on)&&x(e.data.on))){var r=e.data.on||{},n=t.data.on||{};Se=e.elm||t.elm,$u(r),ya(r,n,Eu,Da,Su,e.context),Se=void 0}}var Ou={create:Pr,update:Pr,destroy:function(t){return Pr(t,St)}},je;function wi(t,e){if(!(x(t.data.domProps)&&x(e.data.domProps))){var r,n,i=e.elm,a=t.data.domProps||{},o=e.data.domProps||{};(h(o.__ob__)||B(o._v_attr_proxy))&&(o=e.data.domProps=k({},o));for(r in a)r in o||(i[r]="");for(r in o){if(n=o[r],r==="textContent"||r==="innerHTML"){if(e.children&&(e.children.length=0),n===a[r])continue;i.childNodes.length===1&&i.removeChild(i.childNodes[0])}if(r==="value"&&i.tagName!=="PROGRESS"){i._value=n;var s=x(n)?"":String(n);Au(i,s)&&(i.value=s)}else if(r==="innerHTML"&&On(i.tagName)&&x(i.innerHTML)){je=je||document.createElement("div"),je.innerHTML="".concat(n,"");for(var c=je.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;c.firstChild;)i.appendChild(c.firstChild)}else if(n!==a[r])try{i[r]=n}catch{}}}}function Au(t,e){return!t.composing&&(t.tagName==="OPTION"||Tu(t,e)||Pu(t,e))}function Tu(t,e){var r=!0;try{r=document.activeElement!==t}catch{}return r&&t.value!==e}function Pu(t,e){var r=t.value,n=t._vModifiers;if(h(n)){if(n.number)return ye(r)!==ye(e);if(n.trim)return r.trim()!==e.trim()}return r!==e}var Ru={create:wi,update:wi},Mu=Gt(function(t){var e={},r=/;(?![^(]*\))/g,n=/:(.+)/;return t.split(r).forEach(function(i){if(i){var a=i.split(n);a.length>1&&(e[a[0].trim()]=a[1].trim())}}),e});function Rr(t){var e=Fa(t.style);return t.staticStyle?k(t.staticStyle,e):e}function Fa(t){return Array.isArray(t)?ia(t):typeof t=="string"?Mu(t):t}function Lu(t,e){for(var r={},n,i=t;i.componentInstance;)i=i.componentInstance._vnode,i&&i.data&&(n=Rr(i.data))&&k(r,n);(n=Rr(t.data))&&k(r,n);for(var a=t;a=a.parent;)a.data&&(n=Rr(a.data))&&k(r,n);return r}var Iu=/^--/,Ci=/\s*!important$/,$i=function(t,e,r){if(Iu.test(e))t.style.setProperty(e,r);else if(Ci.test(r))t.style.setProperty(Ee(e),r.replace(Ci,""),"important");else{var n=Nu(e);if(Array.isArray(r))for(var i=0,a=r.length;i-1?e.split(Za).forEach(function(n){return t.classList.add(n)}):t.classList.add(e);else{var r=" ".concat(t.getAttribute("class")||""," ");r.indexOf(" "+e+" ")<0&&t.setAttribute("class",(r+e).trim())}}function Ba(t,e){if(!(!e||!(e=e.trim())))if(t.classList)e.indexOf(" ")>-1?e.split(Za).forEach(function(i){return t.classList.remove(i)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var r=" ".concat(t.getAttribute("class")||""," "),n=" "+e+" ";r.indexOf(n)>=0;)r=r.replace(n," ");r=r.trim(),r?t.setAttribute("class",r):t.removeAttribute("class")}}function za(t){if(t){if(typeof t=="object"){var e={};return t.css!==!1&&k(e,Ei(t.name||"v")),k(e,t),e}else if(typeof t=="string")return Ei(t)}}var Ei=Gt(function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}}),Ga=rt&&!oe,Qt="transition",Mr="animation",Ge="transition",ar="transitionend",Qr="animation",Wa="animationend";Ga&&(window.ontransitionend===void 0&&window.onwebkittransitionend!==void 0&&(Ge="WebkitTransition",ar="webkitTransitionEnd"),window.onanimationend===void 0&&window.onwebkitanimationend!==void 0&&(Qr="WebkitAnimation",Wa="webkitAnimationEnd"));var Oi=rt?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function qa(t){Oi(function(){Oi(t)})}function Ft(t,e){var r=t._transitionClasses||(t._transitionClasses=[]);r.indexOf(e)<0&&(r.push(e),Ua(t,e))}function gt(t,e){t._transitionClasses&&Rt(t._transitionClasses,e),Ba(t,e)}function Ka(t,e,r){var n=Xa(t,e),i=n.type,a=n.timeout,o=n.propCount;if(!i)return r();var s=i===Qt?ar:Wa,c=0,u=function(){t.removeEventListener(s,f),r()},f=function(v){v.target===t&&++c>=o&&u()};setTimeout(function(){c0&&(u=Qt,f=a,v=i.length):e===Mr?c>0&&(u=Mr,f=c,v=s.length):(f=Math.max(a,c),u=f>0?a>c?Qt:Mr:null,v=u?u===Qt?i.length:s.length:0);var m=u===Qt&&Hu.test(r[Ge+"Property"]);return{type:u,timeout:f,propCount:v,hasTransform:m}}function Ai(t,e){for(;t.length1}function Pi(t,e){e.data.show!==!0&&Vr(e)}var ku=rt?{create:Pi,activate:Pi,remove:function(t,e){t.data.show!==!0?Ya(t,e):e()}}:{},Du=[wu,Cu,Ou,Ru,ju,ku],Fu=Du.concat(bu),Zu=du({nodeOps:lu,modules:Fu});oe&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Tn(t,"input")});var Qa={inserted:function(t,e,r,n){r.tag==="select"?(n.elm&&!n.elm._vOptions?$t(r,"postpatch",function(){Qa.componentUpdated(t,e,r)}):Ri(t,e,r.context),t._vOptions=[].map.call(t.options,or)):(r.tag==="textarea"||Jr(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Uu),t.addEventListener("compositionend",Ii),t.addEventListener("change",Ii),oe&&(t.vmodel=!0)))},componentUpdated:function(t,e,r){if(r.tag==="select"){Ri(t,e,r.context);var n=t._vOptions,i=t._vOptions=[].map.call(t.options,or);if(i.some(function(o,s){return!Ut(o,n[s])})){var a=t.multiple?e.value.some(function(o){return Li(o,i)}):e.value!==e.oldValue&&Li(e.value,i);a&&Tn(t,"change")}}}};function Ri(t,e,r){Mi(t,e),(ae||ua)&&setTimeout(function(){Mi(t,e)},0)}function Mi(t,e,r){var n=e.value,i=t.multiple;if(!(i&&!Array.isArray(n))){for(var a,o,s=0,c=t.options.length;s-1,o.selected!==a&&(o.selected=a);else if(Ut(or(o),n)){t.selectedIndex!==s&&(t.selectedIndex=s);return}i||(t.selectedIndex=-1)}}function Li(t,e){return e.every(function(r){return!Ut(r,t)})}function or(t){return"_value"in t?t._value:t.value}function Uu(t){t.target.composing=!0}function Ii(t){t.target.composing&&(t.target.composing=!1,Tn(t.target,"input"))}function Tn(t,e){var r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0),t.dispatchEvent(r)}function tn(t){return t.componentInstance&&(!t.data||!t.data.transition)?tn(t.componentInstance._vnode):t}var Bu={bind:function(t,e,r){var n=e.value;r=tn(r);var i=r.data&&r.data.transition,a=t.__vOriginalDisplay=t.style.display==="none"?"":t.style.display;n&&i?(r.data.show=!0,Vr(r,function(){t.style.display=a})):t.style.display=n?a:"none"},update:function(t,e,r){var n=e.value,i=e.oldValue;if(!n!=!i){r=tn(r);var a=r.data&&r.data.transition;a?(r.data.show=!0,n?Vr(r,function(){t.style.display=t.__vOriginalDisplay}):Ya(r,function(){t.style.display="none"})):t.style.display=n?t.__vOriginalDisplay:"none"}},unbind:function(t,e,r,n,i){i||(t.style.display=t.__vOriginalDisplay)}},zu={model:Qa,show:Bu},Va={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function en(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?en(Sa(e.children)):t}function to(t){var e={},r=t.$options;for(var n in r.propsData)e[n]=t[n];var i=r._parentListeners;for(var n in i)e[Zt(n)]=i[n];return e}function Ni(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Gu(t){for(;t=t.parent;)if(t.data.transition)return!0}function Wu(t,e){return e.key===t.key&&e.tag===t.tag}var qu=function(t){return t.tag||be(t)},Ku=function(t){return t.name==="show"},Xu={name:"transition",props:Va,abstract:!0,render:function(t){var e=this,r=this.$slots.default;if(r&&(r=r.filter(qu),!!r.length)){var n=this.mode,i=r[0];if(Gu(this.$vnode))return i;var a=en(i);if(!a)return i;if(this._leaving)return Ni(t,i);var o="__transition-".concat(this._uid,"-");a.key=a.key==null?a.isComment?o+"comment":o+a.tag:xe(a.key)?String(a.key).indexOf(o)===0?a.key:o+a.key:a.key;var s=(a.data||(a.data={})).transition=to(this),c=this._vnode,u=en(c);if(a.data.directives&&a.data.directives.some(Ku)&&(a.data.show=!0),u&&u.data&&!Wu(a,u)&&!be(u)&&!(u.componentInstance&&u.componentInstance._vnode.isComment)){var f=u.data.transition=k({},s);if(n==="out-in")return this._leaving=!0,$t(f,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Ni(t,i);if(n==="in-out"){if(be(a))return c;var v,m=function(){v()};$t(s,"afterEnter",m),$t(s,"enterCancelled",m),$t(f,"delayLeave",function(d){v=d})}}return i}}},eo=k({tag:String,moveClass:String},Va);delete eo.mode;var Yu={props:eo,beforeMount:function(){var t=this,e=this._update;this._update=function(r,n){var i=Ta(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,r,n)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",r=Object.create(null),n=this.prevChildren=this.children,i=this.$slots.default||[],a=this.children=[],o=to(this),s=0;s0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(c=>{if(c=cf(c),c in ji)return;ji[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const v=document.createElement("link");if(v.rel=u?"stylesheet":sf,u||(v.as="script"),v.crossOrigin="",v.href=c,s&&v.setAttribute("nonce",s),document.head.appendChild(v),u)return new Promise((m,d)=>{v.addEventListener("load",m),v.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return e().catch(a)})};/*! + * vue-router v3.6.5 + * (c) 2022 Evan You + * @license MIT + */function st(t,e){for(var r in e)t[r]=e[r];return t}var uf=/[!'()*]/g,ff=function(t){return"%"+t.charCodeAt(0).toString(16)},lf=/%2C/g,Yt=function(t){return encodeURIComponent(t).replace(uf,ff).replace(lf,",")};function rn(t){try{return decodeURIComponent(t)}catch{}return t}function pf(t,e,r){e===void 0&&(e={});var n=r||vf,i;try{i=n(t||"")}catch{i={}}for(var a in e){var o=e[a];i[a]=Array.isArray(o)?o.map(Hi):Hi(o)}return i}var Hi=function(t){return t==null||typeof t=="object"?t:String(t)};function vf(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t&&t.split("&").forEach(function(r){var n=r.replace(/\+/g," ").split("="),i=rn(n.shift()),a=n.length>0?rn(n.join("=")):null;e[i]===void 0?e[i]=a:Array.isArray(e[i])?e[i].push(a):e[i]=[e[i],a]}),e}function hf(t){var e=t?Object.keys(t).map(function(r){var n=t[r];if(n===void 0)return"";if(n===null)return Yt(r);if(Array.isArray(n)){var i=[];return n.forEach(function(a){a!==void 0&&(a===null?i.push(Yt(r)):i.push(Yt(r)+"="+Yt(a)))}),i.join("&")}return Yt(r)+"="+Yt(n)}).filter(function(r){return r.length>0}).join("&"):null;return e?"?"+e:""}var sr=/\/?$/;function cr(t,e,r,n){var i=n&&n.options.stringifyQuery,a=e.query||{};try{a=nn(a)}catch{}var o={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:a,params:e.params||{},fullPath:ki(e,i),matched:t?df(t):[]};return r&&(o.redirectedFrom=ki(r,i)),Object.freeze(o)}function nn(t){if(Array.isArray(t))return t.map(nn);if(t&&typeof t=="object"){var e={};for(var r in t)e[r]=nn(t[r]);return e}else return t}var Lt=cr(null,{path:"/"});function df(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function ki(t,e){var r=t.path,n=t.query;n===void 0&&(n={});var i=t.hash;i===void 0&&(i="");var a=e||hf;return(r||"/")+a(n)+i}function ro(t,e,r){return e===Lt?t===e:e?t.path&&e.path?t.path.replace(sr,"")===e.path.replace(sr,"")&&(r||t.hash===e.hash&&We(t.query,e.query)):t.name&&e.name?t.name===e.name&&(r||t.hash===e.hash&&We(t.query,e.query)&&We(t.params,e.params)):!1:!1}function We(t,e){if(t===void 0&&(t={}),e===void 0&&(e={}),!t||!e)return t===e;var r=Object.keys(t).sort(),n=Object.keys(e).sort();return r.length!==n.length?!1:r.every(function(i,a){var o=t[i],s=n[a];if(s!==i)return!1;var c=e[i];return o==null||c==null?o===c:typeof o=="object"&&typeof c=="object"?We(o,c):String(o)===String(c)})}function mf(t,e){return t.path.replace(sr,"/").indexOf(e.path.replace(sr,"/"))===0&&(!e.hash||t.hash===e.hash)&&gf(t.query,e.query)}function gf(t,e){for(var r in e)if(!(r in t))return!1;return!0}function no(t){for(var e=0;e=0&&(e=t.slice(n),t=t.slice(0,n));var i=t.indexOf("?");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{path:t,query:r,hash:e}}function xt(t){return t.replace(/\/(?:\s*\/)+/g,"/")}var ur=Array.isArray||function(t){return Object.prototype.toString.call(t)=="[object Array]"},ue=so,wf=Pn,Cf=Ef,$f=ao,Sf=oo,xf=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function Pn(t,e){for(var r=[],n=0,i=0,a="",o=e&&e.delimiter||"/",s;(s=xf.exec(t))!=null;){var c=s[0],u=s[1],f=s.index;if(a+=t.slice(i,f),i=f+c.length,u){a+=u[1];continue}var v=t[i],m=s[2],d=s[3],_=s[4],b=s[5],y=s[6],w=s[7];a&&(r.push(a),a="");var $=m!=null&&v!=null&&v!==m,A=y==="+"||y==="*",P=y==="?"||y==="*",L=s[2]||o,F=_||b;r.push({name:d||n++,prefix:m||"",delimiter:L,optional:P,repeat:A,partial:$,asterisk:!!w,pattern:F?Tf(F):w?".*":"[^"+qe(L)+"]+?"})}return i1||!L.length)return L.length===0?e():e("span",{},L)}if(this.tag==="a")P.on=A,P.attrs={href:c,"aria-current":w};else{var F=co(this.$slots.default);if(F){F.isStatic=!1;var Z=F.data=st({},F.data);Z.on=Z.on||{};for(var z in Z.on){var vt=Z.on[z];z in A&&(Z.on[z]=Array.isArray(vt)?vt:[vt])}for(var ht in A)ht in Z.on?Z.on[ht].push(A[ht]):Z.on[ht]=$;var dt=F.data.attrs=st({},F.data.attrs);dt.href=c,dt["aria-current"]=w}else P.on=A}return e(this.tag,P,this.$slots.default)}};function Ui(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function co(t){if(t){for(var e,r=0;r-1&&(y.params[P]=_.params[P]);return y.path=Ke($.path,y.params),m($,y,b)}else if(y.path){y.params={};for(var L=0;L-1}function _r(t,e){return pr(t)&&t._isRouter&&(e==null||t.type===e)}function Ki(t,e,r){var n=function(i){i>=t.length?r():t[i]?e(t[i],function(){n(i+1)}):n(i+1)};n(0)}function Jf(t){return function(e,r,n){var i=!1,a=0,o=null;mo(t,function(s,c,u,f){if(typeof s=="function"&&s.cid===void 0){i=!0,a++;var v=Xi(function(b){Vf(b)&&(b=b.default),s.resolved=typeof b=="function"?b:fr.extend(b),u.components[f]=b,a--,a<=0&&n()}),m=Xi(function(b){var y="Failed to resolve async component "+f+": "+b;o||(o=pr(b)?b:new Error(y),n(o))}),d;try{d=s(v,m)}catch(b){m(b)}if(d)if(typeof d.then=="function")d.then(v,m);else{var _=d.component;_&&typeof _.then=="function"&&_.then(v,m)}}}),i||n()}}function mo(t,e){return go(t.map(function(r){return Object.keys(r.components).map(function(n){return e(r.components[n],r.instances[n],r,n)})}))}function go(t){return Array.prototype.concat.apply([],t)}var Qf=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Vf(t){return t.__esModule||Qf&&t[Symbol.toStringTag]==="Module"}function Xi(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}var ft=function(e,r){this.router=e,this.base=tl(r),this.current=Lt,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};ft.prototype.listen=function(e){this.cb=e};ft.prototype.onReady=function(e,r){this.ready?e():(this.readyCbs.push(e),r&&this.readyErrorCbs.push(r))};ft.prototype.onError=function(e){this.errorCbs.push(e)};ft.prototype.transitionTo=function(e,r,n){var i=this,a;try{a=this.router.match(e,this.current)}catch(s){throw this.errorCbs.forEach(function(c){c(s)}),s}var o=this.current;this.confirmTransition(a,function(){i.updateRoute(a),r&&r(a),i.ensureURL(),i.router.afterHooks.forEach(function(s){s&&s(a,o)}),i.ready||(i.ready=!0,i.readyCbs.forEach(function(s){s(a)}))},function(s){n&&n(s),s&&!i.ready&&(!_r(s,qt.redirected)||o!==Lt)&&(i.ready=!0,i.readyErrorCbs.forEach(function(c){c(s)}))})};ft.prototype.confirmTransition=function(e,r,n){var i=this,a=this.current;this.pending=e;var o=function(b){!_r(b)&&pr(b)&&(i.errorCbs.length?i.errorCbs.forEach(function(y){y(b)}):console.error(b)),n&&n(b)},s=e.matched.length-1,c=a.matched.length-1;if(ro(e,a)&&s===c&&e.matched[s]===a.matched[c])return this.ensureURL(),e.hash&&Et(this.router,a,e,!1),o(qf(a,e));var u=el(this.current.matched,e.matched),f=u.updated,v=u.deactivated,m=u.activated,d=[].concat(nl(v),this.router.beforeHooks,il(f),m.map(function(b){return b.beforeEnter}),Jf(m)),_=function(b,y){if(i.pending!==e)return o(qi(a,e));try{b(e,a,function(w){w===!1?(i.ensureURL(!0),o(Kf(a,e))):pr(w)?(i.ensureURL(!0),o(w)):typeof w=="string"||typeof w=="object"&&(typeof w.path=="string"||typeof w.name=="string")?(o(Wf(a,e)),typeof w=="object"&&w.replace?i.replace(w):i.push(w)):y(w)})}catch(w){o(w)}};Ki(d,_,function(){var b=al(m),y=b.concat(i.router.resolveHooks);Ki(y,_,function(){if(i.pending!==e)return o(qi(a,e));i.pending=null,r(e),i.router.app&&i.router.app.$nextTick(function(){no(e)})})})};ft.prototype.updateRoute=function(e){this.current=e,this.cb&&this.cb(e)};ft.prototype.setupListeners=function(){};ft.prototype.teardown=function(){this.listeners.forEach(function(e){e()}),this.listeners=[],this.current=Lt,this.pending=null};function tl(t){if(!t)if(Te){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return t.charAt(0)!=="/"&&(t="/"+t),t.replace(/\/$/,"")}function el(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r0)){var i=this.router,a=i.options.scrollBehavior,o=Ot&&a;o&&this.listeners.push(vo());var s=function(){var c=n.current,u=de(n.base);n.current===Lt&&u===n._startLocation||n.transitionTo(u,function(f){o&&Et(i,f,c,!0)})};window.addEventListener("popstate",s),this.listeners.push(function(){window.removeEventListener("popstate",s)})}},e.prototype.go=function(n){window.history.go(n)},e.prototype.push=function(n,i,a){var o=this,s=this,c=s.current;this.transitionTo(n,function(u){lr(xt(o.base+u.fullPath)),Et(o.router,u,c,!1),i&&i(u)},a)},e.prototype.replace=function(n,i,a){var o=this,s=this,c=s.current;this.transitionTo(n,function(u){sn(xt(o.base+u.fullPath)),Et(o.router,u,c,!1),i&&i(u)},a)},e.prototype.ensureURL=function(n){if(de(this.base)!==this.current.fullPath){var i=xt(this.base+this.current.fullPath);n?lr(i):sn(i)}},e.prototype.getCurrentLocation=function(){return de(this.base)},e}(ft);function de(t){var e=window.location.pathname,r=e.toLowerCase(),n=t.toLowerCase();return t&&(r===n||r.indexOf(xt(n+"/"))===0)&&(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var bo=function(t){function e(r,n,i){t.call(this,r,n),!(i&&sl(this.base))&&Yi()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var n=this;if(!(this.listeners.length>0)){var i=this.router,a=i.options.scrollBehavior,o=Ot&&a;o&&this.listeners.push(vo());var s=function(){var u=n.current;Yi()&&n.transitionTo(Xe(),function(f){o&&Et(n.router,f,u,!0),Ot||Ye(f.fullPath)})},c=Ot?"popstate":"hashchange";window.addEventListener(c,s),this.listeners.push(function(){window.removeEventListener(c,s)})}},e.prototype.push=function(n,i,a){var o=this,s=this,c=s.current;this.transitionTo(n,function(u){Ji(u.fullPath),Et(o.router,u,c,!1),i&&i(u)},a)},e.prototype.replace=function(n,i,a){var o=this,s=this,c=s.current;this.transitionTo(n,function(u){Ye(u.fullPath),Et(o.router,u,c,!1),i&&i(u)},a)},e.prototype.go=function(n){window.history.go(n)},e.prototype.ensureURL=function(n){var i=this.current.fullPath;Xe()!==i&&(n?Ji(i):Ye(i))},e.prototype.getCurrentLocation=function(){return Xe()},e}(ft);function sl(t){var e=de(t);if(!/^\/#/.test(e))return window.location.replace(xt(t+"/#"+e)),!0}function Yi(){var t=Xe();return t.charAt(0)==="/"?!0:(Ye("/"+t),!1)}function Xe(){var t=window.location.href,e=t.indexOf("#");return e<0?"":(t=t.slice(e+1),t)}function cn(t){var e=window.location.href,r=e.indexOf("#"),n=r>=0?e.slice(0,r):e;return n+"#"+t}function Ji(t){Ot?lr(cn(t)):window.location.hash=t}function Ye(t){Ot?sn(cn(t)):window.location.replace(cn(t))}var cl=function(t){function e(r,n){t.call(this,r,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(n,i,a){var o=this;this.transitionTo(n,function(s){o.stack=o.stack.slice(0,o.index+1).concat(s),o.index++,i&&i(s)},a)},e.prototype.replace=function(n,i,a){var o=this;this.transitionTo(n,function(s){o.stack=o.stack.slice(0,o.index).concat(s),i&&i(s)},a)},e.prototype.go=function(n){var i=this,a=this.index+n;if(!(a<0||a>=this.stack.length)){var o=this.stack[a];this.confirmTransition(o,function(){var s=i.current;i.index=a,i.updateRoute(o),i.router.afterHooks.forEach(function(c){c&&c(o,s)})},function(s){_r(s,qt.duplicated)&&(i.index=a)})}},e.prototype.getCurrentLocation=function(){var n=this.stack[this.stack.length-1];return n?n.fullPath:"/"},e.prototype.ensureURL=function(){},e}(ft),D=function(e){e===void 0&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=kf(e.routes||[],this);var r=e.mode||"hash";switch(this.fallback=r==="history"&&!Ot&&e.fallback!==!1,this.fallback&&(r="hash"),Te||(r="abstract"),this.mode=r,r){case"history":this.history=new _o(this,e.base);break;case"hash":this.history=new bo(this,e.base,this.fallback);break;case"abstract":this.history=new cl(this,e.base);break}},wo={currentRoute:{configurable:!0}};D.prototype.match=function(e,r,n){return this.matcher.match(e,r,n)};wo.currentRoute.get=function(){return this.history&&this.history.current};D.prototype.init=function(e){var r=this;if(this.apps.push(e),e.$once("hook:destroyed",function(){var o=r.apps.indexOf(e);o>-1&&r.apps.splice(o,1),r.app===e&&(r.app=r.apps[0]||null),r.app||r.history.teardown()}),!this.app){this.app=e;var n=this.history;if(n instanceof _o||n instanceof bo){var i=function(o){var s=n.current,c=r.options.scrollBehavior,u=Ot&&c;u&&"fullPath"in o&&Et(r,o,s,!1)},a=function(o){n.setupListeners(),i(o)};n.transitionTo(n.getCurrentLocation(),a,a)}n.listen(function(o){r.apps.forEach(function(s){s._route=o})})}};D.prototype.beforeEach=function(e){return Nn(this.beforeHooks,e)};D.prototype.beforeResolve=function(e){return Nn(this.resolveHooks,e)};D.prototype.afterEach=function(e){return Nn(this.afterHooks,e)};D.prototype.onReady=function(e,r){this.history.onReady(e,r)};D.prototype.onError=function(e){this.history.onError(e)};D.prototype.push=function(e,r,n){var i=this;if(!r&&!n&&typeof Promise<"u")return new Promise(function(a,o){i.history.push(e,a,o)});this.history.push(e,r,n)};D.prototype.replace=function(e,r,n){var i=this;if(!r&&!n&&typeof Promise<"u")return new Promise(function(a,o){i.history.replace(e,a,o)});this.history.replace(e,r,n)};D.prototype.go=function(e){this.history.go(e)};D.prototype.back=function(){this.go(-1)};D.prototype.forward=function(){this.go(1)};D.prototype.getMatchedComponents=function(e){var r=e?e.matched?e:this.resolve(e).route:this.currentRoute;return r?[].concat.apply([],r.matched.map(function(n){return Object.keys(n.components).map(function(i){return n.components[i]})})):[]};D.prototype.resolve=function(e,r,n){r=r||this.history.current;var i=Ln(e,r,n,this),a=this.match(i,r),o=a.redirectedFrom||a.fullPath,s=this.history.base,c=ul(s,o,this.mode);return{location:i,route:a,href:c,normalizedTo:i,resolved:a}};D.prototype.getRoutes=function(){return this.matcher.getRoutes()};D.prototype.addRoute=function(e,r){this.matcher.addRoute(e,r),this.history.current!==Lt&&this.history.transitionTo(this.history.getCurrentLocation())};D.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==Lt&&this.history.transitionTo(this.history.getCurrentLocation())};Object.defineProperties(D.prototype,wo);var Co=D;function Nn(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function ul(t,e,r){var n=r==="hash"?"#"+e:e;return t?xt(t+"/"+n):n}D.install=an;D.version="3.6.5";D.isNavigationFailure=_r;D.NavigationFailureType=qt;D.START_LOCATION=Lt;Te&&window.Vue&&window.Vue.use(D);j.use(Co);const fl=[{path:"/",name:"Home",component:()=>Lr(()=>import("./HomeView-DSukVaE6.js"),__vite__mapDeps([0,1])),alias:"/home"},{path:"/about",name:"About",component:()=>Lr(()=>import("./AboutView-DhQgT-Pg.js"),[])},{path:"/editors",name:"Editors",component:()=>Lr(()=>import("./EditorsView-CfbKsDLC.js"),__vite__mapDeps([2,3]))}],ll=new Co({mode:"history",base:"/vue-editor/",routes:fl});/*! + * vuex v3.6.2 + * (c) 2021 Evan You + * @license MIT + */function pl(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:n});else{var r=t.prototype._init;t.prototype._init=function(i){i===void 0&&(i={}),i.init=i.init?[n].concat(i.init):n,r.call(this,i)}}function n(){var i=this.$options;i.store?this.$store=typeof i.store=="function"?i.store():i.store:i.parent&&i.parent.$store&&(this.$store=i.parent.$store)}}var vl=typeof window<"u"?window:typeof global<"u"?global:{},Jt=vl.__VUE_DEVTOOLS_GLOBAL_HOOK__;function hl(t){Jt&&(t._devtoolHook=Jt,Jt.emit("vuex:init",t),Jt.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(e,r){Jt.emit("vuex:mutation",e,r)},{prepend:!0}),t.subscribeAction(function(e,r){Jt.emit("vuex:action",e,r)},{prepend:!0}))}function dl(t,e){return t.filter(e)[0]}function un(t,e){if(e===void 0&&(e=[]),t===null||typeof t!="object")return t;var r=dl(e,function(i){return i.original===t});if(r)return r.copy;var n=Array.isArray(t)?[]:{};return e.push({original:t,copy:n}),Object.keys(t).forEach(function(i){n[i]=un(t[i],e)}),n}function fe(t,e){Object.keys(t).forEach(function(r){return e(t[r],r)})}function $o(t){return t!==null&&typeof t=="object"}function ml(t){return t&&typeof t.then=="function"}function gl(t,e){return function(){return t(e)}}var lt=function(e,r){this.runtime=r,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=(typeof n=="function"?n():n)||{}},So={namespaced:{configurable:!0}};So.namespaced.get=function(){return!!this._rawModule.namespaced};lt.prototype.addChild=function(e,r){this._children[e]=r};lt.prototype.removeChild=function(e){delete this._children[e]};lt.prototype.getChild=function(e){return this._children[e]};lt.prototype.hasChild=function(e){return e in this._children};lt.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)};lt.prototype.forEachChild=function(e){fe(this._children,e)};lt.prototype.forEachGetter=function(e){this._rawModule.getters&&fe(this._rawModule.getters,e)};lt.prototype.forEachAction=function(e){this._rawModule.actions&&fe(this._rawModule.actions,e)};lt.prototype.forEachMutation=function(e){this._rawModule.mutations&&fe(this._rawModule.mutations,e)};Object.defineProperties(lt.prototype,So);var Kt=function(e){this.register([],e,!1)};Kt.prototype.get=function(e){return e.reduce(function(r,n){return r.getChild(n)},this.root)};Kt.prototype.getNamespace=function(e){var r=this.root;return e.reduce(function(n,i){return r=r.getChild(i),n+(r.namespaced?i+"/":"")},"")};Kt.prototype.update=function(e){xo([],this.root,e)};Kt.prototype.register=function(e,r,n){var i=this;n===void 0&&(n=!0);var a=new lt(r,n);if(e.length===0)this.root=a;else{var o=this.get(e.slice(0,-1));o.addChild(e[e.length-1],a)}r.modules&&fe(r.modules,function(s,c){i.register(e.concat(c),s,n)})};Kt.prototype.unregister=function(e){var r=this.get(e.slice(0,-1)),n=e[e.length-1],i=r.getChild(n);i&&i.runtime&&r.removeChild(n)};Kt.prototype.isRegistered=function(e){var r=this.get(e.slice(0,-1)),n=e[e.length-1];return r?r.hasChild(n):!1};function xo(t,e,r){if(e.update(r),r.modules)for(var n in r.modules){if(!e.getChild(n))return;xo(t.concat(n),e.getChild(n),r.modules[n])}}var Y,nt=function(e){var r=this;e===void 0&&(e={}),!Y&&typeof window<"u"&&window.Vue&&Ao(window.Vue);var n=e.plugins;n===void 0&&(n=[]);var i=e.strict;i===void 0&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Kt(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Y,this._makeLocalGettersCache=Object.create(null);var a=this,o=this,s=o.dispatch,c=o.commit;this.dispatch=function(m,d){return s.call(a,m,d)},this.commit=function(m,d,_){return c.call(a,m,d,_)},this.strict=i;var u=this._modules.root.state;br(this,u,[],this._modules.root),Hn(this,u),n.forEach(function(v){return v(r)});var f=e.devtools!==void 0?e.devtools:Y.config.devtools;f&&hl(this)},jn={state:{configurable:!0}};jn.state.get=function(){return this._vm._data.$$state};jn.state.set=function(t){};nt.prototype.commit=function(e,r,n){var i=this,a=vr(e,r,n),o=a.type,s=a.payload,c={type:o,payload:s},u=this._mutations[o];u&&(this._withCommit(function(){u.forEach(function(v){v(s)})}),this._subscribers.slice().forEach(function(f){return f(c,i.state)}))};nt.prototype.dispatch=function(e,r){var n=this,i=vr(e,r),a=i.type,o=i.payload,s={type:a,payload:o},c=this._actions[a];if(c){try{this._actionSubscribers.slice().filter(function(f){return f.before}).forEach(function(f){return f.before(s,n.state)})}catch{}var u=c.length>1?Promise.all(c.map(function(f){return f(o)})):c[0](o);return new Promise(function(f,v){u.then(function(m){try{n._actionSubscribers.filter(function(d){return d.after}).forEach(function(d){return d.after(s,n.state)})}catch{}f(m)},function(m){try{n._actionSubscribers.filter(function(d){return d.error}).forEach(function(d){return d.error(s,n.state,m)})}catch{}v(m)})})}};nt.prototype.subscribe=function(e,r){return Eo(e,this._subscribers,r)};nt.prototype.subscribeAction=function(e,r){var n=typeof e=="function"?{before:e}:e;return Eo(n,this._actionSubscribers,r)};nt.prototype.watch=function(e,r,n){var i=this;return this._watcherVM.$watch(function(){return e(i.state,i.getters)},r,n)};nt.prototype.replaceState=function(e){var r=this;this._withCommit(function(){r._vm._data.$$state=e})};nt.prototype.registerModule=function(e,r,n){n===void 0&&(n={}),typeof e=="string"&&(e=[e]),this._modules.register(e,r),br(this,this.state,e,this._modules.get(e),n.preserveState),Hn(this,this.state)};nt.prototype.unregisterModule=function(e){var r=this;typeof e=="string"&&(e=[e]),this._modules.unregister(e),this._withCommit(function(){var n=kn(r.state,e.slice(0,-1));Y.delete(n,e[e.length-1])}),Oo(this)};nt.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),this._modules.isRegistered(e)};nt.prototype.hotUpdate=function(e){this._modules.update(e),Oo(this,!0)};nt.prototype._withCommit=function(e){var r=this._committing;this._committing=!0,e(),this._committing=r};Object.defineProperties(nt.prototype,jn);function Eo(t,e,r){return e.indexOf(t)<0&&(r&&r.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Oo(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var r=t.state;br(t,r,[],t._modules.root,!0),Hn(t,r,e)}function Hn(t,e,r){var n=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};fe(i,function(s,c){a[c]=gl(s,t),Object.defineProperty(t.getters,c,{get:function(){return t._vm[c]},enumerable:!0})});var o=Y.config.silent;Y.config.silent=!0,t._vm=new Y({data:{$$state:e},computed:a}),Y.config.silent=o,t.strict&&$l(t),n&&(r&&t._withCommit(function(){n._data.$$state=null}),Y.nextTick(function(){return n.$destroy()}))}function br(t,e,r,n,i){var a=!r.length,o=t._modules.getNamespace(r);if(n.namespaced&&(t._modulesNamespaceMap[o],t._modulesNamespaceMap[o]=n),!a&&!i){var s=kn(e,r.slice(0,-1)),c=r[r.length-1];t._withCommit(function(){Y.set(s,c,n.state)})}var u=n.context=yl(t,o,r);n.forEachMutation(function(f,v){var m=o+v;bl(t,m,f,u)}),n.forEachAction(function(f,v){var m=f.root?v:o+v,d=f.handler||f;wl(t,m,d,u)}),n.forEachGetter(function(f,v){var m=o+v;Cl(t,m,f,u)}),n.forEachChild(function(f,v){br(t,e,r.concat(v),f,i)})}function yl(t,e,r){var n=e==="",i={dispatch:n?t.dispatch:function(a,o,s){var c=vr(a,o,s),u=c.payload,f=c.options,v=c.type;return(!f||!f.root)&&(v=e+v),t.dispatch(v,u)},commit:n?t.commit:function(a,o,s){var c=vr(a,o,s),u=c.payload,f=c.options,v=c.type;(!f||!f.root)&&(v=e+v),t.commit(v,u,f)}};return Object.defineProperties(i,{getters:{get:n?function(){return t.getters}:function(){return _l(t,e)}},state:{get:function(){return kn(t.state,r)}}}),i}function _l(t,e){if(!t._makeLocalGettersCache[e]){var r={},n=e.length;Object.keys(t.getters).forEach(function(i){if(i.slice(0,n)===e){var a=i.slice(n);Object.defineProperty(r,a,{get:function(){return t.getters[i]},enumerable:!0})}}),t._makeLocalGettersCache[e]=r}return t._makeLocalGettersCache[e]}function bl(t,e,r,n){var i=t._mutations[e]||(t._mutations[e]=[]);i.push(function(o){r.call(t,n.state,o)})}function wl(t,e,r,n){var i=t._actions[e]||(t._actions[e]=[]);i.push(function(o){var s=r.call(t,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:t.getters,rootState:t.state},o);return ml(s)||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(c){throw t._devtoolHook.emit("vuex:error",c),c}):s})}function Cl(t,e,r,n){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(a){return r(n.state,n.getters,a.state,a.getters)})}function $l(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function kn(t,e){return e.reduce(function(r,n){return r[n]},t)}function vr(t,e,r){return $o(t)&&t.type&&(r=e,e=t,t=t.type),{type:t,payload:e,options:r}}function Ao(t){Y&&t===Y||(Y=t,pl(Y))}var To=Cr(function(t,e){var r={};return wr(e).forEach(function(n){var i=n.key,a=n.val;r[i]=function(){var s=this.$store.state,c=this.$store.getters;if(t){var u=$r(this.$store,"mapState",t);if(!u)return;s=u.context.state,c=u.context.getters}return typeof a=="function"?a.call(this,s,c):s[a]},r[i].vuex=!0}),r}),Po=Cr(function(t,e){var r={};return wr(e).forEach(function(n){var i=n.key,a=n.val;r[i]=function(){for(var s=[],c=arguments.length;c--;)s[c]=arguments[c];var u=this.$store.commit;if(t){var f=$r(this.$store,"mapMutations",t);if(!f)return;u=f.context.commit}return typeof a=="function"?a.apply(this,[u].concat(s)):u.apply(this.$store,[a].concat(s))}}),r}),Ro=Cr(function(t,e){var r={};return wr(e).forEach(function(n){var i=n.key,a=n.val;a=t+a,r[i]=function(){if(!(t&&!$r(this.$store,"mapGetters",t)))return this.$store.getters[a]},r[i].vuex=!0}),r}),Mo=Cr(function(t,e){var r={};return wr(e).forEach(function(n){var i=n.key,a=n.val;r[i]=function(){for(var s=[],c=arguments.length;c--;)s[c]=arguments[c];var u=this.$store.dispatch;if(t){var f=$r(this.$store,"mapActions",t);if(!f)return;u=f.context.dispatch}return typeof a=="function"?a.apply(this,[u].concat(s)):u.apply(this.$store,[a].concat(s))}}),r}),Sl=function(t){return{mapState:To.bind(null,t),mapGetters:Ro.bind(null,t),mapMutations:Po.bind(null,t),mapActions:Mo.bind(null,t)}};function wr(t){return xl(t)?Array.isArray(t)?t.map(function(e){return{key:e,val:e}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}}):[]}function xl(t){return Array.isArray(t)||$o(t)}function Cr(t){return function(e,r){return typeof e!="string"?(r=e,e=""):e.charAt(e.length-1)!=="/"&&(e+="/"),t(e,r)}}function $r(t,e,r){var n=t._modulesNamespaceMap[r];return n}function El(t){t===void 0&&(t={});var e=t.collapsed;e===void 0&&(e=!0);var r=t.filter;r===void 0&&(r=function(f,v,m){return!0});var n=t.transformer;n===void 0&&(n=function(f){return f});var i=t.mutationTransformer;i===void 0&&(i=function(f){return f});var a=t.actionFilter;a===void 0&&(a=function(f,v){return!0});var o=t.actionTransformer;o===void 0&&(o=function(f){return f});var s=t.logMutations;s===void 0&&(s=!0);var c=t.logActions;c===void 0&&(c=!0);var u=t.logger;return u===void 0&&(u=console),function(f){var v=un(f.state);typeof u>"u"||(s&&f.subscribe(function(m,d){var _=un(d);if(r(m,v,_)){var b=ta(),y=i(m),w="mutation "+m.type+b;Qi(u,w,e),u.log("%c prev state","color: #9E9E9E; font-weight: bold",n(v)),u.log("%c mutation","color: #03A9F4; font-weight: bold",y),u.log("%c next state","color: #4CAF50; font-weight: bold",n(_)),Vi(u)}v=_}),c&&f.subscribeAction(function(m,d){if(a(m,d)){var _=ta(),b=o(m),y="action "+m.type+_;Qi(u,y,e),u.log("%c action","color: #03A9F4; font-weight: bold",b),Vi(u)}}))}}function Qi(t,e,r){var n=r?t.groupCollapsed:t.group;try{n.call(t,e)}catch{t.log(e)}}function Vi(t){try{t.groupEnd()}catch{t.log("—— log end ——")}}function ta(){var t=new Date;return" @ "+De(t.getHours(),2)+":"+De(t.getMinutes(),2)+":"+De(t.getSeconds(),2)+"."+De(t.getMilliseconds(),3)}function Ol(t,e){return new Array(e+1).join(t)}function De(t,e){return Ol("0",e-t.toString().length)+t}var Lo={Store:nt,install:Ao,version:"3.6.2",mapState:To,mapMutations:Po,mapGetters:Ro,mapActions:Mo,createNamespacedHelpers:Sl,createLogger:El};j.use(Lo);const Al=new Lo.Store({state:{},mutations:{},actions:{},modules:{}}),Tl={name:"HelloWorld",props:{title:{type:String,required:!0}},data(){return{subtitle:'You’ve successfully created a project with Vite + Vue 3.'}}};var Pl=function(){var e=this,r=e._self._c;return r("div",{staticClass:"greetings"},[r("h1",{staticClass:"green"},[e._v(" "+e._s(e.title)+" ")]),r("h3",{domProps:{innerHTML:e._s(e.subtitle)}})])},Rl=[],Ml=Wt(Tl,Pl,Rl,!1,null,"91aedd5d");const Ll=Ml.exports,Il={name:"PageNav",data(){return{navList:[{name:"Home",path:"/"},{name:"About",path:"/about"},{name:"Editors",path:"/editors"}]}}};var Nl=function(){var e=this,r=e._self._c;return r("nav",{staticClass:"page-nav page__inner"},[r("ul",{staticClass:"page-nav__list"},e._l(e.navList,function(n,i){return r("li",{key:i,staticClass:"page-nav__item"},[r("router-link",{staticClass:"page-nav__link",attrs:{to:n.path}},[e._v(" "+e._s(n.name)+" ")])],1)}),0)])},jl=[],Hl=Wt(Il,Nl,jl,!1,null,"8fd2e068");const kl=Hl.exports,Dl={name:"PageHeader",components:{HelloWorld:Ll,PageNav:kl}};var Fl=function(){var e=this,r=e._self._c;return r("header",{staticClass:"page-header"},[r("UIIcon",{attrs:{name:"logo-vue","aria-label":"Vue logo",title:"Vue logo"}}),r("div",{staticClass:"page-header__wrapper"},[r("HelloWorld",{attrs:{title:"You did it!"}}),r("PageNav")],1)],1)},Zl=[],Ul=Wt(Dl,Fl,Zl,!1,null,"08094135");const Bl=Ul.exports,zl={name:"DefaultLayout",components:{PageHeader:Bl},watch:{$route:{handler(t,e){const r=document.getElementsByTagName("html")[0],n=document.getElementsByTagName("title")[0],i=document.getElementsByTagName("body")[0];e!=null&&e.name&&r.classList.remove("page",`page-${e.name.toLowerCase()}`),t!=null&&t.name&&r.classList.add("page",`page-${t.name.toLowerCase()}`),n.innerText=`${t.name} | Vue Editor`,i.classList.add("page__body")},immediate:!0}}};var Gl=function(){var e=this,r=e._self._c;return r("div",{staticClass:"page__app",attrs:{id:"app"}},[r("PageHeader"),r("main",{staticClass:"page__main"},[r("router-view")],1)],1)},Wl=[],ql=Wt(zl,Gl,Wl,!1,null,null);const Kl=ql.exports,Xl={name:"UIButton",props:{buttonIcon:{type:String,required:!0},buttonLabel:{type:String,required:!0},buttonText:{type:String,required:!0}},methods:{handleClick(){this.$emit("click")}}};var Yl=function(){var e=this,r=e._self._c;return r("button",{staticClass:"button",on:{click:e.handleClick}},[r("UIIcon",{attrs:{name:e.buttonIcon,"aria-label":e.buttonLabel,title:e.buttonLabel}}),r("span",[e._v(e._s(e.buttonText))])],1)},Jl=[],Ql=Wt(Xl,Yl,Jl,!1,null,"f033615a");const Vl=Ql.exports;if(typeof window<"u"){let t=function(){var e=document.body,r=document.getElementById("__svg__icons__dom__");r||(r=document.createElementNS("http://www.w3.org/2000/svg","svg"),r.style.position="absolute",r.style.width="0",r.style.height="0",r.id="__svg__icons__dom__",r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),r.innerHTML='',e.insertBefore(r,e.lastChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}const tp={name:"UIIcon",props:{name:{type:String,required:!0},ariaLabel:{type:String,default:""},title:{type:String,default:""}},computed:{iconId(){return`icon-${this.name}`}}};var ep=function(){var e=this,r=e._self._c;return r("i",{staticClass:"icon",class:`${e.iconId}`,attrs:{"aria-label":e.ariaLabel,title:e.title}},[r("svg",{staticClass:"icon__svg"},[r("use",{staticClass:"icon__use",attrs:{"xlink:href":`#${e.iconId}`}})])])},rp=[],np=Wt(tp,ep,rp,!1,null,"b620ba1d");const ip=np.exports;var ap=Object.defineProperty,op=(t,e,r)=>e in t?ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ea=(t,e,r)=>(op(t,typeof e!="symbol"?e+"":e,r),r);class sp{constructor(){ea(this,"seed",0),ea(this,"data",new Map)}id(){return Date.now().toString(26)+this.seed++}add(e,r=this.id()){return this.data.set(r,e),r}get(e){return this.data.get(e)}delete(e){this.delete(e)}}const cp="Failed to copy value to clipboard. Unknown type.",up={asString(t){if(t==null)return console.warn("Clipboard input is empty"),"";if(typeof t!="string")try{return JSON.stringify(t)}catch(e){return console.warn(cp,e),""}return t}},fp="position:fixed; pointer-events:none; z-index:-9999; opacity:0;",lp={createTextarea(t){const e=document.createElement("textarea");return e.addEventListener("focusin",r=>{r.stopPropagation()}),e.value=t,e.setAttribute("readonly",""),e.style.cssText=fp,e}},ge={async requestClipboardPermission(){return navigator.permissions.query({name:"clipboard-write"})},async writeClipboard(t){return(await ge.requestClipboardPermission()).state==="granted"?(await navigator.clipboard.writeText(t),!0):!1},writeClipboardExecCommand(t){const e=lp.createTextarea(t);if(document.body.appendChild(e),navigator.userAgent.match(/ipad|ipod|iphone/i)){e.contentEditable="true",e.readOnly=!0;const n=document.createRange();n.selectNodeContents(e);const i=window.getSelection();i&&(i.removeAllRanges(),i.addRange(n),e.setSelectionRange(0,999999))}else e.select();const r=document.execCommand("copy");return document.body.removeChild(e),r},async copy(t){const e=typeof t=="function"?t():t,r=up.asString(e);if(ge.writeClipboardExecCommand(r))return!0;await ge.writeClipboard(r)}},wt=new sp,pp={install(t){const e=t.version[0]==="3"?t.config.globalProperties:t.prototype;e.$clipboard=ge.copy,t.directive("clipboard",{beforeMount(r,n){const i=n.arg,a=n.value,o=typeof a=="function";if(i==="error"&&o){r.dataset.clipboardError=wt.add(a);return}if(i==="error"&&o){r.dataset.clipboardSuccess=wt.add(a);return}const s=async c=>{var u;const f=await ge.copy(a)?r.dataset.clipboardSuccess:r.dataset.clipboardError;(u=wt.get(f))==null||u({value:a,event:c})};r.dataset.clipboardClick=wt.add(s),r.addEventListener("click",s)},unmounted(r){const{clipboardSuccessHandler:n,clipboardErrorHandler:i,clipboardClickHandler:a}=r.dataset;if(n&&wt.delete(n),i&&wt.delete(i),a){const o=wt.get(a);o&&(r.removeEventListener("click",o),wt.delete(a))}},get bind(){return this.beforeMount},get unbind(){return this.unmounted}})}};j.component("DefaultLayout",Kl);j.component("UIButton",Vl);j.component("UIIcon",ip);j.use(pp);j.config.productionTip=!1;new j({router:ll,store:Al,render:t=>t(of)}).$mount("#app");export{j as V,Lr as _,bp as a,yp as b,mp as c,Cp as d,ge as e,vp as g,_p as h,Wt as n,wp as o,hp as r,dp as u,gp as w}; diff --git a/assets/vanilla-picker-B6E6ObS_.js b/assets/vanilla-picker-B6E6ObS_.js new file mode 100644 index 00000000..274110ca --- /dev/null +++ b/assets/vanilla-picker-B6E6ObS_.js @@ -0,0 +1,8 @@ +/*! + * vanilla-picker v2.12.3 + * https://vanilla-picker.js.org + * + * Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate) + * Released under the ISC license. + */var O=function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")},R=function(){function l(n,e){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:1,e=n>0?l.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):l.toString();return e||"0"}var N=function(){function l(n,e,t,r){O(this,l);var i=this;function o(a){if(a.startsWith("hsl")){var s=a.match(/([\-\d\.e]+)/g).map(Number),p=y(s,4),f=p[0],u=p[1],d=p[2],b=p[3];b===void 0&&(b=1),f/=360,u/=100,d/=100,i.hsla=[f,u,d,b]}else if(a.startsWith("rgb")){var m=a.match(/([\-\d\.e]+)/g).map(Number),h=y(m,4),v=h[0],g=h[1],E=h[2],k=h[3];k===void 0&&(k=1),i.rgba=[v,g,E,k]}else a.startsWith("#")?i.rgba=l.hexToRgb(a):i.rgba=l.nameToRgb(a)||l.hexToRgb(a)}if(n!==void 0)if(Array.isArray(n))this.rgba=n;else if(t===void 0){var c=n&&""+n;c&&o(c.toLowerCase())}else this.rgba=[n,e,t,r===void 0?1:r]}return R(l,[{key:"printRGB",value:function(e){var t=e?this.rgba:this.rgba.slice(0,3),r=t.map(function(i,o){return A(i,o===3?3:0)});return e?"rgba("+r+")":"rgb("+r+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],r=["","%","%",""],i=e?this.hsla:this.hsla.slice(0,3),o=i.map(function(c,a){return A(c*t[a],a===3?3:1)+r[a]});return e?"hsla("+o+")":"hsl("+o+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=l.hslToRgb(this._hsla)},set:function(e){e.length===3&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=l.rgbToHsl(this._rgba)},set:function(e){e.length===3&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var e=this.rgba,t=e.map(function(r,i){return i<3?r.toString(16):Math.round(r*255).toString(16)});return"#"+t.map(function(r){return r.padStart(2,"0")}).join("")},set:function(e){this.rgba=l.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var r=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(i){return parseInt(i,16)});return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(e){var t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=I[t];return r===void 0?r:l.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=y(e,4),r=t[0],i=t[1],o=t[2],c=t[3];r/=255,i/=255,o/=255;var a=Math.max(r,i,o),s=Math.min(r,i,o),p=void 0,f=void 0,u=(a+s)/2;if(a===s)p=f=0;else{var d=a-s;switch(f=u>.5?d/(2-a-s):d/(a+s),a){case r:p=(i-o)/d+(i1&&(g-=1),g<.16666666666666666?h+(v-h)*6*g:g<.5?v:g<.6666666666666666?h+(v-h)*(.6666666666666666-g)*6:h},u=o<.5?o*(1+i):o+i-o*i,d=2*o-u;a=f(d,u,r+1/3),s=f(d,u,r),p=f(d,u,r-1/3)}var b=[a*255,s*255,p*255].map(Math.round);return b[3]=c,b}}]),l}(),z=function(){function l(){O(this,l),this._events=[]}return R(l,[{key:"add",value:function(e,t,r){e.addEventListener(t,r,!1),this._events.push({target:e,type:t,handler:r})}},{key:"remove",value:function(e,t,r){this._events=this._events.filter(function(i){var o=!0;return e&&e!==i.target&&(o=!1),t&&t!==i.type&&(o=!1),r&&r!==i.handler&&(o=!1),o&&l._doRemove(i.target,i.type,i.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(e){return l._doRemove(e.target,e.type,e.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(e,t,r){e.removeEventListener(t,r,!1)}}]),l}();function F(l){var n=document.createElement("div");return n.innerHTML=l,n.firstElementChild}function L(l,n,e){var t=!1;function r(a,s,p){return Math.max(s,Math.min(a,p))}function i(a,s,p){if(p&&(t=!0),!!t){a.preventDefault();var f=n.getBoundingClientRect(),u=f.width,d=f.height,b=s.clientX,m=s.clientY,h=r(b-f.left,0,u),v=r(m-f.top,0,d);e(h/u,v/d)}}function o(a,s){var p=a.buttons===void 0?a.which:a.buttons;p===1?i(a,a,s):t=!1}function c(a,s){a.touches.length===1?i(a,a.touches[0],s):t=!1}l.add(n,"mousedown",function(a){o(a,!0)}),l.add(n,"touchstart",function(a){c(a,!0)}),l.add(window,"mousemove",o),l.add(n,"touchmove",c),l.add(window,"mouseup",function(a){t=!1}),l.add(n,"touchend",function(a){t=!1}),l.add(n,"touchcancel",function(a){t=!1})}var U=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em, + linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,B=360,P="keydown",x="mousedown",T="focusin";function _(l,n){return(n||document).querySelector(l)}function G(l){l.preventDefault(),l.stopPropagation()}function H(l,n,e,t,r){l.add(n,P,function(i){e.indexOf(i.key)>=0&&t(i)})}var K=function(){function l(n){O(this,l),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new z,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return R(l,[{key:"setOptions",value:function(e){var t=this;if(!e)return;var r=this.settings;function i(s,p,f){for(var u in s)p[u]=s[u]}if(e instanceof HTMLElement)r.parent=e;else{r.parent&&e.parent&&r.parent!==e.parent&&(this._events.remove(r.parent),this._popupInited=!1),i(e,r),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var o=e.color||e.colour;o&&this._setColor(o)}var c=r.parent;if(c&&r.popup&&!this._popupInited){var a=function(p){return t.openHandler(p)};this._events.add(c,"click",a),H(this._events,c,[" ","Spacebar","Enter"],a),this._popupInited=!0}else e.parent&&!r.popup&&this.show()}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===P?this._domEdit:this.domElement;setTimeout(function(){return t.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,r=!1;if(!e)r=!0;else if(t===x||t===T){var i=(this.__containedEvent||0)+100;e.timeStamp>i&&(r=!0)}else G(e),r=!0;r&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==x&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if(typeof e=="string"&&(e=e.trim()),!!e){t=t||{};var r=void 0;try{r=new N(e)}catch(o){if(t.failSilently)return;throw o}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){var e=this.settings.parent;if(!e)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var r=this.settings.template||'
      ',i=F(r);return this.domElement=i,this._domH=_(".picker_hue",i),this._domSL=_(".picker_sl",i),this._domA=_(".picker_alpha",i),this._domEdit=_(".picker_editor input",i),this._domSample=_(".picker_sample",i),this._domOkay=_(".picker_done button",i),this._domCancel=_(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup(function(){return i.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,r=this.domElement,i=this._events;function o(s,p,f){i.add(s,p,f)}o(r,"click",function(s){return s.preventDefault()}),L(i,this._domH,function(s,p){return t._setHSLA(s)}),L(i,this._domSL,function(s,p){return t._setHSLA(null,s,1-p)}),this.settings.alpha&&L(i,this._domA,function(s,p){return t._setHSLA(null,null,null,1-p)});var c=this._domEdit;o(c,"input",function(s){t._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(c,"focus",function(s){var p=this;p.selectionStart===p.selectionEnd&&p.select()}),this._ifPopup(function(){var s=function(u){return e.closeHandler(u)};o(window,x,s),o(window,T,s),H(i,r,["Esc","Escape"],s);var p=function(u){e.__containedEvent=u.timeStamp};o(r,x,p),o(r,T,p),o(e._domCancel,"click",s)});var a=function(p){e._ifPopup(function(){return e.closeHandler(p)}),e.onDone&&e.onDone(e.colour)};o(this._domOkay,"click",a),H(i,r,["Enter"],a)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup(function(r){getComputedStyle(e).position==="static"&&(e.style.position="relative");var i=r===!0?"popup_right":"popup_"+r;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===i?t.classList.add(o):t.classList.remove(o)}),t.classList.add(i)})}},{key:"_setHSLA",value:function(e,t,r,i,o){o=o||{};var c=this.colour,a=c.hsla;[e,t,r,i].forEach(function(s,p){(s||s===0)&&(a[p]=s)}),c.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(c)}},{key:"_updateUI",value:function(e){if(!this.domElement)return;e=e||{};var t=this.colour,r=t.hsla,i="hsl("+r[0]*B+", 100%, 50%)",o=t.hslString,c=t.hslaString,a=this._domH,s=this._domSL,p=this._domA,f=_(".picker_selector",a),u=_(".picker_selector",s),d=_(".picker_selector",p);function b(M,S,C){S.style.left=C*100+"%"}function m(M,S,C){S.style.top=C*100+"%"}b(a,f,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,b(s,u,r[1]),m(s,u,1-r[2]),s.style.color=o,m(p,d,1-r[3]);var h=o,v=h.replace("hsl","hsla").replace(")",", 0)"),g="linear-gradient("+[h,v]+")";if(this._domA.style.background=g+", "+U,!e.fromEditor){var E=this.settings.editorFormat,k=this.settings.alpha,w=void 0;switch(E){case"rgb":w=t.printRGB(k);break;case"hsl":w=t.printHSL(k);break;default:w=t.printHex(k)}this._domEdit.value=w}this._domSample.style.color=c}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var r=e?"":"none",i=t.style.display!==r;return i&&(t.style.display=r),i}}]),l}();{var D=document.createElement("style");D.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(D),K.StyleElement=D}export{K as default}; diff --git a/index.html b/index.html new file mode 100644 index 00000000..5e6501dd --- /dev/null +++ b/index.html @@ -0,0 +1,18 @@ + + + + + + + + vue-editor + + + + + +
      + +