You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
156 lines
1.2 MiB
156 lines
1.2 MiB
"use strict";(self.webpackChunkantd=self.webpackChunkantd||[]).push([[3459],{303459:function(Rrt,TN,xb){xb.d(TN,{AR:function(){return Lr},q9:function(){return get}});var RN=xb(734155),Kv,kb,jb,Sb,Cb,$b,_b,Ob,Mb,Eb,Ab,Pb,Tb,Rb,Nb,Ib,Db,Lb,Bb,zb,Fb,Vb,Wb,qb,Hb,Ub,Jb,Kb,Gb,Qb,Yb,Zb,Xb,tw,ew,nw,rw,iw,ow,aw,sw,uw,cw,lw,fw,hw,dw,vw,pw,mw,gw,yw,bw,ww,xw,kw,jw,Sw,Cw,$w,_w,Ow,Mw,Ew,Aw,Pw,Tw,Rw,Nw,Iw,Dw,Lw,Bw,zw,Fw,Vw,Ww,qw,Hw,Uw,Jw,Kw,Gw,Qw,Yw,Zw,Xw,t2,e2,n2,r2,i2,o2,a2,s2,u2,c2,l2,f2,h2,d2,v2,p2,m2,g2,y2,b2,w2,x2,k2,j2,S2,C2,$2,_2,O2,M2,E2,A2,P2,T2,R2,N2,I2,D2,L2,B2,z2,F2,V2,W2,q2,H2,U2,J2,K2,G2,Q2,Y2,Z2,X2,tx,ex,nx,rx,ix,ox,ax,sx,ux,cx,lx,fx,hx,dx,vx,px,mx,gx,yx,bx,wx,xx,kx,jx,Sx,Cx,$x,_x,Ox,Mx,Ex,Ax,Px,Tx,Rx,Nx,Ix,Dx,Lx,Bx,zx,Fx,Vx,Wx,qx,Hx,Ux,Jx,Kx,Gx,Qx,Yx,Zx,Xx,tk,ek,nk,rk,ik,ok,ak,sk,uk,ck,lk,fk,hk,dk,vk,pk,mk,gk,yk,bk,wk,xk,kk,jk,Sk,Ck,$k,_k,Ok,Mk,Ek,Ak,Pk,Tk,Rk,Nk,Ik,Dk,Lk,Bk,zk,Fk,Vk,Wk,qk,Hk,Uk,Jk,Kk,Gk,Qk,Yk,Zk,Xk,tj,ej,nj,rj,ij,oj,aj,sj,uj,cj,lj,fj,hj,dj,vj,pj,mj,gj,yj,bj,wj,xj,kj,jj,Sj,Cj,$j,_j,Oj,Mj,Ej,Aj,Pj,Tj,NN=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],IN=["mainAxis","crossAxis","limiter"];function et(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Rj(e,t){if(e==null)return{};var n,r,i=function(a,s){if(a==null)return{};var u,c,l={},f=Object.keys(a);for(c=0;c<f.length;c++)u=f[c],s.indexOf(u)>=0||(l[u]=a[u]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function at(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=mf(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){s=!0,o=u},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Ft(){Ft=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(L,W,O){L[W]=O.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(L,W,O){return Object.defineProperty(L,W,{value:O,enumerable:!0,configurable:!0,writable:!0}),L[W]}try{u({},"")}catch(L){u=function(W,O,I){return W[O]=I}}function c(L,W,O,I){var q=W&&W.prototype instanceof h?W:h,P=Object.create(q.prototype),_=new E(I||[]);return r(P,"_invoke",{value:j(L,O,_)}),P}function l(L,W,O){try{return{type:"normal",arg:L.call(W,O)}}catch(I){return{type:"throw",arg:I}}}e.wrap=c;var f={};function h(){}function d(){}function v(){}var p={};u(p,o,function(){return this});var m=Object.getPrototypeOf,g=m&&m(m(N([])));g&&g!==t&&n.call(g,o)&&(p=g);var y=v.prototype=h.prototype=Object.create(p);function b(L){["next","throw","return"].forEach(function(W){u(L,W,function(O){return this._invoke(W,O)})})}function w(L,W){function O(q,P,_,S){var $=l(L[q],L,P);if($.type!=="throw"){var D=$.arg,B=D.value;return B&&ee(B)=="object"&&n.call(B,"__await")?W.resolve(B.__await).then(function(k){O("next",k,_,S)},function(k){O("throw",k,_,S)}):W.resolve(B).then(function(k){D.value=k,_(D)},function(k){return O("throw",k,_,S)})}S($.arg)}var I;r(this,"_invoke",{value:function(q,P){function _(){return new W(function(S,$){O(q,P,S,$)})}return I=I?I.then(_,_):_()}})}function j(L,W,O){var I="suspendedStart";return function(q,P){if(I==="executing")throw new Error("Generator is already running");if(I==="completed"){if(q==="throw")throw P;return A()}for(O.method=q,O.arg=P;;){var _=O.delegate;if(_){var S=x(_,O);if(S){if(S===f)continue;return S}}if(O.method==="next")O.sent=O._sent=O.arg;else if(O.method==="throw"){if(I==="suspendedStart")throw I="completed",O.arg;O.dispatchException(O.arg)}else O.method==="return"&&O.abrupt("return",O.arg);I="executing";var $=l(L,W,O);if($.type==="normal"){if(I=O.done?"completed":"suspendedYield",$.arg===f)continue;return{value:$.arg,done:O.done}}$.type==="throw"&&(I="completed",O.method="throw",O.arg=$.arg)}}}function x(L,W){var O=W.method,I=L.iterator[O];if(I===void 0)return W.delegate=null,O==="throw"&&L.iterator.return&&(W.method="return",W.arg=void 0,x(L,W),W.method==="throw")||O!=="return"&&(W.method="throw",W.arg=new TypeError("The iterator does not provide a '"+O+"' method")),f;var q=l(I,L.iterator,W.arg);if(q.type==="throw")return W.method="throw",W.arg=q.arg,W.delegate=null,f;var P=q.arg;return P?P.done?(W[L.resultName]=P.value,W.next=L.nextLoc,W.method!=="return"&&(W.method="next",W.arg=void 0),W.delegate=null,f):P:(W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,f)}function R(L){var W={tryLoc:L[0]};1 in L&&(W.catchLoc=L[1]),2 in L&&(W.finallyLoc=L[2],W.afterLoc=L[3]),this.tryEntries.push(W)}function M(L){var W=L.completion||{};W.type="normal",delete W.arg,L.completion=W}function E(L){this.tryEntries=[{tryLoc:"root"}],L.forEach(R,this),this.reset(!0)}function N(L){if(L){var W=L[o];if(W)return W.call(L);if(typeof L.next=="function")return L;if(!isNaN(L.length)){var O=-1,I=function q(){for(;++O<L.length;)if(n.call(L,O))return q.value=L[O],q.done=!1,q;return q.value=void 0,q.done=!0,q};return I.next=I}}return{next:A}}function A(){return{value:void 0,done:!0}}return d.prototype=v,r(y,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:d,configurable:!0}),d.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(L){var W=typeof L=="function"&&L.constructor;return!!W&&(W===d||(W.displayName||W.name)==="GeneratorFunction")},e.mark=function(L){return Object.setPrototypeOf?Object.setPrototypeOf(L,v):(L.__proto__=v,u(L,s,"GeneratorFunction")),L.prototype=Object.create(y),L},e.awrap=function(L){return{__await:L}},b(w.prototype),u(w.prototype,a,function(){return this}),e.AsyncIterator=w,e.async=function(L,W,O,I,q){q===void 0&&(q=Promise);var P=new w(c(L,W,O,I),q);return e.isGeneratorFunction(W)?P:P.next().then(function(_){return _.done?_.value:P.next()})},b(y),u(y,s,"Generator"),u(y,o,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),e.keys=function(L){var W=Object(L),O=[];for(var I in W)O.push(I);return O.reverse(),function q(){for(;O.length;){var P=O.pop();if(P in W)return q.value=P,q.done=!1,q}return q.done=!0,q}},e.values=N,E.prototype={constructor:E,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!L)for(var W in this)W.charAt(0)==="t"&&n.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=void 0)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var W=this;function O($,D){return P.type="throw",P.arg=L,W.next=$,D&&(W.method="next",W.arg=void 0),!!D}for(var I=this.tryEntries.length-1;I>=0;--I){var q=this.tryEntries[I],P=q.completion;if(q.tryLoc==="root")return O("end");if(q.tryLoc<=this.prev){var _=n.call(q,"catchLoc"),S=n.call(q,"finallyLoc");if(_&&S){if(this.prev<q.catchLoc)return O(q.catchLoc,!0);if(this.prev<q.finallyLoc)return O(q.finallyLoc)}else if(_){if(this.prev<q.catchLoc)return O(q.catchLoc,!0)}else{if(!S)throw new Error("try statement without catch or finally");if(this.prev<q.finallyLoc)return O(q.finallyLoc)}}}},abrupt:function(L,W){for(var O=this.tryEntries.length-1;O>=0;--O){var I=this.tryEntries[O];if(I.tryLoc<=this.prev&&n.call(I,"finallyLoc")&&this.prev<I.finallyLoc){var q=I;break}}q&&(L==="break"||L==="continue")&&q.tryLoc<=W&&W<=q.finallyLoc&&(q=null);var P=q?q.completion:{};return P.type=L,P.arg=W,q?(this.method="next",this.next=q.finallyLoc,f):this.complete(P)},complete:function(L,W){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&W&&(this.next=W),f},finish:function(L){for(var W=this.tryEntries.length-1;W>=0;--W){var O=this.tryEntries[W];if(O.finallyLoc===L)return this.complete(O.completion,O.afterLoc),M(O),f}},catch:function(L){for(var W=this.tryEntries.length-1;W>=0;--W){var O=this.tryEntries[W];if(O.tryLoc===L){var I=O.completion;if(I.type==="throw"){var q=I.arg;M(O)}return q}}throw new Error("illegal catch attempt")},delegateYield:function(L,W,O){return this.delegate={iterator:N(L),resultName:W,nextLoc:O},this.method==="next"&&(this.arg=void 0),f}},e}function Nj(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function Ee(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(u){Nj(o,r,i,a,s,"next",u)}function s(u){Nj(o,r,i,a,s,"throw",u)}a(void 0)})}}function ke(e,t){return Dj(e)||function(n,r){var i=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,a,s,u,c=[],l=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(o=s.call(i)).done)&&(c.push(o.value),c.length!==r);l=!0);}catch(h){f=!0,a=h}finally{try{if(!l&&i.return!=null&&(u=i.return(),Object(u)!==u))return}finally{if(f)throw a}}return c}}(e,t)||mf(e,t)||Ij()}function Ij(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dj(e){if(Array.isArray(e))return e}function uu(e){var t=typeof Map=="function"?new Map:void 0;return uu=function(n){if(n===null||(r=n,Function.toString.call(r).indexOf("[native code]")===-1))return n;var r;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Gv(n,arguments,Ke(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ic(i,n)},uu(e)}function Gv(e,t,n){return Gv=Bj()?Reflect.construct.bind():function(r,i,o){var a=[null];a.push.apply(a,i);var s=new(Function.bind.apply(r,a));return o&&Ic(s,o.prototype),s},Gv.apply(null,arguments)}function Lj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lj(Object(n),!0).forEach(function(r){fi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fi(e,t,n){return(t=Fj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(){return fn=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(o,a){for(;!Object.prototype.hasOwnProperty.call(o,a)&&(o=Ke(o))!==null;);return o}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},fn.apply(this,arguments)}function Ot(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ic(e,t)}function Ic(e,t){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ic(e,t)}function Mt(e){var t=Bj();return function(){var n,r=Ke(e);if(t){var i=Ke(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(o,a){if(a&&(ee(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ce(o)}(this,n)}}function ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bj(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function Ke(e){return Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ke(e)}function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fj(r.key),r)}}function tt(e,t,n){return t&&zj(e.prototype,t),n&&zj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fj(e){var t=function(n,r){if(ee(n)!=="object"||n===null)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r||"default");if(ee(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return ee(t)==="symbol"?t:String(t)}function Oe(e){return function(t){if(Array.isArray(t))return Qv(t)}(e)||Vj(e)||mf(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function mf(e,t){if(e){if(typeof e=="string")return Qv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qv(e,t):void 0}}function Vj(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e){return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(e)}function It(){}var Wj=function(e){return e};function hi(e,t){for(var n in t)e[n]=t[n];return e}function qj(e){return e()}function Hj(){return Object.create(null)}function Mn(e){e.forEach(qj)}function Rr(e){return typeof e=="function"}function Sr(e,t){return e!=e?t==t:e!==t||e&&ee(e)==="object"||typeof e=="function"}function Be(e,t){return e!=e?t==t:e!==t}function Zn(e,t,n,r){if(e){var i=Uj(e,t,n,r);return e[0](i)}}function Uj(e,t,n,r){return e[1]&&r?hi(n.ctx.slice(),e[1](r(t))):n.ctx}function Xn(e,t,n,r){if(e[2]&&r){var i=e[2](r(n));if(t.dirty===void 0)return i;if(ee(i)==="object"){for(var o=[],a=Math.max(t.dirty.length,i.length),s=0;s<a;s+=1)o[s]=t.dirty[s]|i[s];return o}return t.dirty|i}return t.dirty}function tr(e,t,n,r,i,o){if(i){var a=Uj(t,n,r,o);e.p(a,i)}}function er(e){if(e.ctx.length>32){for(var t=[],n=e.ctx.length/32,r=0;r<n;r++)t[r]=-1;return t}return-1}function Jj(e){var t={};for(var n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function gf(e,t){var n={};for(var r in t=new Set(t),e)t.has(r)||r[0]==="$"||(n[r]=e[r]);return n}function Wn(e){return e==null?"":e}function Nr(e){return e&&Rr(e.destroy)?e.destroy:It}var Kj=typeof window!="undefined",DN=Kj?function(){return window.performance.now()}:function(){return Date.now()},Yv=Kj?function(e){return requestAnimationFrame(e)}:It,Dc=new Set;function Gj(e){Dc.forEach(function(t){t.c(e)||(Dc.delete(t),t.f())}),Dc.size!==0&&Yv(Gj)}var Zv=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function F(e,t){e.appendChild(t)}function Ae(e,t,n){var r=Xv(e);if(!r.getElementById(t)){var i=G("style");i.id=t,i.textContent=n,Qj(r,i)}}function Xv(e){if(!e)return document;var t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function LN(e){var t=G("style");return Qj(Xv(e),t),t.sheet}function Qj(e,t){return F(e.head||e,t),t.sheet}function ot(e,t,n){e.insertBefore(t,n||null)}function it(e){e.parentNode&&e.parentNode.removeChild(e)}function ur(e,t){for(var n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function G(e){return document.createElement(e)}function To(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Jt(e){return document.createTextNode(e)}function vt(){return Jt(" ")}function vn(){return Jt("")}function Nt(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function xs(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Pa(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function C(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}var BN=["width","height"];function Yj(e,t){var n=Object.getOwnPropertyDescriptors(e.__proto__);for(var r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&BN.indexOf(r)===-1?e[r]=t[r]:C(e,r,t[r])}function cu(e,t){for(var n in t)C(e,n,t[n])}function be(e,t){t=""+t,e.data!==t&&(e.data=t)}function Ta(e,t){e.value=t==null?"":t}function Ra(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function Zj(e,t,n){for(var r=0;r<e.options.length;r+=1){var i=e.options[r];if(i.__value===t)return void(i.selected=!0)}n&&t===void 0||(e.selectedIndex=-1)}function At(e,t,n){e.classList[n?"add":"remove"](t)}function Xj(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.bubbles,i=r!==void 0&&r,o=n.cancelable,a=o!==void 0&&o,s=document.createEvent("CustomEvent");return s.initCustomEvent(e,i,a,t),s}function Ro(e,t){return new e(t)}var Lc,yf=new Map,tp=0;function t3(e,t,n,r,i,o,a){for(var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:0,u=16.666/r,c=`{
|
|
`,l=0;l<=1;l+=u){var f=t+(n-t)*o(l);c+=100*l+"%{".concat(a(f,1-f),`}
|
|
`)}var h=c+"100% {".concat(a(n,1-n),`}
|
|
}`),d="__svelte_".concat(function(b){for(var w=5381,j=b.length;j--;)w=(w<<5)-w^b.charCodeAt(j);return w>>>0}(h),"_").concat(s),v=Xv(e),p=yf.get(v)||function(b,w){var j={stylesheet:LN(w),rules:{}};return yf.set(b,j),j}(v,e),m=p.stylesheet,g=p.rules;g[d]||(g[d]=!0,m.insertRule("@keyframes ".concat(d," ").concat(h),m.cssRules.length));var y=e.style.animation||"";return e.style.animation="".concat(y?"".concat(y,", "):"").concat(d," ").concat(r,"ms linear ").concat(i,"ms 1 both"),tp+=1,d}function zN(e,t){var n=(e.style.animation||"").split(", "),r=n.filter(t?function(o){return o.indexOf(t)<0}:function(o){return o.indexOf("__svelte")===-1}),i=n.length-r.length;i&&(e.style.animation=r.join(", "),(tp-=i)||Yv(function(){tp||(yf.forEach(function(o){var a=o.stylesheet.ownerNode;a&&it(a)}),yf.clear())}))}function Bc(e){Lc=e}function lu(){if(!Lc)throw new Error("Function called outside component initialization");return Lc}function Ti(e){lu().$$.on_mount.push(e)}function xi(e){lu().$$.on_destroy.push(e)}function e3(){var e=lu();return function(t,n){var r=(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).cancelable,i=r!==void 0&&r,o=e.$$.callbacks[t];if(o){var a=Xj(t,n,{cancelable:i});return o.slice().forEach(function(s){s.call(e,a)}),!a.defaultPrevented}return!0}}function n3(e,t){return lu().$$.context.set(e,t),t}function Ir(e){return lu().$$.context.get(e)}function bf(e,t){var n=this,r=e.$$.callbacks[t.type];r&&r.slice().forEach(function(i){return i.call(n,t)})}var fu=[],He=[],hu=[],ep=[],r3=Promise.resolve(),np=!1;function i3(){np||(np=!0,r3.then(o3))}function pr(){return i3(),r3}function ks(e){hu.push(e)}function eo(e){ep.push(e)}var wf,rp=new Set,du=0;function o3(){if(du===0){var e=Lc;do{try{for(;du<fu.length;){var t=fu[du];du++,Bc(t),FN(t.$$)}}catch(i){throw fu.length=0,du=0,i}for(Bc(null),fu.length=0,du=0;He.length;)He.pop()();for(var n=0;n<hu.length;n+=1){var r=hu[n];rp.has(r)||(rp.add(r),r())}hu.length=0}while(fu.length);for(;ep.length;)ep.pop()();np=!1,rp.clear(),Bc(e)}}function FN(e){if(e.fragment!==null){e.update(),Mn(e.before_update);var t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ks)}}function ip(e,t,n){e.dispatchEvent(Xj("".concat(t?"intro":"outro").concat(n)))}var fa,xf=new Set;function Dt(){fa={r:0,c:[],p:fa}}function Lt(){fa.r||Mn(fa.c),fa=fa.p}function T(e,t){e&&e.i&&(xf.delete(e),e.i(t))}function z(e,t,n,r){if(e&&e.o){if(xf.has(e))return;xf.add(e),fa.c.push(function(){xf.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}var VN={duration:0};function kf(e,t,n,r){var i={direction:"both"},o=t(e,n,i),a=r?0:1,s=null,u=null,c=null;function l(){c&&zN(e,c)}function f(d,v){var p=d.b-a;return v*=Math.abs(p),{a,b:d.b,d:p,duration:v,start:d.start,end:d.start+v,group:d.group}}function h(d){var v,p=o||VN,m=p.delay,g=m===void 0?0:m,y=p.duration,b=y===void 0?300:y,w=p.easing,j=w===void 0?Wj:w,x=p.tick,R=x===void 0?It:x,M=p.css,E={start:DN()+g,b:d};d||(E.group=fa,fa.r+=1),s||u?u=E:(M&&(l(),c=t3(e,a,d,b,g,j,M)),d&&R(0,1),s=f(E,b),ks(function(){return ip(e,d,"start")}),v=function(N){if(u&&N>u.start&&(s=f(u,b),u=null,ip(e,s.b,"start"),M&&(l(),c=t3(e,a,s.b,s.duration,0,j,o.css))),s){if(N>=s.end)R(a=s.b,1-a),ip(e,s.b,"end"),u||(s.b?l():--s.group.r||Mn(s.group.c)),s=null;else if(N>=s.start){var A=N-s.start;a=s.a+s.d*j(A/s.duration),R(a,1-a)}}return!(!s&&!u)},Dc.size===0&&Yv(Gj),new Promise(function(N){Dc.add({c:v,f:N})}))}return{run:function(d){Rr(o)?(wf||(wf=Promise.resolve()).then(function(){wf=null}),wf).then(function(){o=o(i),h(d)}):h(d)},end:function(){l(),s=u=null}}}function WN(e,t){e.d(1),t.delete(e.key)}function op(e,t){z(e,1,1,function(){t.delete(e.key)})}function jf(e,t,n,r,i,o,a,s,u,c,l,f){for(var h=e.length,d=o.length,v=h,p={};v--;)p[e[v].key]=v;var m=[],g=new Map,y=new Map,b=[];v=d;for(var w=function(){var W=f(i,o,v),O=n(W),I=a.get(O);I?r&&b.push(function(){return I.p(W,t)}):(I=c(O,W)).c(),g.set(O,m[v]=I),O in p&&y.set(O,Math.abs(v-p[O]))};v--;)w();var j=new Set,x=new Set;function R(W){T(W,1),W.m(s,l),a.set(W.key,W),l=W.first,d--}for(;h&&d;){var M=m[d-1],E=e[h-1],N=M.key,A=E.key;M===E?(l=M.first,h--,d--):g.has(A)?!a.has(N)||j.has(N)?R(M):x.has(A)?h--:y.get(N)>y.get(A)?(x.add(N),R(M)):(j.add(A),h--):(u(E,a),h--)}for(;h--;){var L=e[h];g.has(L.key)||u(L,a)}for(;d;)R(m[d-1]);return Mn(b),m}function ha(e,t){for(var n={},r={},i={$$scope:1},o=e.length;o--;){var a=e[o],s=t[o];if(s){for(var u in a)u in s||(r[u]=1);for(var c in s)i[c]||(n[c]=s[c],i[c]=1);e[o]=s}else for(var l in a)i[l]=1}for(var f in r)f in n||(n[f]=void 0);return n}function zc(e){return ee(e)==="object"&&e!==null?e:{}}function no(e,t,n){var r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function jt(e){e&&e.c()}function xt(e,t,n,r){var i=e.$$,o=i.fragment,a=i.after_update;o&&o.m(t,n),r||ks(function(){var s,u=e.$$.on_mount.map(qj).filter(Rr);e.$$.on_destroy?(s=e.$$.on_destroy).push.apply(s,Oe(u)):Mn(u),e.$$.on_mount=[]}),a.forEach(ks)}function kt(e,t){var n,r,i,o=e.$$;o.fragment!==null&&(n=o.after_update,r=[],i=[],hu.forEach(function(a){return n.indexOf(a)===-1?r.push(a):i.push(a)}),i.forEach(function(a){return a()}),hu=r,Mn(o.on_destroy),o.fragment&&o.fragment.d(t),o.on_destroy=o.fragment=null,o.ctx=[])}function de(e,t,n,r,i,o,a){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[-1],u=Lc;Bc(e);var c=e.$$={fragment:null,ctx:[],props:o,update:It,not_equal:i,bound:Hj(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Hj(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};a&&a(c.root);var l=!1;if(c.ctx=n?n(e,t.props||{},function(h,d){var v=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:d;return c.ctx&&i(c.ctx[h],c.ctx[h]=v)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](v),l&&function(p,m){p.$$.dirty[0]===-1&&(fu.push(p),i3(),p.$$.dirty.fill(0)),p.$$.dirty[m/31|0]|=1<<m%31}(e,h)),d}):[],c.update(),l=!0,Mn(c.before_update),c.fragment=!!r&&r(c.ctx),t.target){if(t.hydrate){var f=function(h){return Array.from(h.childNodes)}(t.target);c.fragment&&c.fragment.l(f),f.forEach(it)}else c.fragment&&c.fragment.c();t.intro&&T(e.$$.fragment),xt(e,t.target,t.anchor,t.customElement),o3()}Bc(u)}var he=function(){function e(){X(this,e)}return tt(e,[{key:"$destroy",value:function(){kt(this,1),this.$destroy=It}},{key:"$on",value:function(t,n){if(!Rr(n))return It;var r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),function(){var i=r.indexOf(n);i!==-1&&r.splice(i,1)}}},{key:"$set",value:function(t){var n;this.$$set&&(n=t,Object.keys(n).length!==0)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}]),e}(),qN=function(e){Ot(n,he);var t=Mt(n);function n(r){if(X(this,n),!r||!r.target&&!r.$$inline)throw new Error("'target' is a required option");return t.call(this)}return tt(n,[{key:"$destroy",value:function(){fn(Ke(n.prototype),"$destroy",this).call(this),this.$destroy=function(){console.warn("Component was already destroyed")}}},{key:"$capture_state",value:function(){}},{key:"$inject_state",value:function(){}}]),n}(),Nrt=function(e){Ot(n,qN);var t=Mt(n);function n(r){return X(this,n),t.call(this,r)}return tt(n)}();function Dr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(r){var i=function(o){try{if(typeof window!="undefined"&&window.localStorage!==void 0)return window.localStorage[o]}catch(a){}}("debug");return i!=null&&i.endsWith("*")?r.startsWith(i.slice(0,-1)):r===i}(e);if(!t)return HN;var n=function(r){for(var i=0,o=0;o<r.length;o++)i=(i<<5)-i+r.charCodeAt(o),i|=0;return a3[Math.abs(i)%a3.length]}(e);return function(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(r=console).log.apply(r,["%c".concat(e),"color:".concat(n)].concat(o))}}function HN(){}var a3=["#0000CC","#0099FF","#009400","#8dd200","#CCCC00","#CC9933","#ae04e7","#ff35d7","#FF3333","#FF6600","#FF9933","#FFCC33"];function UN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.delay,r=n===void 0?0:n,i=t.duration,o=i===void 0?400:i,a=t.easing,s=a===void 0?Wj:a,u=+getComputedStyle(e).opacity;return{delay:r,duration:o,easing:s,css:function(c){return"opacity: ".concat(c*u)}}}var JN=Zv.window;function KN(e){Ae(e,"svelte-n7cvum",`.svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
|
|
background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
|
|
background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}`)}function s3(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b=e[1].closeButton&&u3(e),w=e[2];return w&&(a=Ro(w,{})),{c:function(){t=G("div"),n=G("div"),r=G("div"),b&&b.c(),i=vt(),o=G("div"),a&&jt(a.$$.fragment),C(o,"class",s=Wn(e[1].classContent)+" svelte-n7cvum"),C(o,"style",e[9]),At(o,"content",!e[0]),C(r,"class",u=Wn(e[1].classWindow)+" svelte-n7cvum"),C(r,"role","dialog"),C(r,"aria-modal","true"),C(r,"aria-label",c=e[1].ariaLabelledBy?null:e[1].ariaLabel||null),C(r,"aria-labelledby",l=e[1].ariaLabelledBy||null),C(r,"style",e[8]),At(r,"window",!e[0]),C(n,"class",h=Wn(e[1].classWindowWrap)+" svelte-n7cvum"),C(n,"style",e[7]),At(n,"wrap",!e[0]),C(t,"id",d=e[1].id),C(t,"class",v=Wn(e[1].classBg)+" svelte-n7cvum"),C(t,"style",e[6]),At(t,"bg",!e[0])},m:function(j,x){ot(j,t,x),F(t,n),F(n,r),b&&b.m(r,null),F(r,i),F(r,o),a&&xt(a,o,null),e[50](r),e[51](n),e[52](t),m=!0,g||(y=[Nt(r,"introstart",function(){Rr(e[13])&&e[13].apply(this,arguments)}),Nt(r,"outrostart",function(){Rr(e[14])&&e[14].apply(this,arguments)}),Nt(r,"introend",function(){Rr(e[15])&&e[15].apply(this,arguments)}),Nt(r,"outroend",function(){Rr(e[16])&&e[16].apply(this,arguments)}),Nt(t,"mousedown",e[20]),Nt(t,"mouseup",e[21])],g=!0)},p:function(j,x){if((e=j)[1].closeButton?b?(b.p(e,x),2&x[0]&&T(b,1)):((b=u3(e)).c(),T(b,1),b.m(r,i)):b&&(Dt(),z(b,1,1,function(){b=null}),Lt()),4&x[0]&&w!==(w=e[2])){if(a){Dt();var R=a;z(R.$$.fragment,1,0,function(){kt(R,1)}),Lt()}w?(jt((a=Ro(w,{})).$$.fragment),T(a.$$.fragment,1),xt(a,o,null)):a=null}(!m||2&x[0]&&s!==(s=Wn(e[1].classContent)+" svelte-n7cvum"))&&C(o,"class",s),(!m||512&x[0])&&C(o,"style",e[9]),(!m||3&x[0])&&At(o,"content",!e[0]),(!m||2&x[0]&&u!==(u=Wn(e[1].classWindow)+" svelte-n7cvum"))&&C(r,"class",u),(!m||2&x[0]&&c!==(c=e[1].ariaLabelledBy?null:e[1].ariaLabel||null))&&C(r,"aria-label",c),(!m||2&x[0]&&l!==(l=e[1].ariaLabelledBy||null))&&C(r,"aria-labelledby",l),(!m||256&x[0])&&C(r,"style",e[8]),(!m||3&x[0])&&At(r,"window",!e[0]),(!m||2&x[0]&&h!==(h=Wn(e[1].classWindowWrap)+" svelte-n7cvum"))&&C(n,"class",h),(!m||128&x[0])&&C(n,"style",e[7]),(!m||3&x[0])&&At(n,"wrap",!e[0]),(!m||2&x[0]&&d!==(d=e[1].id))&&C(t,"id",d),(!m||2&x[0]&&v!==(v=Wn(e[1].classBg)+" svelte-n7cvum"))&&C(t,"class",v),(!m||64&x[0])&&C(t,"style",e[6]),(!m||3&x[0])&&At(t,"bg",!e[0])},i:function(j){m||(T(b),a&&T(a.$$.fragment,j),ks(function(){m&&(f||(f=kf(r,e[12],e[1].transitionWindowProps,!0)),f.run(1))}),ks(function(){m&&(p||(p=kf(t,e[11],e[1].transitionBgProps,!0)),p.run(1))}),m=!0)},o:function(j){z(b),a&&z(a.$$.fragment,j),f||(f=kf(r,e[12],e[1].transitionWindowProps,!1)),f.run(0),p||(p=kf(t,e[11],e[1].transitionBgProps,!1)),p.run(0),m=!1},d:function(j){j&&it(t),b&&b.d(),a&&kt(a),e[50](null),j&&f&&f.end(),e[51](null),e[52](null),j&&p&&p.end(),g=!1,Mn(y)}}}function u3(e){var t,n,r,i,o,a=[QN,GN],s=[];function u(c,l){return 2&l[0]&&(t=null),t==null&&(t=!!c[17](c[1].closeButton)),t?0:1}return n=u(e,[-1,-1,-1]),r=s[n]=a[n](e),{c:function(){r.c(),i=vn()},m:function(c,l){s[n].m(c,l),ot(c,i,l),o=!0},p:function(c,l){var f=n;(n=u(c,l))===f?s[n].p(c,l):(Dt(),z(s[f],1,1,function(){s[f]=null}),Lt(),(r=s[n])?r.p(c,l):(r=s[n]=a[n](c)).c(),T(r,1),r.m(i.parentNode,i))},i:function(c){o||(T(r),o=!0)},o:function(c){z(r),o=!1},d:function(c){s[n].d(c),c&&it(i)}}}function GN(e){var t,n,r,i;return{c:function(){C(t=G("button"),"class",n=Wn(e[1].classCloseButton)+" svelte-n7cvum"),C(t,"aria-label","Close modal"),C(t,"style",e[10]),C(t,"type","button"),At(t,"close",!e[0])},m:function(o,a){ot(o,t,a),r||(i=Nt(t,"click",e[18]),r=!0)},p:function(o,a){2&a[0]&&n!==(n=Wn(o[1].classCloseButton)+" svelte-n7cvum")&&C(t,"class",n),1024&a[0]&&C(t,"style",o[10]),3&a[0]&&At(t,"close",!o[0])},i:It,o:It,d:function(o){o&&it(t),r=!1,i()}}}function QN(e){var t,n,r,i=e[1].closeButton;function o(a){return{props:{onClose:a[18]}}}return i&&(t=Ro(i,o(e))),{c:function(){t&&jt(t.$$.fragment),n=vn()},m:function(a,s){t&&xt(t,a,s),ot(a,n,s),r=!0},p:function(a,s){if(2&s[0]&&i!==(i=a[1].closeButton)){if(t){Dt();var u=t;z(u.$$.fragment,1,0,function(){kt(u,1)}),Lt()}i?(jt((t=Ro(i,o(a))).$$.fragment),T(t.$$.fragment,1),xt(t,n.parentNode,n)):t=null}},i:function(a){r||(t&&T(t.$$.fragment,a),r=!0)},o:function(a){t&&z(t.$$.fragment,a),r=!1},d:function(a){a&&it(n),t&&kt(t,a)}}}function YN(e){var t,n,r,i,o=e[2]&&s3(e),a=e[49].default,s=Zn(a,e,e[48],null);return{c:function(){o&&o.c(),t=vt(),s&&s.c()},m:function(u,c){o&&o.m(u,c),ot(u,t,c),s&&s.m(u,c),n=!0,r||(i=Nt(JN,"keydown",e[19]),r=!0)},p:function(u,c){u[2]?o?(o.p(u,c),4&c[0]&&T(o,1)):((o=s3(u)).c(),T(o,1),o.m(t.parentNode,t)):o&&(Dt(),z(o,1,1,function(){o=null}),Lt()),s&&s.p&&(!n||131072&c[1])&&tr(s,a,u,u[48],n?Xn(a,u[48],c,null):er(u[48]),null)},i:function(u){n||(T(o),T(s,u),n=!0)},o:function(u){z(o),z(s,u),n=!1},d:function(u){o&&o.d(u),u&&it(t),s&&s.d(u),r=!1,i()}}}function c3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(n){return new e(dt(dt({},n),{},{props:dt(dt({},t),n.props)}))}}function ZN(e,t,n){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y=t.$$slots,b=y===void 0?{}:y,w=t.$$scope,j=e3(),x=n3,R=t.isTabbable,M=R===void 0?function(rt){return rt.tabIndex>=0&&!rt.hidden&&!rt.disabled&&rt.style.display!=="none"&&rt.type!=="hidden"&&!!(rt.offsetWidth||rt.offsetHeight||rt.getClientRects().length)}:R,E=t.show,N=E===void 0?null:E,A=t.id,L=A===void 0?null:A,W=t.key,O=W===void 0?"simple-modal":W,I=t.ariaLabel,q=I===void 0?null:I,P=t.ariaLabelledBy,_=P===void 0?null:P,S=t.closeButton,$=S===void 0||S,D=t.closeOnEsc,B=D===void 0||D,k=t.closeOnOuterClick,H=k===void 0||k,U=t.styleBg,st=U===void 0?{}:U,ut=t.styleWindowWrap,gt=ut===void 0?{}:ut,St=t.styleWindow,Pt=St===void 0?{}:St,pt=t.styleContent,Bt=pt===void 0?{}:pt,K=t.styleCloseButton,$t=K===void 0?{}:K,Kt=t.classBg,Ct=Kt===void 0?null:Kt,V=t.classWindowWrap,Q=V===void 0?null:V,ft=t.classWindow,wt=ft===void 0?null:ft,_t=t.classContent,Ut=_t===void 0?null:_t,zt=t.classCloseButton,$e=zt===void 0?null:zt,qe=t.unstyled,De=qe!==void 0&&qe,re=t.setContext,Ne=re===void 0?x:re,Xe=t.transitionBg,Bn=Xe===void 0?UN:Xe,ue=t.transitionBgProps,_n=ue===void 0?{duration:250}:ue,Qe=t.transitionWindow,gn=Qe===void 0?Bn:Qe,ln=t.transitionWindowProps,ir=ln===void 0?_n:ln,or=t.disableFocusTrap,ar=or!==void 0&&or,zn={id:L,ariaLabel:q,ariaLabelledBy:_,closeButton:$,closeOnEsc:B,closeOnOuterClick:H,styleBg:st,styleWindowWrap:gt,styleWindow:Pt,styleContent:Bt,styleCloseButton:$t,classBg:Ct,classWindowWrap:Q,classWindow:wt,classContent:Ut,classCloseButton:$e,transitionBg:Bn,transitionBgProps:_n,transitionWindow:gn,transitionWindowProps:ir,disableFocusTrap:ar,isTabbable:M,unstyled:De},an=dt({},zn),bt=null,ie=function(rt){return rt?Object.keys(rt).reduce(function(Tt,te){return"".concat(Tt,"; ").concat(function(ye){return ye.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}(te),": ").concat(rt[te])},""):""},Le=function(rt){return!!(rt&&rt.constructor&&rt.call&&rt.apply)},yt=function(){},Zt=yt,Gt=yt,fe=yt,Nn=yt,tn=function(rt){var Tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},te=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};n(2,bt=c3(rt,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})),n(1,an=dt(dt({},zn),Tt)),n(6,s=ie(Object.assign({},{width:window.innerWidth,height:window.innerHeight},an.styleBg))),n(7,u=ie(an.styleWindowWrap)),n(8,c=ie(an.styleWindow)),n(9,l=ie(an.styleContent)),n(10,f=ie(an.styleCloseButton)),n(11,h=an.transitionBg),n(12,d=an.transitionWindow),Z(),n(13,Zt=function(ye){te.onOpen&&te.onOpen(ye),j("open"),j("opening")}),n(14,Gt=function(ye){te.onClose&&te.onClose(ye),j("close"),j("closing")}),n(15,fe=function(ye){te.onOpened&&te.onOpened(ye),j("opened")}),n(16,Nn=function(ye){te.onClosed&&te.onClosed(ye),j("closed")})},Tr=function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bt&&(n(14,Gt=rt.onClose||Gt),n(16,Nn=rt.onClosed||Nn),n(2,bt=null),ct())},Z=function(){a=window.scrollY,v=document.body.style.position,p=document.body.style.overflow,m=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(a,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},ct=function(){document.body.style.position=v||"",document.body.style.top="",document.body.style.overflow=p||"",document.body.style.width=m||"",window.scrollTo({top:a,left:0,behavior:"instant"})};Ne(O,{open:tn,close:Tr});var lt=!1;return xi(function(){lt&&Tr()}),Ti(function(){n(47,lt=!0)}),e.$$set=function(rt){"isTabbable"in rt&&n(22,M=rt.isTabbable),"show"in rt&&n(23,N=rt.show),"id"in rt&&n(24,L=rt.id),"key"in rt&&n(25,O=rt.key),"ariaLabel"in rt&&n(26,q=rt.ariaLabel),"ariaLabelledBy"in rt&&n(27,_=rt.ariaLabelledBy),"closeButton"in rt&&n(28,$=rt.closeButton),"closeOnEsc"in rt&&n(29,B=rt.closeOnEsc),"closeOnOuterClick"in rt&&n(30,H=rt.closeOnOuterClick),"styleBg"in rt&&n(31,st=rt.styleBg),"styleWindowWrap"in rt&&n(32,gt=rt.styleWindowWrap),"styleWindow"in rt&&n(33,Pt=rt.styleWindow),"styleContent"in rt&&n(34,Bt=rt.styleContent),"styleCloseButton"in rt&&n(35,$t=rt.styleCloseButton),"classBg"in rt&&n(36,Ct=rt.classBg),"classWindowWrap"in rt&&n(37,Q=rt.classWindowWrap),"classWindow"in rt&&n(38,wt=rt.classWindow),"classContent"in rt&&n(39,Ut=rt.classContent),"classCloseButton"in rt&&n(40,$e=rt.classCloseButton),"unstyled"in rt&&n(0,De=rt.unstyled),"setContext"in rt&&n(41,Ne=rt.setContext),"transitionBg"in rt&&n(42,Bn=rt.transitionBg),"transitionBgProps"in rt&&n(43,_n=rt.transitionBgProps),"transitionWindow"in rt&&n(44,gn=rt.transitionWindow),"transitionWindowProps"in rt&&n(45,ir=rt.transitionWindowProps),"disableFocusTrap"in rt&&n(46,ar=rt.disableFocusTrap),"$$scope"in rt&&n(48,w=rt.$$scope)},e.$$.update=function(){8388608&e.$$.dirty[0]|65536&e.$$.dirty[1]&<&&(Le(N)?tn(N):Tr())},[De,an,bt,r,i,o,s,u,c,l,f,h,d,Zt,Gt,fe,Nn,Le,Tr,function(rt){if(an.closeOnEsc&&bt&&rt.key==="Escape"&&(rt.preventDefault(),Tr()),bt&&rt.key==="Tab"&&!an.disableFocusTrap){var Tt=o.querySelectorAll("*"),te=Array.from(Tt).filter(an.isTabbable).sort(function(en,ze){return en.tabIndex-ze.tabIndex}),ye=te.indexOf(document.activeElement);ye===-1&&rt.shiftKey&&(ye=0),ye+=te.length+(rt.shiftKey?-1:1),te[ye%=te.length].focus(),rt.preventDefault()}},function(rt){!an.closeOnOuterClick||rt.target!==r&&rt.target!==i||(g=rt.target)},function(rt){an.closeOnOuterClick&&rt.target===g&&(rt.preventDefault(),Tr())},M,N,L,O,q,_,$,B,H,st,gt,Pt,Bt,$t,Ct,Q,wt,Ut,$e,Ne,Bn,_n,gn,ir,ar,lt,w,b,function(rt){He[rt?"unshift":"push"](function(){n(5,o=rt)})},function(rt){He[rt?"unshift":"push"](function(){n(4,i=rt)})},function(rt){He[rt?"unshift":"push"](function(){n(3,r=rt)})}]}var Lr,En,ro,No,io,Ri,l3=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,ZN,YN,Sr,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},KN,[-1,-1,-1]),i}return tt(n)}();(function(e){e.text="text",e.tree="tree",e.table="table"})(Lr||(Lr={})),function(e){e.after="after",e.inside="inside",e.key="key",e.value="value",e.multi="multi"}(En||(En={})),function(e){e.after="after",e.key="key",e.value="value",e.inside="inside"}(ro||(ro={})),function(e){e.info="info",e.warning="warning",e.error="error"}(No||(No={})),function(e){e.key="key",e.value="value"}(io||(io={})),function(e){e.asc="asc",e.desc="desc"}(Ri||(Ri={}));var f3=50,XN=200,tI=400,eI=1200,h3=1e3,Fc=100,vu=100,Sf=2e4,js=[{start:0,end:Fc}],nI=104857600,rI=1048576,ap=10485760,d3=10240,Ss={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},iI=dt(dt({},Ss),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),oI=dt(dt({},Ss),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),v3=dt(dt({},Ss),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),sp="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",up="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",da="hover-insert-inside",Vc="hover-insert-after",cp="hover-collection",lp="valid",p3="repairable",va=336,pa=260,aI="NO",fp="SELF",hp="NEXT_INSIDE",sI=(fi(Kv={},Ri.asc,"ascending"),fi(Kv,Ri.desc,"descending"),Kv),uI=0;function Wc(){return++uI}function Na(e){return Na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Na(e)}function An(e){return Array.isArray(e)}function nr(e){return e!==null&&Na(e)==="object"&&e.constructor===Object}function m3(e){return!(!e||Na(e)!=="object")&&e.op==="add"}function g3(e){return!(!e||Na(e)!=="object")&&e.op==="remove"}function dp(e){return!(!e||Na(e)!=="object")&&e.op==="replace"}function vp(e){return!(!e||Na(e)!=="object")&&e.op==="copy"}function pu(e){return!(!e||Na(e)!=="object")&&e.op==="move"}function pp(e){return pp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pp(e)}function cI(e,t){return e===t}function y3(e){return e.slice(0,e.length-1)}function b3(e){return pp(e)==="object"&&e!==null}function qc(e){return qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qc(e)}function w3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lI(e,t,n){return(t=function(r){var i=function(o,a){if(qc(o)!=="object"||o===null)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var u=s.call(o,a||"default");if(qc(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}(r,"string");return qc(i)==="symbol"?i:String(i)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mp(e){if(An(e)){var t=e.slice();return Object.getOwnPropertySymbols(e).forEach(function(r){t[r]=e[r]}),t}if(nr(e)){var n=function(r){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?w3(Object(o),!0).forEach(function(a){lI(r,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):w3(Object(o)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(o,a))})}return r}({},e);return Object.getOwnPropertySymbols(e).forEach(function(r){n[r]=e[r]}),n}return e}function gp(e,t,n){if(e[t]===n)return e;var r=mp(e);return r[t]=n,r}function se(e,t){for(var n=e,r=0;r<t.length;)n=nr(n)?n[t[r]]:An(n)?n[parseInt(t[r])]:void 0,r++;return n}function oo(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t.length===0)return n;var i=t[0],o=oo(e?e[i]:void 0,t.slice(1),n,r);if(nr(e)||An(e))return gp(e,i,o);if(r){var a=fI.test(i)?[]:{};return a[i]=o,a}throw new Error("Path does not exist")}var fI=/^\d+$/;function x3(e,t,n){if(t.length===0)return n(e);if(!b3(e))throw new Error("Path doesn't exist");var r=t[0];return gp(e,r,x3(e[r],t.slice(1),n))}function yp(e,t){if(t.length===0)return e;if(!b3(e))throw new Error("Path does not exist");if(t.length===1){var n=t[0];if(n in e){var r=mp(e);return An(r)&&r.splice(parseInt(n),1),nr(r)&&delete r[n],r}return e}var i=t[0];return gp(e,i,yp(e[i],t.slice(1)))}function bp(e,t,n){var r=t.slice(0,t.length-1),i=t[t.length-1];return x3(e,r,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(r));var a=mp(o);return a.splice(parseInt(i),0,n),a})}function Ni(e,t){return e!==void 0&&(t.length===0||e!==null&&Ni(e[t[0]],t.slice(1)))}function ao(e){var t=e.split("/");return t.shift(),t.map(function(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")})}function Qt(e){return e.map(k3).join("")}function k3(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")}function wp(e,t){return e+k3(t)}function mu(e,t){return e.startsWith(t)&&(e.length===t.length||e[t.length]==="/")}function so(e,t,n){for(var r=e,i=0;i<t.length;i++){yI(t[i]);var o=t[i];if(n&&n.before){var a=n.before(r,o);if(a!==void 0){if(a.document!==void 0&&(r=a.document),a.json!==void 0)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"');a.operation!==void 0&&(o=a.operation)}}var s=r,u=uo(r,o.path);if(o.op==="add")r=vI(r,u,o.value);else if(o.op==="remove")r=dI(r,u);else if(o.op==="replace")r=hI(r,u,o.value);else if(o.op==="copy")r=pI(r,u,xp(o.from));else if(o.op==="move")r=mI(r,u,xp(o.from));else{if(o.op!=="test")throw new Error("Unknown JSONPatch operation "+JSON.stringify(o));gI(r,u,o.value)}if(n&&n.after){var c=n.after(r,o,s);c!==void 0&&(r=c)}}return r}function hI(e,t,n){return oo(e,t,n)}function dI(e,t){return yp(e,t)}function vI(e,t,n){return Hc(e,t)?bp(e,t,n):oo(e,t,n)}function pI(e,t,n){var r=se(e,n);return Hc(e,t)?bp(e,t,r):oo(e,t,se(e,n))}function mI(e,t,n){var r=se(e,n),i=yp(e,n);return Hc(i,t)?bp(i,t,r):oo(i,t,r)}function gI(e,t,n){if(n===void 0)throw new Error('Test failed: no value provided (path: "'.concat(Qt(t),'")'));if(!Ni(e,t))throw new Error('Test failed: path not found (path: "'.concat(Qt(t),'")'));if(!function(r,i){return JSON.stringify(r)===JSON.stringify(i)}(se(e,t),n))throw new Error('Test failed, value differs (path: "'.concat(Qt(t),'")'))}function Hc(e,t){if(t.length===0)return!1;var n=se(e,y3(t));return Array.isArray(n)}function yI(e){if(!["add","remove","replace","copy","move","test"].includes(e.op))throw new Error("Unknown JSONPatch op "+JSON.stringify(e.op));if(typeof e.path!="string")throw new Error('Required property "path" missing or not a string in operation '+JSON.stringify(e));if((e.op==="copy"||e.op==="move")&&typeof e.from!="string")throw new Error('Required property "from" missing or not a string in operation '+JSON.stringify(e))}function uo(e,t){return function(n,r){if(function(a){return a[a.length-1]}(r)!=="-")return r;var i=y3(r),o=se(n,i);return i.concat(o.length)}(e,ao(t))}function xp(e){return ao(e)}function bI(e){return function(t){if(Array.isArray(t))return kp(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return kp(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kp(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j3(e,t,n){var r=[];return so(e,t,{before:function(i,o){var a,s,u=uo(i,o.path);if(o.op==="add")a=$3(i,u);else if(o.op==="remove")a=C3(i,u);else if(o.op==="replace")a=S3(i,u);else if(o.op==="copy")a=function(l,f){return $3(l,f)}(i,u);else if(o.op==="move")a=function(l,f,h){if(f.length<h.length&&function(v,p){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cI;if(v.length<p.length)return!1;for(var g=0;g<p.length;g++)if(!m(v[g],p[g]))return!1;return!0}(h,f))return[{op:"replace",path:Qt(f),value:l}];var d={op:"move",from:Qt(f),path:Qt(h)};return!Hc(l,f)&&Ni(l,f)?[d].concat(bI(C3(l,f))):[d]}(i,u,xp(o.from));else{if(o.op!=="test")throw new Error("Unknown JSONPatch operation "+JSON.stringify(o));a=[]}if(n&&n.before){var c=n.before(i,o,a);if(c&&c.revertOperations&&(a=c.revertOperations),c&&c.document&&(s=c.document),c&&c.json)throw new Error('Deprecation warning: returned object property ".json" has been renamed to ".document"')}if(r=a.concat(r),s!==void 0)return{document:s}}}),r}function S3(e,t){return[{op:"replace",path:Qt(t),value:se(e,t)}]}function C3(e,t){return[{op:"add",path:Qt(t),value:se(e,t)}]}function $3(e,t){return Hc(e,t)||!Ni(e,t)?[{op:"remove",path:Qt(t)}]:S3(e,t)}typeof globalThis!="undefined"||typeof window!="undefined"||typeof global!="undefined"&&global;function jp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cf={},_3={b:"\b",f:"\f",n:`
|
|
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},wI="a".charCodeAt();Cf.parse=function(e,t,n){var r={},i=0,o=0,a=0,s=n&&n.bigint&&typeof BigInt!="undefined";return{data:u("",!0),pointers:r};function u(x,R){var M;c(),m(x,"value");var E=h();switch(E){case"t":f("rue"),M=!0;break;case"f":f("alse"),M=!1;break;case"n":f("ull"),M=null;break;case'"':M=l();break;case"[":M=function(N){c();var A=[],L=0;if(h()=="]")return A;for(d();;){var W=N+"/"+L;A.push(u(W)),c();var O=h();if(O=="]")break;O!=","&&w(),c(),L++}return A}(x);break;case"{":M=function(N){c();var A={};if(h()=="}")return A;for(d();;){var L=y();h()!='"'&&w();var W=l(),O=N+"/"+Sp(W);g(O,"key",L),m(O,"keyEnd"),c(),h()!=":"&&w(),c(),A[W]=u(O),c();var I=h();if(I=="}")break;I!=","&&w(),c()}return A}(x);break;default:d(),"-0123456789".indexOf(E)>=0?M=function(){var N="",A=!0;e[a]=="-"&&(N+=h()),N+=e[a]=="0"?h():p(),e[a]=="."&&(N+=h()+p(),A=!1),e[a]!="e"&&e[a]!="E"||(N+=h(),e[a]!="+"&&e[a]!="-"||(N+=h()),N+=p(),A=!1);var L=+N;return s&&A&&(L>Number.MAX_SAFE_INTEGER||L<Number.MIN_SAFE_INTEGER)?BigInt(N):L}():b()}return m(x,"valueEnd"),c(),R&&a<e.length&&b(),M}function c(){t:for(;a<e.length;){switch(e[a]){case" ":o++;break;case" ":o+=4;break;case"\r":o=0;break;case`
|
|
`:o=0,i++;break;default:break t}a++}}function l(){for(var x,R="";(x=h())!='"';)x=="\\"?(x=h())in _3?R+=_3[x]:x=="u"?R+=v():w():R+=x;return R}function f(x){for(var R=0;R<x.length;R++)h()!==x[R]&&w()}function h(){j();var x=e[a];return a++,o++,x}function d(){a--,o--}function v(){for(var x=4,R=0;x--;){R<<=4;var M=h().toLowerCase();M>="a"&&M<="f"?R+=M.charCodeAt()-wI+10:M>="0"&&M<="9"?R+=+M:w()}return String.fromCharCode(R)}function p(){for(var x="";e[a]>="0"&&e[a]<="9";)x+=h();if(x.length)return x;j(),b()}function m(x,R){g(x,R,y())}function g(x,R,M){r[x]=r[x]||{},r[x][R]=M}function y(){return{line:i,column:o,pos:a}}function b(){throw new SyntaxError("Unexpected token "+e[a]+" in JSON at position "+a)}function w(){d(),b()}function j(){if(a>=e.length)throw new SyntaxError("Unexpected end of JSON input")}},Cf.stringify=function(e,t,n){if($f(e)){var r,i,o=0,a=ee(n)=="object"?n.space:n;switch(ee(a)){case"number":var s=a>10?10:a<0?0:Math.floor(a);a=s&&y(s," "),r=s,i=s;break;case"string":a=a.slice(0,10),r=0,i=0;for(var u=0;u<a.length;u++){switch(a[u]){case" ":i++;break;case" ":i+=4;break;case"\r":i=0;break;case`
|
|
`:i=0,o++;break;default:throw new Error("whitespace characters not allowed in JSON")}r++}break;default:a=void 0}var c="",l={},f=0,h=0,d=0,v=n&&n.es6&&typeof Map=="function";return function b(w,j,x){switch(g(x,"value"),ee(w)){case"number":case"bigint":case"boolean":p(""+w);break;case"string":p(_f(w));break;case"object":w===null?p("null"):typeof w.toJSON=="function"?p(_f(w.toJSON())):Array.isArray(w)?R():v?w.constructor.BYTES_PER_ELEMENT?R():w instanceof Map?E():w instanceof Set?E(!0):M():M()}function R(){if(w.length){p("[");for(var N=j+1,A=0;A<w.length;A++){A&&p(","),m(N);var L=$f(w[A])?w[A]:null;b(L,N,x+"/"+A)}m(j),p("]")}else p("[]")}function M(){var N=Object.keys(w);if(N.length){p("{");for(var A=j+1,L=0;L<N.length;L++){var W=N[L],O=w[W];if($f(O)){L&&p(",");var I=x+"/"+Sp(W);m(A),g(I,"key"),p(_f(W)),g(I,"keyEnd"),p(":"),a&&p(" "),b(O,A,I)}}m(j),p("}")}else p("{}")}function E(N){if(w.size){p("{");for(var A=j+1,L=!0,W=w.entries(),O=W.next();!O.done;){var I=O.value,q=I[0],P=!!N||I[1];if($f(P)){L||p(","),L=!1;var _=x+"/"+Sp(q);m(A),g(_,"key"),p(_f(q)),g(_,"keyEnd"),p(":"),a&&p(" "),b(P,A,_)}O=W.next()}m(j),p("}")}else p("{}")}g(x,"valueEnd")}(e,0,""),{json:c,pointers:l}}function p(b){h+=b.length,d+=b.length,c+=b}function m(b){if(a){for(c+=`
|
|
`+y(b,a),f++,h=0;b--;)o?(f+=o,h=i):h+=i,d+=r;d+=1}}function g(b,w){l[b]=l[b]||{},l[b][w]={line:f,column:h,pos:d}}function y(b,w){return Array(b+1).join(w)}};var xI=["number","bigint","boolean","string","object"];function $f(e){return xI.indexOf(ee(e))>=0}var kI=/"|\\/g,jI=/[\b]/g,SI=/\f/g,CI=/\n/g,$I=/\r/g,_I=/\t/g;function _f(e){return'"'+(e=e.replace(kI,"\\$&").replace(SI,"\\f").replace(jI,"\\b").replace(CI,"\\n").replace($I,"\\r").replace(_I,"\\t"))+'"'}var OI=/~/g,MI=/\//g;function Sp(e){return e.replace(OI,"~0").replace(MI,"~1")}var Cs=function(e){Ot(n,uu(Error));var t=Mt(n);function n(r,i){var o;return X(this,n),(o=t.call(this,r+" at position "+i)).position=i,o}return tt(n)}(),Of=92,Cp=47,EI=42,O3=123,$p=125,M3=91,_p=93,AI=40,PI=41,TI=32,Op=10,E3=9,A3=13,RI=8,NI=12,Mp=34,P3=43,T3=45,II=39,Ep=48,DI=49,Ap=57,Mf=44,LI=46,BI=58,zI=59,FI=65,VI=97,WI=69,qI=101,HI=70,UI=102,JI=160,KI=8192,GI=8202,QI=8239,YI=8287,ZI=12288,XI=8220,tD=8221,eD=8216,nD=8217,rD=96,iD=180;function Ef(e){return e>=Ep&&e<=Ap||e>=FI&&e<=HI||e>=VI&&e<=UI}function Af(e){return e>=Ep&&e<=Ap}function oD(e){return e>=32&&e<=1114111}var aD=/^[,:[\]{}()\n]$/;function R3(e){return sD.test(e)||e&&Tf(e.charCodeAt(0))}var sD=/^[[{\w-]$/;function uD(e){return e===Op||e===A3||e===E3||e===RI||e===NI}function Pf(e){return e===TI||e===Op||e===E3||e===A3}function cD(e){return e===JI||e>=KI&&e<=GI||e===QI||e===YI||e===ZI}function Tf(e){return N3(e)||Pp(e)}function N3(e){return e===Mp||e===XI||e===tD}function I3(e){return e===Mp}function Pp(e){return e===II||e===eD||e===nD||e===rD||e===iD}function Uc(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=e.lastIndexOf(t);return r!==-1?e.substring(0,r)+(n?"":e.substring(r+1)):e}function $s(e,t){var n=e.length;if(!Pf(e.charCodeAt(n-1)))return e+t;for(;Pf(e.charCodeAt(n-1));)n--;return e.substring(0,n)+t+e.substring(n)}function lD(e,t,n){return e.substring(0,t)+e.substring(t+n)}var fD={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},hD={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
`,r:"\r",t:" "};function Io(e){var t=0,n="";i()||function(){throw new Cs("Unexpected end of json string",e.length)}();var r=u(Mf);if(r&&o(),R3(e[t])&&function(b){return/[,\n][ \t\r]*$/.test(b)}(n)?(r||(n=$s(n,",")),function(){for(var b=!0,w=!0;w;)b?b=!1:u(Mf)||(n=$s(n,",")),w=i();w||(n=Uc(n,",")),n=`[
|
|
`.concat(n,`
|
|
]`)}()):r&&(n=Uc(n,",")),t>=e.length)return n;function i(){o();var b=function(){if(e.charCodeAt(t)===O3){n+="{",t++,o();for(var w=!0;t<e.length&&e.charCodeAt(t)!==$p;){if(w?w=!1:(u(Mf)||(n=$s(n,",")),o()),!(l()||h())){e.charCodeAt(t)===$p||e.charCodeAt(t)===O3||e.charCodeAt(t)===_p||e.charCodeAt(t)===M3||e[t]===void 0?n=Uc(n,","):m();break}o();var j=u(BI);j||(R3(e[t])?n=$s(n,":"):g()),i()||(j?n+="null":g())}return e.charCodeAt(t)===$p?(n+="}",t++):n=$s(n,"}"),!0}return!1}()||function(){if(e.charCodeAt(t)===M3){n+="[",t++,o();for(var w=!0;t<e.length&&e.charCodeAt(t)!==_p;)if(w?w=!1:u(Mf)||(n=$s(n,",")),!i()){n=Uc(n,",");break}return e.charCodeAt(t)===_p?(n+="]",t++):n=$s(n,"]"),!0}return!1}()||l()||function(){var w=t;if(e.charCodeAt(t)===T3&&(t++,v(w)))return!0;if(e.charCodeAt(t)===Ep)t++;else if(function(j){return j>=DI&&j<=Ap}(e.charCodeAt(t)))for(t++;Af(e.charCodeAt(t));)t++;if(e.charCodeAt(t)===LI){if(t++,v(w))return!0;for(;Af(e.charCodeAt(t));)t++}if(e.charCodeAt(t)===qI||e.charCodeAt(t)===WI){if(t++,e.charCodeAt(t)!==T3&&e.charCodeAt(t)!==P3||t++,v(w))return!0;for(;Af(e.charCodeAt(t));)t++}return t>w?(n+=e.slice(w,t),!0):!1}()||f("true","true")||f("false","false")||f("null","null")||f("True","true")||f("False","false")||f("None","null")||h();return o(),b}function o(){var b=t,w=a();do(w=s())&&(w=a());while(w);return t>b}function a(){for(var b,w="";(b=Pf(e.charCodeAt(t)))||cD(e.charCodeAt(t));)w+=b?e[t]:" ",t++;return w.length>0&&(n+=w,!0)}function s(){if(e.charCodeAt(t)===Cp&&e.charCodeAt(t+1)===EI){for(;t<e.length&&!dD(e,t);)t++;return t+=2,!0}if(e.charCodeAt(t)===Cp&&e.charCodeAt(t+1)===Cp){for(;t<e.length&&e.charCodeAt(t)!==Op;)t++;return!0}return!1}function u(b){return e.charCodeAt(t)===b&&(n+=e[t],t++,!0)}function c(){return function(b){return e.charCodeAt(t)===b&&(t++,!0)}(Of)}function l(){var b=e.charCodeAt(t)===Of;if(b&&(t++,b=!0),Tf(e.charCodeAt(t))){var w=Pp(e.charCodeAt(t))?Pp:I3(e.charCodeAt(t))?I3:N3;for(n+='"',t++;t<e.length&&!w(e.charCodeAt(t));){if(e.charCodeAt(t)===Of){var j=e[t+1];hD[j]!==void 0?(n+=e.slice(t,t+2),t+=2):j==="u"?Ef(e.charCodeAt(t+2))&&Ef(e.charCodeAt(t+3))&&Ef(e.charCodeAt(t+4))&&Ef(e.charCodeAt(t+5))?(n+=e.slice(t,t+6),t+=6):y(t):(n+=j,t+=2)}else{var x=e[t],R=e.charCodeAt(t);R===Mp&&e.charCodeAt(t-1)!==Of?(n+="\\"+x,t++):uD(R)?(n+=fD[x],t++):(oD(R)||p(x),n+=x,t++)}b&&c()}return Tf(e.charCodeAt(t))?(e.charCodeAt(t),n+='"',t++):n+='"',function(){var M=!1;for(o();e.charCodeAt(t)===P3;){M=!0,t++,o();var E=(n=Uc(n,'"',!0)).length;l(),n=lD(n,E,1)}}(),!0}return!1}function f(b,w){return e.slice(t,t+b.length)===b&&(n+=w,t+=b.length,!0)}function h(){for(var b,w=t;t<e.length&&(b=e[t],!(aD.test(b)||b&&Tf(b.charCodeAt(0))));)t++;if(t>w){if(e.charCodeAt(t)===AI)return t++,i(),e.charCodeAt(t)===PI&&(t++,e.charCodeAt(t)===zI&&t++),!0;for(;Pf(e.charCodeAt(t-1))&&t>0;)t--;var j=e.slice(w,t);return n+=j==="undefined"?"null":JSON.stringify(j),!0}}function d(b){if(!Af(e.charCodeAt(t))){var w=e.slice(b,t);throw new Cs("Invalid number '".concat(w,"', expecting a digit ").concat(e[t]?"but got '".concat(e[t],"'"):"but reached end of input"),2)}}function v(b){return t>=e.length?(n+=e.slice(b,t)+"0",!0):(d(b),!1)}function p(b){throw new Cs("Invalid character "+JSON.stringify(b),t)}function m(){throw new Cs("Object key expected",t)}function g(){throw new Cs("Colon expected",t)}function y(b){for(var w=b+2;/\w/.test(e[w]);)w++;var j=e.slice(b,w);throw new Cs('Invalid unicode character "'.concat(j,'"'),t)}(function(){throw new Cs("Unexpected character "+JSON.stringify(e[t]),t)})()}function dD(e,t){return e[t]==="*"&&e[t+1]==="/"}function Cr(e){return parseInt(e,10)}function Tp(e){return vD.test(e)}var vD=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function In(e){return ee(e)==="object"&&e!==null&&e.constructor===Object}function Jn(e){return ee(e)==="object"&&e!==null&&(e.constructor===Object||e.constructor===Array)}function Rp(e){if(typeof e=="number")return e>9466848e5&&isFinite(e)&&Math.floor(e)===e&&!isNaN(new Date(e).valueOf());if(typeof e=="bigint")return Rp(Number(e));try{var t=e&&e.valueOf();if(t!==e)return Rp(t)}catch(n){return!1}return!1}function D3(e){var t=window.document.createElement("div");t.style.color=e;var n=t.style.color;return n!==""?n.replace(/\s+/g,"").toLowerCase():null}function Np(e,t){if(typeof e=="number"||typeof e=="string"||typeof e=="boolean"||e===void 0)return ee(e);if(typeof e=="bigint")return"number";if(e===null)return"null";if(Array.isArray(e))return"array";if(In(e))return"object";var n=t.stringify(e);return n&&Tp(n)?"number":n==="true"||n==="false"?"boolean":n==="null"?"null":"unknown"}var pD=/^https?:\/\/\S+$/;function Rf(e){return typeof e=="string"&&pD.test(e)}function gu(e,t){if(e==="")return"";var n=e.trim();return n==="null"?null:n==="true"||n!=="false"&&(Tp(n)?t.parse(n):e)}function L3(e){return mD.test(e)}var mD=/^-?[0-9]+$/,B3=(typeof global=="undefined"?"undefined":ee(global))=="object"&&global&&global.Object===Object&&global,gD=(typeof self=="undefined"?"undefined":ee(self))=="object"&&self&&self.Object===Object&&self,Br=B3||gD||Function("return this")(),Gr=Br.Symbol,z3=Object.prototype,yD=z3.hasOwnProperty,bD=z3.toString,Jc=Gr?Gr.toStringTag:void 0,wD=Object.prototype.toString,xD="[object Null]",kD="[object Undefined]",F3=Gr?Gr.toStringTag:void 0;function ni(e){return e==null?e===void 0?kD:xD:F3&&F3 in Object(e)?function(t){var n=yD.call(t,Jc),r=t[Jc];try{t[Jc]=void 0;var i=!0}catch(a){}var o=bD.call(t);return i&&(n?t[Jc]=r:delete t[Jc]),o}(e):function(t){return wD.call(t)}(e)}function cr(e){return e!=null&&ee(e)=="object"}var jD="[object Symbol]";function di(e){return ee(e)=="symbol"||cr(e)&&ni(e)==jD}var SD=NaN;function V3(e){return typeof e=="number"?e:di(e)?SD:+e}function rr(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ve=Array.isArray,CD=1/0,W3=Gr?Gr.prototype:void 0,q3=W3?W3.toString:void 0;function ki(e){if(typeof e=="string")return e;if(Ve(e))return rr(e,ki)+"";if(di(e))return q3?q3.call(e):"";var t=e+"";return t=="0"&&1/e==-CD?"-0":t}function Nf(e,t){return function(n,r){var i;if(n===void 0&&r===void 0)return t;if(n!==void 0&&(i=n),r!==void 0){if(i===void 0)return r;typeof n=="string"||typeof r=="string"?(n=ki(n),r=ki(r)):(n=V3(n),r=V3(r)),i=e(n,r)}return i}}var H3=Nf(function(e,t){return e+t},0),$D=/\s/;function U3(e){for(var t=e.length;t--&&$D.test(e.charAt(t)););return t}var _D=/^\s+/;function J3(e){return e&&e.slice(0,U3(e)+1).replace(_D,"")}function Kn(e){var t=ee(e);return e!=null&&(t=="object"||t=="function")}var K3=NaN,OD=/^[-+]0x[0-9a-f]+$/i,MD=/^0b[01]+$/i,ED=/^0o[0-7]+$/i,AD=parseInt;function ji(e){if(typeof e=="number")return e;if(di(e))return K3;if(Kn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Kn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=J3(e);var n=MD.test(e);return n||ED.test(e)?AD(e.slice(2),n?2:8):OD.test(e)?K3:+e}var G3=1/0,PD=17976931348623157e292;function Do(e){return e?(e=ji(e))===G3||e===-G3?(e<0?-1:1)*PD:e==e?e:0:e===0?e:0}function Je(e){var t=Do(e),n=t%1;return t==t?n?t-n:t:0}function Q3(e,t){if(typeof t!="function")throw new TypeError("Expected a function");return e=Je(e),function(){if(--e<1)return t.apply(this,arguments)}}function Qr(e){return e}var TD="[object AsyncFunction]",RD="[object Function]",ND="[object GeneratorFunction]",ID="[object Proxy]";function Lo(e){if(!Kn(e))return!1;var t=ni(e);return t==RD||t==ND||t==TD||t==ID}var Y3,If=Br["__core-js_shared__"],Z3=(Y3=/[^.]+$/.exec(If&&If.keys&&If.keys.IE_PROTO||""))?"Symbol(src)_1."+Y3:"",DD=Function.prototype.toString;function _s(e){if(e!=null){try{return DD.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var LD=/^\[object .+?Constructor\]$/,BD=Function.prototype,zD=Object.prototype,FD=BD.toString,VD=zD.hasOwnProperty,WD=RegExp("^"+FD.call(VD).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X3(e){return!(!Kn(e)||function(t){return!!Z3&&Z3 in t}(e))&&(Lo(e)?WD:LD).test(_s(e))}function Os(e,t){var n=function(r,i){return r==null?void 0:r[i]}(e,t);return X3(n)?n:void 0}var Kc=Os(Br,"WeakMap"),Df=Kc&&new Kc,qD=Df?function(e,t){return Df.set(e,t),e}:Qr,t4=qD,e4=Object.create,HD=function(){function e(){}return function(t){if(!Kn(t))return{};if(e4)return e4(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),yu=HD;function Gc(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=yu(e.prototype),r=e.apply(n,t);return Kn(r)?r:n}}var UD=1;function Si(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var JD=Math.max;function n4(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=JD(o-a,0),l=Array(u+c),f=!r;++s<u;)l[s]=t[s];for(;++i<a;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[s++]=e[i++];return l}var KD=Math.max;function r4(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,u=-1,c=t.length,l=KD(o-s,0),f=Array(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++a<s;)(h||i<o)&&(f[d+n[a]]=e[i++]);return f}function Lf(){}var GD=4294967295;function mn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=GD,this.__views__=[]}function Dn(){}mn.prototype=yu(Lf.prototype),mn.prototype.constructor=mn;var QD=Df?function(e){return Df.get(e)}:Dn,Ip=QD,bu={},YD=Object.prototype.hasOwnProperty;function Bf(e){for(var t=e.name+"",n=bu[t],r=YD.call(bu,t)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==e)return i.name}return t}function Ii(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function vi(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function i4(e){if(e instanceof mn)return e.clone();var t=new Ii(e.__wrapped__,e.__chain__);return t.__actions__=vi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}Ii.prototype=yu(Lf.prototype),Ii.prototype.constructor=Ii;var ZD=Object.prototype.hasOwnProperty;function J(e){if(cr(e)&&!Ve(e)&&!(e instanceof mn)){if(e instanceof Ii)return e;if(ZD.call(e,"__wrapped__"))return i4(e)}return new Ii(e)}function Dp(e){var t=Bf(e),n=J[t];if(typeof n!="function"||!(t in mn.prototype))return!1;if(e===n)return!0;var r=Ip(n);return!!r&&e===r[0]}J.prototype=Lf.prototype,J.prototype.constructor=J;var XD=Date.now;function o4(e){var t=0,n=0;return function(){var r=XD(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var a4=o4(t4),tL=/\{\n\/\* \[wrapped with (.+)\] \*/,eL=/,? & /,nL=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function zf(e){return function(){return e}}var rL=function(){try{var e=Os(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ff=rL,iL=Ff?function(e,t){return Ff(e,"toString",{configurable:!0,enumerable:!1,value:zf(t),writable:!0})}:Qr,Lp=o4(iL);function Di(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Vf(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function s4(e){return e!=e}function wu(e,t,n){return t==t?function(r,i,o){for(var a=o-1,s=r.length;++a<s;)if(r[a]===i)return a;return-1}(e,t,n):Vf(e,s4,n)}function Wf(e,t){return!!(e!=null&&e.length)&&wu(e,t,0)>-1}var oL=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function u4(e,t,n){var r=t+"";return Lp(e,function(i,o){var a=o.length;if(!a)return i;var s=a-1;return o[s]=(a>1?"& ":"")+o[s],o=o.join(a>2?", ":" "),i.replace(nL,`{
|
|
/* [wrapped with `+o+`] */
|
|
`)}(r,function(i,o){return Di(oL,function(a){var s="_."+a[0];o&a[1]&&!Wf(i,s)&&i.push(s)}),i.sort()}(function(i){var o=i.match(tL);return o?o[1].split(eL):[]}(r),n)))}var aL=1,sL=2,uL=4,cL=8,c4=32,l4=64;function f4(e,t,n,r,i,o,a,s,u,c){var l=t&cL;t|=l?c4:l4,(t&=~(l?l4:c4))&uL||(t&=~(aL|sL));var f=[e,t,i,l?o:void 0,l?a:void 0,l?void 0:o,l?void 0:a,s,u,c],h=n.apply(void 0,f);return Dp(e)&&a4(h,f),h.placeholder=r,u4(h,e,t)}function xu(e){return e.placeholder}var lL=9007199254740991,fL=/^(?:0|[1-9]\d*)$/;function ma(e,t){var n=ee(e);return!!(t=t==null?lL:t)&&(n=="number"||n!="symbol"&&fL.test(e))&&e>-1&&e%1==0&&e<t}var hL=Math.min,h4="__lodash_placeholder__";function Ia(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==h4||(e[n]=h4,o[i++]=n)}return o}var dL=1,vL=2,pL=8,mL=16,gL=128,yL=512;function qf(e,t,n,r,i,o,a,s,u,c){var l=t&gL,f=t&dL,h=t&vL,d=t&(pL|mL),v=t&yL,p=h?void 0:Gc(e);return function m(){for(var g=arguments.length,y=Array(g),b=g;b--;)y[b]=arguments[b];if(d)var w=xu(m),j=function(E,N){for(var A=E.length,L=0;A--;)E[A]===N&&++L;return L}(y,w);if(r&&(y=n4(y,r,i,d)),o&&(y=r4(y,o,a,d)),g-=j,d&&g<c){var x=Ia(y,w);return f4(e,t,qf,m.placeholder,n,y,x,s,u,c-g)}var R=f?n:this,M=h?R[e]:e;return g=y.length,s?y=function(E,N){for(var A=E.length,L=hL(N.length,A),W=vi(E);L--;){var O=N[L];E[L]=ma(O,A)?W[O]:void 0}return E}(y,s):v&&g>1&&y.reverse(),l&&u<g&&(y.length=u),this&&this!==Br&&this instanceof m&&(M=p||Gc(M)),M.apply(R,y)}}var bL=1,d4="__lodash_placeholder__",Bp=1,wL=2,xL=4,v4=8,Qc=128,p4=256,kL=Math.min,jL="Expected a function",m4=1,SL=2,zp=8,Fp=16,Vp=32,g4=64,y4=Math.max;function ga(e,t,n,r,i,o,a,s){var u=t&SL;if(!u&&typeof e!="function")throw new TypeError(jL);var c=r?r.length:0;if(c||(t&=~(Vp|g4),r=i=void 0),a=a===void 0?a:y4(Je(a),0),s=s===void 0?s:Je(s),c-=i?i.length:0,t&g4){var l=r,f=i;r=i=void 0}var h=u?void 0:Ip(e),d=[e,t,n,r,i,l,f,o,a,s];if(h&&function(p,m){var g=p[1],y=m[1],b=g|y,w=b<(Bp|wL|Qc),j=y==Qc&&g==v4||y==Qc&&g==p4&&p[7].length<=m[8]||y==(Qc|p4)&&m[7].length<=m[8]&&g==v4;if(!w&&!j)return p;y&Bp&&(p[2]=m[2],b|=g&Bp?0:xL);var x=m[3];if(x){var R=p[3];p[3]=R?n4(R,x,m[4]):x,p[4]=R?Ia(p[3],d4):m[4]}(x=m[5])&&(R=p[5],p[5]=R?r4(R,x,m[6]):x,p[6]=R?Ia(p[5],d4):m[6]),(x=m[7])&&(p[7]=x),y&Qc&&(p[8]=p[8]==null?m[8]:kL(p[8],m[8])),p[9]==null&&(p[9]=m[9]),p[0]=m[0],p[1]=b}(d,h),e=d[0],t=d[1],n=d[2],r=d[3],i=d[4],!(s=d[9]=d[9]===void 0?u?0:e.length:y4(d[9]-c,0))&&t&(zp|Fp)&&(t&=~(zp|Fp)),t&&t!=m4)v=t==zp||t==Fp?function(p,m,g){var y=Gc(p);return function b(){for(var w=arguments.length,j=Array(w),x=w,R=xu(b);x--;)j[x]=arguments[x];var M=w<3&&j[0]!==R&&j[w-1]!==R?[]:Ia(j,R);return(w-=M.length)<g?f4(p,m,qf,b.placeholder,void 0,j,M,void 0,void 0,g-w):Si(this&&this!==Br&&this instanceof b?y:p,this,j)}}(e,t,s):t!=Vp&&t!=(m4|Vp)||i.length?qf.apply(void 0,d):function(p,m,g,y){var b=m&bL,w=Gc(p);return function j(){for(var x=-1,R=arguments.length,M=-1,E=y.length,N=Array(E+R),A=this&&this!==Br&&this instanceof j?w:p;++M<E;)N[M]=y[M];for(;R--;)N[M++]=arguments[++x];return Si(A,b?g:this,N)}}(e,t,n,r);else var v=function(p,m,g){var y=m&UD,b=Gc(p);return function w(){return(this&&this!==Br&&this instanceof w?b:p).apply(y?g:this,arguments)}}(e,t,n);return u4((h?t4:a4)(v,d),e,t)}var CL=128;function Wp(e,t,n){return t=n?void 0:t,t=e&&t==null?e.length:t,ga(e,CL,void 0,void 0,void 0,void 0,t)}function ya(e,t,n){t=="__proto__"&&Ff?Ff(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Li(e,t){return e===t||e!=e&&t!=t}var $L=Object.prototype.hasOwnProperty;function Yc(e,t,n){var r=e[t];$L.call(e,t)&&Li(r,n)&&(n!==void 0||t in e)||ya(e,t,n)}function Bo(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=r?r(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?ya(n,s,u):Yc(n,s,u)}return n}var b4=Math.max;function w4(e,t,n){return t=b4(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=b4(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),Si(e,this,s)}}function sn(e,t){return Lp(w4(e,t,Qr),e+"")}var _L=9007199254740991;function Zc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_L}function ri(e){return e!=null&&Zc(e.length)&&!Lo(e)}function ii(e,t,n){if(!Kn(n))return!1;var r=ee(t);return!!(r=="number"?ri(n)&&ma(t,n.length):r=="string"&&t in n)&&Li(n[t],e)}function ku(e){return sn(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&ii(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var OL=Object.prototype;function Xc(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||OL)}function qp(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function x4(e){return cr(e)&&ni(e)=="[object Arguments]"}var k4=Object.prototype,ML=k4.hasOwnProperty,EL=k4.propertyIsEnumerable,Da=x4(function(){return arguments}())?x4:function(e){return cr(e)&&ML.call(e,"callee")&&!EL.call(e,"callee")};function Hf(){return!1}var j4=(typeof exports=="undefined"?"undefined":ee(exports))=="object"&&exports&&!exports.nodeType&&exports,S4=j4&&(typeof module=="undefined"?"undefined":ee(module))=="object"&&module&&!module.nodeType&&module,C4=S4&&S4.exports===j4?Br.Buffer:void 0,ba=(C4?C4.isBuffer:void 0)||Hf,Gn={};function Ci(e){return function(t){return e(t)}}Gn["[object Float32Array]"]=Gn["[object Float64Array]"]=Gn["[object Int8Array]"]=Gn["[object Int16Array]"]=Gn["[object Int32Array]"]=Gn["[object Uint8Array]"]=Gn["[object Uint8ClampedArray]"]=Gn["[object Uint16Array]"]=Gn["[object Uint32Array]"]=!0,Gn["[object Arguments]"]=Gn["[object Array]"]=Gn["[object ArrayBuffer]"]=Gn["[object Boolean]"]=Gn["[object DataView]"]=Gn["[object Date]"]=Gn["[object Error]"]=Gn["[object Function]"]=Gn["[object Map]"]=Gn["[object Number]"]=Gn["[object Object]"]=Gn["[object RegExp]"]=Gn["[object Set]"]=Gn["[object String]"]=Gn["[object WeakMap]"]=!1;var $4=(typeof exports=="undefined"?"undefined":ee(exports))=="object"&&exports&&!exports.nodeType&&exports,tl=$4&&(typeof module=="undefined"?"undefined":ee(module))=="object"&&module&&!module.nodeType&&module,Hp=tl&&tl.exports===$4&&B3.process,AL=function(){try{var e=tl&&tl.require&&tl.require("util").types;return e||Hp&&Hp.binding&&Hp.binding("util")}catch(t){}}(),Bi=AL,_4=Bi&&Bi.isTypedArray,Ms=_4?Ci(_4):function(e){return cr(e)&&Zc(e.length)&&!!Gn[ni(e)]},PL=Object.prototype.hasOwnProperty;function O4(e,t){var n=Ve(e),r=!n&&Da(e),i=!n&&!r&&ba(e),o=!n&&!r&&!i&&Ms(e),a=n||r||i||o,s=a?qp(e.length,String):[],u=s.length;for(var c in e)!t&&!PL.call(e,c)||a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ma(c,u))||s.push(c);return s}function M4(e,t){return function(n){return e(t(n))}}var TL=M4(Object.keys,Object),RL=Object.prototype.hasOwnProperty;function Up(e){if(!Xc(e))return TL(e);var t=[];for(var n in Object(e))RL.call(e,n)&&n!="constructor"&&t.push(n);return t}function $r(e){return ri(e)?O4(e):Up(e)}var NL=Object.prototype.hasOwnProperty,IL=ku(function(e,t){if(Xc(t)||ri(t))Bo(t,$r(t),e);else for(var n in t)NL.call(t,n)&&Yc(e,n,t[n])}),E4=IL,DL=Object.prototype.hasOwnProperty;function LL(e){if(!Kn(e))return function(i){var o=[];if(i!=null)for(var a in Object(i))o.push(a);return o}(e);var t=Xc(e),n=[];for(var r in e)(r!="constructor"||!t&&DL.call(e,r))&&n.push(r);return n}function oi(e){return ri(e)?O4(e,!0):LL(e)}var BL=ku(function(e,t){Bo(t,oi(t),e)}),Uf=BL,zL=ku(function(e,t,n,r){Bo(t,oi(t),e,r)}),ju=zL,FL=ku(function(e,t,n,r){Bo(t,$r(t),e,r)}),A4=FL,VL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WL=/^\w*$/;function Jp(e,t){if(Ve(e))return!1;var n=ee(e);return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!di(e))||WL.test(e)||!VL.test(e)||t!=null&&e in Object(t)}var el=Os(Object,"create"),qL=Object.prototype.hasOwnProperty,HL=Object.prototype.hasOwnProperty;function Es(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jf(e,t){for(var n=e.length;n--;)if(Li(e[n][0],t))return n;return-1}Es.prototype.clear=function(){this.__data__=el?el(null):{},this.size=0},Es.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Es.prototype.get=function(e){var t=this.__data__;if(el){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return qL.call(t,e)?t[e]:void 0},Es.prototype.has=function(e){var t=this.__data__;return el?t[e]!==void 0:HL.call(t,e)},Es.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=el&&t===void 0?"__lodash_hash_undefined__":t,this};var UL=Array.prototype.splice;function wa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wa.prototype.clear=function(){this.__data__=[],this.size=0},wa.prototype.delete=function(e){var t=this.__data__,n=Jf(t,e);return!(n<0)&&(n==t.length-1?t.pop():UL.call(t,n,1),--this.size,!0)},wa.prototype.get=function(e){var t=this.__data__,n=Jf(t,e);return n<0?void 0:t[n][1]},wa.prototype.has=function(e){return Jf(this.__data__,e)>-1},wa.prototype.set=function(e,t){var n=this.__data__,r=Jf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var nl=Os(Br,"Map");function Kf(e,t){var n=e.__data__;return function(r){var i=ee(r);return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}(t)?n[typeof t=="string"?"string":"hash"]:n.map}function xa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xa.prototype.clear=function(){this.size=0,this.__data__={hash:new Es,map:new(nl||wa),string:new Es}},xa.prototype.delete=function(e){var t=Kf(this,e).delete(e);return this.size-=t?1:0,t},xa.prototype.get=function(e){return Kf(this,e).get(e)},xa.prototype.has=function(e){return Kf(this,e).has(e)},xa.prototype.set=function(e,t){var n=Kf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var JL="Expected a function";function Su(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(JL);var n=function r(){var i=arguments,o=t?t.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var s=e.apply(this,i);return r.cache=a.set(o,s)||a,s};return n.cache=new(Su.Cache||xa),n}Su.Cache=xa;var KL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,GL=/\\(\\)?/g,QL=function(e){var t=Su(e,function(r){return n.size===500&&n.clear(),r}),n=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(KL,function(n,r,i,o){t.push(i?o.replace(GL,"$1"):r||n)}),t}),P4=QL;function Cn(e){return e==null?"":ki(e)}function La(e,t){return Ve(e)?e:Jp(e,t)?[e]:P4(Cn(e))}var YL=1/0;function zo(e){if(typeof e=="string"||di(e))return e;var t=e+"";return t=="0"&&1/e==-YL?"-0":t}function As(e,t){for(var n=0,r=(t=La(t,e)).length;e!=null&&n<r;)e=e[zo(t[n++])];return n&&n==r?e:void 0}function Gf(e,t,n){var r=e==null?void 0:As(e,t);return r===void 0?n:r}function Kp(e,t){for(var n=-1,r=t.length,i=Array(r),o=e==null;++n<r;)i[n]=o?void 0:Gf(e,t[n]);return i}function Ba(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var T4=Gr?Gr.isConcatSpreadable:void 0;function ZL(e){return Ve(e)||Da(e)||!!(T4&&e&&e[T4])}function Fr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=ZL),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?Fr(s,t-1,n,r,i):Ba(i,s):r||(i[i.length]=s)}return i}function Gp(e){return e!=null&&e.length?Fr(e,1):[]}function ka(e){return Lp(w4(e,void 0,Gp),e+"")}var R4=ka(Kp),Qf=M4(Object.getPrototypeOf,Object),XL="[object Object]",tB=Function.prototype,eB=Object.prototype,N4=tB.toString,nB=eB.hasOwnProperty,rB=N4.call(Object);function Cu(e){if(!cr(e)||ni(e)!=XL)return!1;var t=Qf(e);if(t===null)return!0;var n=nB.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&N4.call(n)==rB}var iB="[object DOMException]",oB="[object Error]";function Yf(e){if(!cr(e))return!1;var t=ni(e);return t==oB||t==iB||typeof e.message=="string"&&typeof e.name=="string"&&!Cu(e)}var aB=sn(function(e,t){try{return Si(e,void 0,t)}catch(n){return Yf(n)?n:new Error(n)}}),Qp=aB,sB="Expected a function";function Yp(e,t){var n;if(typeof t!="function")throw new TypeError(sB);return e=Je(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var Zp=sn(function(e,t,n){var r=1;if(n.length){var i=Ia(n,xu(Zp));r|=32}return ga(e,r,t,n,i)});Zp.placeholder={};var Xp=Zp,uB=ka(function(e,t){return Di(t,function(n){n=zo(n),ya(e,n,Xp(e[n],e))}),e}),I4=uB,tm=sn(function(e,t,n){var r=3;if(n.length){var i=Ia(n,xu(tm));r|=32}return ga(t,r,e,n,i)});tm.placeholder={};var D4=tm;function zi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function za(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:zi(e,t,n)}var cB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function $u(e){return cB.test(e)}var L4="\\ud800-\\udfff",lB="["+L4+"]",em="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",nm="\\ud83c[\\udffb-\\udfff]",B4="[^"+L4+"]",z4="(?:\\ud83c[\\udde6-\\uddff]){2}",F4="[\\ud800-\\udbff][\\udc00-\\udfff]",V4="(?:"+em+"|"+nm+")?",W4="[\\ufe0e\\ufe0f]?",fB=W4+V4+("(?:\\u200d(?:"+[B4,z4,F4].join("|")+")"+W4+V4+")*"),hB="(?:"+[B4+em+"?",em,z4,F4,lB].join("|")+")",dB=RegExp(nm+"(?="+nm+")|"+hB+fB,"g");function co(e){return $u(e)?function(t){return t.match(dB)||[]}(e):function(t){return t.split("")}(e)}function q4(e){return function(t){var n=$u(t=Cn(t))?co(t):void 0,r=n?n[0]:t.charAt(0),i=n?za(n,1).join(""):t.slice(1);return r[e]()+i}}var Zf=q4("toUpperCase");function rm(e){return Zf(Cn(e).toLowerCase())}function im(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function om(e){return function(t){return e==null?void 0:e[t]}}var vB=om({\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"}),pB=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mB=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");function am(e){return(e=Cn(e))&&e.replace(pB,vB).replace(mB,"")}var gB=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yB=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,H4="\\ud800-\\udfff",U4="\\u2700-\\u27bf",J4="a-z\\xdf-\\xf6\\xf8-\\xff",K4="A-Z\\xc0-\\xd6\\xd8-\\xde",G4="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Q4="["+G4+"]",Y4="\\d+",bB="["+U4+"]",Z4="["+J4+"]",X4="[^"+H4+G4+Y4+U4+J4+K4+"]",tS="(?:\\ud83c[\\udde6-\\uddff]){2}",eS="[\\ud800-\\udbff][\\udc00-\\udfff]",_u="["+K4+"]",nS="(?:"+Z4+"|"+X4+")",wB="(?:"+_u+"|"+X4+")",rS="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",iS="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",oS="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",aS="[\\ufe0e\\ufe0f]?",xB=aS+oS+("(?:\\u200d(?:"+["[^"+H4+"]",tS,eS].join("|")+")"+aS+oS+")*"),kB="(?:"+[bB,tS,eS].join("|")+")"+xB,jB=RegExp([_u+"?"+Z4+"+"+rS+"(?="+[Q4,_u,"$"].join("|")+")",wB+"+"+iS+"(?="+[Q4,_u+nS,"$"].join("|")+")",_u+"?"+nS+"+"+rS,_u+"+"+iS,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Y4,kB].join("|"),"g");function sm(e,t,n){return e=Cn(e),(t=n?void 0:t)===void 0?function(r){return yB.test(r)}(e)?function(r){return r.match(jB)||[]}(e):function(r){return r.match(gB)||[]}(e):e.match(t)||[]}var SB=RegExp("['\u2019]","g");function Ou(e){return function(t){return im(sm(am(t).replace(SB,"")),e,"")}}var CB=Ou(function(e,t,n){return t=t.toLowerCase(),e+(n?rm(t):t)}),sS=CB;function uS(){if(!arguments.length)return[];var e=arguments[0];return Ve(e)?e:[e]}var $B=Br.isFinite,_B=Math.min;function um(e){var t=Math[e];return function(n,r){if(n=ji(n),(r=r==null?0:_B(Je(r),292))&&$B(n)){var i=(Cn(n)+"e").split("e");return+((i=(Cn(t(i[0]+"e"+(+i[1]+r)))+"e").split("e"))[0]+"e"+(+i[1]-r))}return t(n)}}var cS=um("ceil");function cm(e){var t=J(e);return t.__chain__=!0,t}var OB=Math.ceil,MB=Math.max;function lS(e,t,n){t=(n?ii(e,t,n):t===void 0)?1:MB(Je(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Array(OB(r/t));i<r;)a[o++]=zi(e,i,i+=t);return a}function Ps(e,t,n){return e==e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function fS(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=(n=ji(n))==n?n:0),t!==void 0&&(t=(t=ji(t))==t?t:0),Ps(ji(e),t,n)}function lo(e){var t=this.__data__=new wa(e);this.size=t.size}function hS(e,t){return e&&Bo(t,$r(t),e)}lo.prototype.clear=function(){this.__data__=new wa,this.size=0},lo.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},lo.prototype.get=function(e){return this.__data__.get(e)},lo.prototype.has=function(e){return this.__data__.has(e)},lo.prototype.set=function(e,t){var n=this.__data__;if(n instanceof wa){var r=n.__data__;if(!nl||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xa(r)}return n.set(e,t),this.size=n.size,this};var dS=(typeof exports=="undefined"?"undefined":ee(exports))=="object"&&exports&&!exports.nodeType&&exports,vS=dS&&(typeof module=="undefined"?"undefined":ee(module))=="object"&&module&&!module.nodeType&&module,pS=vS&&vS.exports===dS?Br.Buffer:void 0,mS=pS?pS.allocUnsafe:void 0;function gS(e,t){if(t)return e.slice();var n=e.length,r=mS?mS(n):new e.constructor(n);return e.copy(r),r}function Fa(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Xf(){return[]}var EB=Object.prototype.propertyIsEnumerable,yS=Object.getOwnPropertySymbols,AB=yS?function(e){return e==null?[]:(e=Object(e),Fa(yS(e),function(t){return EB.call(e,t)}))}:Xf,lm=AB,PB=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ba(t,lm(e)),e=Qf(e);return t}:Xf,bS=PB;function wS(e,t,n){var r=t(e);return Ve(e)?r:Ba(r,n(e))}function fm(e){return wS(e,$r,lm)}function hm(e){return wS(e,oi,bS)}var dm=Os(Br,"DataView"),vm=Os(Br,"Promise"),Mu=Os(Br,"Set"),xS="[object Map]",kS="[object Promise]",jS="[object Set]",SS="[object WeakMap]",CS="[object DataView]",TB=_s(dm),RB=_s(nl),NB=_s(vm),IB=_s(Mu),DB=_s(Kc),Ts=ni;(dm&&Ts(new dm(new ArrayBuffer(1)))!=CS||nl&&Ts(new nl)!=xS||vm&&Ts(vm.resolve())!=kS||Mu&&Ts(new Mu)!=jS||Kc&&Ts(new Kc)!=SS)&&(Ts=function(e){var t=ni(e),n=t=="[object Object]"?e.constructor:void 0,r=n?_s(n):"";if(r)switch(r){case TB:return CS;case RB:return xS;case NB:return kS;case IB:return jS;case DB:return SS}return t});var Fo=Ts,LB=Object.prototype.hasOwnProperty,th=Br.Uint8Array;function pm(e){var t=new e.constructor(e.byteLength);return new th(t).set(new th(e)),t}var BB=/\w*$/,$S=Gr?Gr.prototype:void 0,_S=$S?$S.valueOf:void 0;function OS(e,t){var n=t?pm(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var zB="[object Boolean]",FB="[object Date]",VB="[object Map]",WB="[object Number]",qB="[object RegExp]",HB="[object Set]",UB="[object String]",JB="[object Symbol]",KB="[object ArrayBuffer]",GB="[object DataView]",QB="[object Float32Array]",YB="[object Float64Array]",ZB="[object Int8Array]",XB="[object Int16Array]",tz="[object Int32Array]",ez="[object Uint8Array]",nz="[object Uint8ClampedArray]",rz="[object Uint16Array]",iz="[object Uint32Array]";function oz(e,t,n){var r,i=e.constructor;switch(t){case KB:return pm(e);case zB:case FB:return new i(+e);case GB:return function(o,a){var s=a?pm(o.buffer):o.buffer;return new o.constructor(s,o.byteOffset,o.byteLength)}(e,n);case QB:case YB:case ZB:case XB:case tz:case ez:case nz:case rz:case iz:return OS(e,n);case VB:return new i;case WB:case UB:return new i(e);case qB:return function(o){var a=new o.constructor(o.source,BB.exec(o));return a.lastIndex=o.lastIndex,a}(e);case HB:return new i;case JB:return r=e,_S?Object(_S.call(r)):{}}}function MS(e){return typeof e.constructor!="function"||Xc(e)?{}:yu(Qf(e))}var ES=Bi&&Bi.isMap,mm=ES?Ci(ES):function(e){return cr(e)&&Fo(e)=="[object Map]"},AS=Bi&&Bi.isSet,gm=AS?Ci(AS):function(e){return cr(e)&&Fo(e)=="[object Set]"},az=1,sz=2,uz=4,PS="[object Arguments]",TS="[object Function]",cz="[object GeneratorFunction]",RS="[object Object]",qn={};function Fi(e,t,n,r,i,o){var a,s=t&az,u=t&sz,c=t&uz;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!Kn(e))return e;var l=Ve(e);if(l){if(a=function(p){var m=p.length,g=new p.constructor(m);return m&&typeof p[0]=="string"&&LB.call(p,"index")&&(g.index=p.index,g.input=p.input),g}(e),!s)return vi(e,a)}else{var f=Fo(e),h=f==TS||f==cz;if(ba(e))return gS(e,s);if(f==RS||f==PS||h&&!i){if(a=u||h?{}:MS(e),!s)return u?function(p,m){return Bo(p,bS(p),m)}(e,function(p,m){return p&&Bo(m,oi(m),p)}(a,e)):function(p,m){return Bo(p,lm(p),m)}(e,hS(a,e))}else{if(!qn[f])return i?e:{};a=oz(e,f,s)}}o||(o=new lo);var d=o.get(e);if(d)return d;o.set(e,a),gm(e)?e.forEach(function(p){a.add(Fi(p,t,n,p,e,o))}):mm(e)&&e.forEach(function(p,m){a.set(m,Fi(p,t,n,m,e,o))});var v=l?void 0:(c?u?hm:fm:u?oi:$r)(e);return Di(v||e,function(p,m){v&&(p=e[m=p]),Yc(a,m,Fi(p,t,n,m,e,o))}),a}qn[PS]=qn["[object Array]"]=qn["[object ArrayBuffer]"]=qn["[object DataView]"]=qn["[object Boolean]"]=qn["[object Date]"]=qn["[object Float32Array]"]=qn["[object Float64Array]"]=qn["[object Int8Array]"]=qn["[object Int16Array]"]=qn["[object Int32Array]"]=qn["[object Map]"]=qn["[object Number]"]=qn[RS]=qn["[object RegExp]"]=qn["[object Set]"]=qn["[object String]"]=qn["[object Symbol]"]=qn["[object Uint8Array]"]=qn["[object Uint8ClampedArray]"]=qn["[object Uint16Array]"]=qn["[object Uint32Array]"]=!0,qn["[object Error]"]=qn[TS]=qn["[object WeakMap]"]=!1;function NS(e){return Fi(e,4)}function IS(e){return Fi(e,5)}var lz=1,fz=4;function ym(e,t){return Fi(e,lz|fz,t=typeof t=="function"?t:void 0)}function DS(e,t){return Fi(e,4,t=typeof t=="function"?t:void 0)}function bm(){return new Ii(this.value(),this.__chain__)}function LS(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function BS(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Ba(Ve(n)?vi(n):[n],Fr(t,1))}function Rs(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xa;++t<n;)this.add(e[t])}function wm(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function rl(e,t){return e.has(t)}Rs.prototype.add=Rs.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Rs.prototype.has=function(e){return this.__data__.has(e)};var hz=1,dz=2;function zS(e,t,n,r,i,o){var a=n&hz,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(e),l=o.get(t);if(c&&l)return c==t&&l==e;var f=-1,h=!0,d=n&dz?new Rs:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var v=e[f],p=t[f];if(r)var m=a?r(p,v,f,t,e,o):r(v,p,f,e,t,o);if(m!==void 0){if(m)continue;h=!1;break}if(d){if(!wm(t,function(g,y){if(!rl(d,y)&&(v===g||i(v,g,n,r,o)))return d.push(y)})){h=!1;break}}else if(v!==p&&!i(v,p,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function xm(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function eh(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var vz=1,pz=2,mz="[object Boolean]",gz="[object Date]",yz="[object Error]",bz="[object Map]",wz="[object Number]",xz="[object RegExp]",kz="[object Set]",jz="[object String]",Sz="[object Symbol]",Cz="[object ArrayBuffer]",$z="[object DataView]",FS=Gr?Gr.prototype:void 0,km=FS?FS.valueOf:void 0,_z=1,Oz=Object.prototype.hasOwnProperty,Mz=1,VS="[object Arguments]",WS="[object Array]",nh="[object Object]",qS=Object.prototype.hasOwnProperty;function Ez(e,t,n,r,i,o){var a=Ve(e),s=Ve(t),u=a?WS:Fo(e),c=s?WS:Fo(t),l=(u=u==VS?nh:u)==nh,f=(c=c==VS?nh:c)==nh,h=u==c;if(h&&ba(e)){if(!ba(t))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new lo),a||Ms(e)?zS(e,t,n,r,i,o):function(g,y,b,w,j,x,R){switch(b){case $z:if(g.byteLength!=y.byteLength||g.byteOffset!=y.byteOffset)return!1;g=g.buffer,y=y.buffer;case Cz:return!(g.byteLength!=y.byteLength||!x(new th(g),new th(y)));case mz:case gz:case wz:return Li(+g,+y);case yz:return g.name==y.name&&g.message==y.message;case xz:case jz:return g==y+"";case bz:var M=xm;case kz:var E=w&vz;if(M||(M=eh),g.size!=y.size&&!E)return!1;var N=R.get(g);if(N)return N==y;w|=pz,R.set(g,y);var A=zS(M(g),M(y),w,j,x,R);return R.delete(g),A;case Sz:if(km)return km.call(g)==km.call(y)}return!1}(e,t,u,n,r,i,o);if(!(n&Mz)){var d=l&&qS.call(e,"__wrapped__"),v=f&&qS.call(t,"__wrapped__");if(d||v){var p=d?e.value():e,m=v?t.value():t;return o||(o=new lo),i(p,m,n,r,o)}}return!!h&&(o||(o=new lo),function(g,y,b,w,j,x){var R=b&_z,M=fm(g),E=M.length;if(E!=fm(y).length&&!R)return!1;for(var N=E;N--;){var A=M[N];if(!(R?A in y:Oz.call(y,A)))return!1}var L=x.get(g),W=x.get(y);if(L&&W)return L==y&&W==g;var O=!0;x.set(g,y),x.set(y,g);for(var I=R;++N<E;){var q=g[A=M[N]],P=y[A];if(w)var _=R?w(P,q,A,y,g,x):w(q,P,A,g,y,x);if(!(_===void 0?q===P||j(q,P,b,w,x):_)){O=!1;break}I||(I=A=="constructor")}if(O&&!I){var S=g.constructor,$=y.constructor;S==$||!("constructor"in g)||!("constructor"in y)||typeof S=="function"&&S instanceof S&&typeof $=="function"&&$ instanceof $||(O=!1)}return x.delete(g),x.delete(y),O}(e,t,n,r,i,o))}function il(e,t,n,r,i){return e===t||(e==null||t==null||!cr(e)&&!cr(t)?e!=e&&t!=t:Ez(e,t,n,r,il,i))}var Az=1,Pz=2;function jm(e,t,n,r){var i=n.length,o=i,a=!r;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var u=(s=n[i])[0],c=e[u],l=s[1];if(a&&s[2]){if(c===void 0&&!(u in e))return!1}else{var f=new lo;if(r)var h=r(c,l,u,e,t,f);if(!(h===void 0?il(l,c,Az|Pz,r,f):h))return!1}}return!0}function HS(e){return e==e&&!Kn(e)}function Sm(e){for(var t=$r(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,HS(i)]}return t}function US(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function JS(e){var t=Sm(e);return t.length==1&&t[0][2]?US(t[0][0],t[0][1]):function(n){return n===e||jm(n,e,t)}}function Tz(e,t){return e!=null&&t in Object(e)}function KS(e,t,n){for(var r=-1,i=(t=La(t,e)).length,o=!1;++r<i;){var a=zo(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=e==null?0:e.length)&&Zc(i)&&ma(a,i)&&(Ve(e)||Da(e))}function rh(e,t){return e!=null&&KS(e,t,Tz)}var Rz=1,Nz=2;function GS(e,t){return Jp(e)&&HS(t)?US(zo(e),t):function(n){var r=Gf(n,e);return r===void 0&&r===t?rh(n,e):il(t,r,Rz|Nz)}}function Cm(e){return function(t){return t==null?void 0:t[e]}}function $m(e){return Jp(e)?Cm(zo(e)):function(t){return function(n){return As(n,t)}}(e)}function We(e){return typeof e=="function"?e:e==null?Qr:ee(e)=="object"?Ve(e)?GS(e[0],e[1]):JS(e):$m(e)}function QS(e){var t=e==null?0:e.length,n=We;return e=t?rr(e,function(r){if(typeof r[1]!="function")throw new TypeError("Expected a function");return[n(r[0]),r[1]]}):[],sn(function(r){for(var i=-1;++i<t;){var o=e[i];if(Si(o[0],this,r))return Si(o[1],this,r)}})}function YS(e,t,n){var r=n.length;if(e==null)return!r;for(e=Object(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===void 0&&!(i in e)||!o(a))return!1}return!0}function ZS(e){return function(t){var n=$r(t);return function(r){return YS(r,t,n)}}(Fi(e,1))}function XS(e,t){return t==null||YS(e,t,$r(t))}function Iz(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function tC(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var _m=tC();function Vo(e,t){return e&&_m(e,t,$r)}function eC(e,t){return function(n,r){if(n==null)return n;if(!ri(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var Va=eC(Vo);function Dz(e,t,n,r){return Va(e,function(i,o,a){t(r,i,n(i),a)}),r}function ih(e,t){return function(n,r){var i=Ve(n)?Iz:Dz,o=t?t():{};return i(n,e,We(r),o)}}var Lz=Object.prototype.hasOwnProperty,Bz=ih(function(e,t,n){Lz.call(e,n)?++e[n]:ya(e,n,1)}),nC=Bz;function rC(e,t){var n=yu(e);return t==null?n:hS(n,t)}function oh(e,t,n){var r=ga(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=oh.placeholder,r}oh.placeholder={};function ah(e,t,n){var r=ga(e,16,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=ah.placeholder,r}ah.placeholder={};var ol=function(){return Br.Date.now()},zz="Expected a function",Fz=Math.max,Vz=Math.min;function Eu(e,t,n){var r,i,o,a,s,u,c=0,l=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(zz);function d(y){var b=r,w=i;return r=i=void 0,c=y,a=e.apply(w,b)}function v(y){var b=y-u;return u===void 0||b>=t||b<0||f&&y-c>=o}function p(){var y=ol();if(v(y))return m(y);s=setTimeout(p,function(b){var w=t-(b-u);return f?Vz(w,o-(b-c)):w}(y))}function m(y){return s=void 0,h&&r?d(y):(r=i=void 0,a)}function g(){var y=ol(),b=v(y);if(r=arguments,i=this,u=y,b){if(s===void 0)return function(w){return c=w,s=setTimeout(p,t),l?d(w):a}(u);if(f)return clearTimeout(s),s=setTimeout(p,t),d(u)}return s===void 0&&(s=setTimeout(p,t)),a}return t=ji(t)||0,Kn(n)&&(l=!!n.leading,o=(f="maxWait"in n)?Fz(ji(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),g.cancel=function(){s!==void 0&&clearTimeout(s),c=0,r=u=i=s=void 0},g.flush=function(){return s===void 0?a:m(ol())},g}function iC(e,t){return e==null||e!=e?t:e}var oC=Object.prototype,Wz=oC.hasOwnProperty,qz=sn(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ii(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=oi(o),s=-1,u=a.length;++s<u;){var c=a[s],l=e[c];(l===void 0||Li(l,oC[c])&&!Wz.call(e,c))&&(e[c]=o[c])}return e}),aC=qz;function Om(e,t,n){(n!==void 0&&!Li(e[t],n)||n===void 0&&!(t in e))&&ya(e,t,n)}function mr(e){return cr(e)&&ri(e)}function Mm(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]}function Em(e){return Bo(e,oi(e))}function sh(e,t,n,r,i){e!==t&&_m(t,function(o,a){if(i||(i=new lo),Kn(o))(function(u,c,l,f,h,d,v){var p=Mm(u,l),m=Mm(c,l),g=v.get(m);if(g)Om(u,l,g);else{var y=d?d(p,m,l+"",u,c,v):void 0,b=y===void 0;if(b){var w=Ve(m),j=!w&&ba(m),x=!w&&!j&&Ms(m);y=m,w||j||x?Ve(p)?y=p:mr(p)?y=vi(p):j?(b=!1,y=gS(m,!0)):x?(b=!1,y=OS(m,!0)):y=[]:Cu(m)||Da(m)?(y=p,Da(p)?y=Em(p):Kn(p)&&!Lo(p)||(y=MS(m))):b=!1}b&&(v.set(m,y),h(y,m,f,d,v),v.delete(m)),Om(u,l,y)}})(e,t,a,n,sh,r,i);else{var s=r?r(Mm(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),Om(e,a,s)}},oi)}function sC(e,t,n,r,i,o){return Kn(e)&&Kn(t)&&(o.set(t,e),sh(e,t,void 0,sC,o),o.delete(t)),e}var Hz=ku(function(e,t,n,r){sh(e,t,n,r)}),Am=Hz,uC=sn(function(e){return e.push(void 0,sC),Si(Am,void 0,e)});function cC(e,t,n){if(typeof e!="function")throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}var Uz=sn(function(e,t){return cC(e,1,t)}),lC=Uz,Jz=sn(function(e,t,n){return cC(e,ji(t)||0,n)}),fC=Jz;function Pm(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Kz=200;function al(e,t,n,r){var i=-1,o=Wf,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=rr(t,Ci(n))),r?(o=Pm,a=!1):t.length>=Kz&&(o=rl,a=!1,t=new Rs(t));t:for(;++i<s;){var l=e[i],f=n==null?l:n(l);if(l=r||l!==0?l:0,a&&f==f){for(var h=c;h--;)if(t[h]===f)continue t;u.push(l)}else o(t,f,r)||u.push(l)}return u}var Gz=sn(function(e,t){return mr(e)?al(e,Fr(t,1,mr,!0)):[]}),hC=Gz;function le(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Qz=sn(function(e,t){var n=le(t);return mr(n)&&(n=void 0),mr(e)?al(e,Fr(t,1,mr,!0),We(n)):[]}),dC=Qz,Yz=sn(function(e,t){var n=le(t);return mr(n)&&(n=void 0),mr(e)?al(e,Fr(t,1,mr,!0),void 0,n):[]}),vC=Yz,pC=Nf(function(e,t){return e/t},1);function mC(e,t,n){var r=e==null?0:e.length;return r?zi(e,(t=n||t===void 0?1:Je(t))<0?0:t,r):[]}function gC(e,t,n){var r=e==null?0:e.length;return r?zi(e,0,(t=r-(t=n||t===void 0?1:Je(t)))<0?0:t):[]}function uh(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?zi(e,r?0:o,r?o+1:i):zi(e,r?o+1:0,r?i:o)}function yC(e,t){return e&&e.length?uh(e,We(t),!0,!0):[]}function bC(e,t){return e&&e.length?uh(e,We(t),!0):[]}function Wo(e){return typeof e=="function"?e:Qr}function ch(e,t){return(Ve(e)?Di:Va)(e,Wo(t))}function Zz(e,t){for(var n=e==null?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}var wC=tC(!0);function Tm(e,t){return e&&wC(e,t,$r)}var xC=eC(Tm,!0);function sl(e,t){return(Ve(e)?Zz:xC)(e,Wo(t))}function kC(e,t,n){e=Cn(e),t=ki(t);var r=e.length,i=n=n===void 0?r:Ps(Je(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t}function jC(e){return function(t){var n=Fo(t);return n=="[object Map]"?xm(t):n=="[object Set]"?function(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=[a,a]}),o}(t):function(r,i){return rr(i,function(o){return[o,r[o]]})}(t,e(t))}}var lh=jC($r),fh=jC(oi),Xz=om({"&":"&","<":"<",">":">",'"':""","'":"'"}),SC=/[&<>"']/g,tF=RegExp(SC.source);function Rm(e){return(e=Cn(e))&&tF.test(e)?e.replace(SC,Xz):e}var CC=/[\\^$.*+?()[\]{}|]/g,eF=RegExp(CC.source);function $C(e){return(e=Cn(e))&&eF.test(e)?e.replace(CC,"\\$&"):e}function _C(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function nF(e,t){var n=!0;return Va(e,function(r,i,o){return n=!!t(r,i,o)}),n}function OC(e,t,n){var r=Ve(e)?_C:nF;return n&&ii(e,t,n)&&(t=void 0),r(e,We(t))}var rF=4294967295;function Nm(e){return e?Ps(Je(e),0,rF):0}function MC(e,t,n,r){var i=e==null?0:e.length;return i?(n&&typeof n!="number"&&ii(e,t,n)&&(n=0,r=i),function(o,a,s,u){var c=o.length;for((s=Je(s))<0&&(s=-s>c?0:c+s),(u=u===void 0||u>c?c:Je(u))<0&&(u+=c),u=s>u?0:Nm(u);s<u;)o[s++]=a;return o}(e,t,n,r)):[]}function EC(e,t){var n=[];return Va(e,function(r,i,o){t(r,i,o)&&n.push(r)}),n}function AC(e,t){return(Ve(e)?Fa:EC)(e,We(t))}function PC(e){return function(t,n,r){var i=Object(t);if(!ri(t)){var o=We(n);t=$r(t),n=function(s){return o(i[s],s,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}var iF=Math.max;function Im(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Je(n);return i<0&&(i=iF(r+i,0)),Vf(e,We(t),i)}var TC=PC(Im);function RC(e,t,n){var r;return n(e,function(i,o,a){if(t(i,o,a))return r=o,!1}),r}function NC(e,t){return RC(e,We(t),Vo)}var oF=Math.max,aF=Math.min;function Dm(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=r-1;return n!==void 0&&(i=Je(n),i=n<0?oF(r+i,0):aF(i,r-1)),Vf(e,We(t),i,!0)}var IC=PC(Dm);function DC(e,t){return RC(e,We(t),Tm)}function Ar(e){return e&&e.length?e[0]:void 0}function LC(e,t){var n=-1,r=ri(e)?Array(e.length):[];return Va(e,function(i,o,a){r[++n]=t(i,o,a)}),r}function Au(e,t){return(Ve(e)?rr:LC)(e,We(t))}function BC(e,t){return Fr(Au(e,t),1)}function zC(e,t){return Fr(Au(e,t),1/0)}function FC(e,t,n){return n=n===void 0?1:Je(n),Fr(Au(e,t),n)}function VC(e){return e!=null&&e.length?Fr(e,1/0):[]}function WC(e,t){return e!=null&&e.length?Fr(e,t=t===void 0?1:Je(t)):[]}function qC(e){return ga(e,512)}var HC=um("floor");function UC(e){return ka(function(t){var n=t.length,r=n,i=Ii.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if(typeof o!="function")throw new TypeError("Expected a function");if(i&&!a&&Bf(o)=="wrapper")var a=new Ii([],!0)}for(r=a?r:n;++r<n;){var s=Bf(o=t[r]),u=s=="wrapper"?Ip(o):void 0;a=u&&Dp(u[0])&&u[1]==424&&!u[4].length&&u[9]==1?a[Bf(u[0])].apply(a,u[3]):o.length==1&&Dp(o)?a[s]():a.thru(o)}return function(){var c=arguments,l=c[0];if(a&&c.length==1&&Ve(l))return a.plant(l).value();for(var f=0,h=n?t[f].apply(this,c):l;++f<n;)h=t[f].call(this,h);return h}})}var JC=UC(),KC=UC(!0);function GC(e,t){return e==null?e:_m(e,Wo(t),oi)}function QC(e,t){return e==null?e:wC(e,Wo(t),oi)}function YC(e,t){return e&&Vo(e,Wo(t))}function ZC(e,t){return e&&Tm(e,Wo(t))}function XC(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function hh(e,t){return Fa(t,function(n){return Lo(e[n])})}function t8(e){return e==null?[]:hh(e,$r(e))}function e8(e){return e==null?[]:hh(e,oi(e))}var sF=Object.prototype.hasOwnProperty,uF=ih(function(e,t,n){sF.call(e,n)?e[n].push(t):ya(e,n,[t])}),Pu=uF;function Lm(e,t){return e>t}function dh(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=ji(t),n=ji(n)),e(t,n)}}var n8=dh(Lm),r8=dh(function(e,t){return e>=t}),cF=Object.prototype.hasOwnProperty;function lF(e,t){return e!=null&&cF.call(e,t)}function i8(e,t){return e!=null&&KS(e,t,lF)}var fF=Math.max,hF=Math.min;function o8(e,t,n){return t=Do(t),n===void 0?(n=t,t=0):n=Do(n),function(r,i,o){return r>=hF(i,o)&&r<fF(i,o)}(e=ji(e),t,n)}var dF="[object String]";function ul(e){return typeof e=="string"||!Ve(e)&&cr(e)&&ni(e)==dF}function Bm(e,t){return rr(t,function(n){return e[n]})}function Ns(e){return e==null?[]:Bm(e,$r(e))}var vF=Math.max;function a8(e,t,n,r){e=ri(e)?e:Ns(e),n=n&&!r?Je(n):0;var i=e.length;return n<0&&(n=vF(i+n,0)),ul(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&wu(e,t,n)>-1}var pF=Math.max;function s8(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Je(n);return i<0&&(i=pF(r+i,0)),wu(e,t,i)}function Ze(e){return e!=null&&e.length?zi(e,0,-1):[]}var mF=Math.min;function zm(e,t,n){for(var r=n?Pm:Wf,i=e[0].length,o=e.length,a=o,s=Array(o),u=1/0,c=[];a--;){var l=e[a];a&&t&&(l=rr(l,Ci(t))),u=mF(l.length,u),s[a]=!n&&(t||i>=120&&l.length>=120)?new Rs(a&&l):void 0}l=e[0];var f=-1,h=s[0];t:for(;++f<i&&c.length<u;){var d=l[f],v=t?t(d):d;if(d=n||d!==0?d:0,!(h?rl(h,v):r(c,v,n))){for(a=o;--a;){var p=s[a];if(!(p?rl(p,v):r(e[a],v,n)))continue t}h&&h.push(v),c.push(d)}}return c}function Fm(e){return mr(e)?e:[]}var u8=sn(function(e){var t=rr(e,Fm);return t.length&&t[0]===e[0]?zm(t):[]}),gF=sn(function(e){var t=le(e),n=rr(e,Fm);return t===le(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?zm(n,We(t)):[]}),c8=gF,l8=sn(function(e){var t=le(e),n=rr(e,Fm);return(t=typeof t=="function"?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?zm(n,void 0,t):[]});function f8(e,t){return function(n,r){return function(i,o,a,s){return Vo(i,function(u,c,l){o(s,a(u),c,l)}),s}(n,e,t(r),{})}}var yF=Object.prototype.toString,bF=f8(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=yF.call(t)),e[t]=n},zf(Qr)),h8=bF,d8=Object.prototype,wF=d8.hasOwnProperty,xF=d8.toString,kF=f8(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=xF.call(t)),wF.call(e,t)?e[t].push(n):e[t]=[n]},We),v8=kF;function p8(e,t){return t.length<2?e:As(e,zi(t,0,-1))}function cl(e,t,n){var r=(e=p8(e,t=La(t,e)))==null?e:e[zo(le(t))];return r==null?void 0:Si(r,e,n)}var m8=sn(cl),jF=sn(function(e,t,n){var r=-1,i=typeof t=="function",o=ri(e)?Array(e.length):[];return Va(e,function(a){o[++r]=i?Si(t,a,n):cl(a,t,n)}),o}),g8=jF,y8=Bi&&Bi.isArrayBuffer,b8=y8?Ci(y8):function(e){return cr(e)&&ni(e)=="[object ArrayBuffer]"};function w8(e){return e===!0||e===!1||cr(e)&&ni(e)=="[object Boolean]"}var x8=Bi&&Bi.isDate,k8=x8?Ci(x8):function(e){return cr(e)&&ni(e)=="[object Date]"};function j8(e){return cr(e)&&e.nodeType===1&&!Cu(e)}var SF="[object Map]",CF="[object Set]",$F=Object.prototype.hasOwnProperty;function Ue(e){if(e==null)return!0;if(ri(e)&&(Ve(e)||typeof e=="string"||typeof e.splice=="function"||ba(e)||Ms(e)||Da(e)))return!e.length;var t=Fo(e);if(t==SF||t==CF)return!e.size;if(Xc(e))return!Up(e).length;for(var n in e)if($F.call(e,n))return!1;return!0}function rn(e,t){return il(e,t)}function S8(e,t,n){var r=(n=typeof n=="function"?n:void 0)?n(e,t):void 0;return r===void 0?il(e,t,void 0,n):!!r}var _F=Br.isFinite;function C8(e){return typeof e=="number"&&_F(e)}function Vm(e){return typeof e=="number"&&e==Je(e)}function $8(e,t){return e===t||jm(e,t,Sm(t))}function _8(e,t,n){return n=typeof n=="function"?n:void 0,jm(e,t,Sm(t),n)}var OF="[object Number]";function Wm(e){return typeof e=="number"||cr(e)&&ni(e)==OF}function O8(e){return Wm(e)&&e!=+e}var MF=If?Lo:Hf;function M8(e){if(MF(e))throw new Error("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return X3(e)}function E8(e){return e==null}function A8(e){return e===null}var P8=Bi&&Bi.isRegExp,vh=P8?Ci(P8):function(e){return cr(e)&&ni(e)=="[object RegExp]"},EF=9007199254740991;function T8(e){return Vm(e)&&e>=-9007199254740991&&e<=EF}function R8(e){return e===void 0}function N8(e){return cr(e)&&Fo(e)=="[object WeakMap]"}function I8(e){return cr(e)&&ni(e)=="[object WeakSet]"}function D8(e){return We(typeof e=="function"?e:Fi(e,1))}var AF=Array.prototype.join;function L8(e,t){return e==null?"":AF.call(e,t)}var PF=Ou(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),B8=PF,TF=ih(function(e,t,n){ya(e,n,t)}),z8=TF,RF=Math.max,NF=Math.min;function F8(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=r;return n!==void 0&&(i=(i=Je(n))<0?RF(r+i,0):NF(i,r-1)),t==t?function(o,a,s){for(var u=s+1;u--;)if(o[u]===a)return u;return u}(e,t,i):Vf(e,s4,i,!0)}var IF=Ou(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),V8=IF,W8=q4("toLowerCase");function qm(e,t){return e<t}var q8=dh(qm),H8=dh(function(e,t){return e<=t});function U8(e,t){var n={};return t=We(t),Vo(e,function(r,i,o){ya(n,t(r,i,o),r)}),n}function Hm(e,t){var n={};return t=We(t),Vo(e,function(r,i,o){ya(n,i,t(r,i,o))}),n}function J8(e){return JS(Fi(e,1))}function K8(e,t){return GS(e,Fi(t,1))}function ph(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(a!=null&&(s===void 0?a==a&&!di(a):n(a,s)))var s=a,u=o}return u}function G8(e){return e&&e.length?ph(e,Qr,Lm):void 0}function Q8(e,t){return e&&e.length?ph(e,We(t),Lm):void 0}function Um(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==void 0&&(n=n===void 0?o:n+o)}return n}var DF=NaN;function Y8(e,t){var n=e==null?0:e.length;return n?Um(e,t)/n:DF}function Z8(e){return Y8(e,Qr)}function X8(e,t){return Y8(e,We(t))}var LF=ku(function(e,t,n){sh(e,t,n)}),t5=LF,BF=sn(function(e,t){return function(n){return cl(n,e,t)}}),e5=BF,zF=sn(function(e,t){return function(n){return cl(e,n,t)}}),n5=zF;function r5(e){return e&&e.length?ph(e,Qr,qm):void 0}function Tu(e,t){return e&&e.length?ph(e,We(t),qm):void 0}function Jm(e,t,n){var r=$r(t),i=hh(t,r),o=!(Kn(n)&&"chain"in n&&!n.chain),a=Lo(e);return Di(i,function(s){var u=t[s];e[s]=u,a&&(e.prototype[s]=function(){var c=this.__chain__;if(o||c){var l=e(this.__wrapped__);return(l.__actions__=vi(this.__actions__)).push({func:u,args:arguments,thisArg:e}),l.__chain__=c,l}return u.apply(e,Ba([this.value()],arguments))})}),e}var i5=Nf(function(e,t){return e*t},1),FF="Expected a function";function Ru(e){if(typeof e!="function")throw new TypeError(FF);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var VF="[object Map]",WF="[object Set]",Km=Gr?Gr.iterator:void 0;function Gm(e){if(!e)return[];if(ri(e))return ul(e)?co(e):vi(e);if(Km&&e[Km])return function(n){for(var r,i=[];!(r=n.next()).done;)i.push(r.value);return i}(e[Km]());var t=Fo(e);return(t==VF?xm:t==WF?eh:Ns)(e)}function Qm(){this.__values__===void 0&&(this.__values__=Gm(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function o5(e,t){var n=e.length;if(n)return ma(t+=t<0?n:0,n)?e[t]:void 0}function a5(e,t){return e&&e.length?o5(e,Je(t)):void 0}function s5(e){return e=Je(e),sn(function(t){return o5(t,e)})}function Ym(e,t){return(e=p8(e,t=La(t,e)))==null||delete e[zo(le(t))]}function qF(e){return Cu(e)?void 0:e}var HF=ka(function(e,t){var n={};if(e==null)return n;var r=!1;t=rr(t,function(o){return o=La(o,e),r||(r=o.length>1),o}),Bo(e,hm(e),n),r&&(n=Fi(n,7,qF));for(var i=t.length;i--;)Ym(n,t[i]);return n}),u5=HF;function ll(e,t,n,r){if(!Kn(e))return e;for(var i=-1,o=(t=La(t,e)).length,a=o-1,s=e;s!=null&&++i<o;){var u=zo(t[i]),c=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var l=s[u];(c=r?r(l,u,s):void 0)===void 0&&(c=Kn(l)?l:ma(t[i+1])?[]:{})}Yc(s,u,c),s=s[u]}return e}function c5(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=As(e,a);n(s,a)&&ll(o,La(a,e),s)}return o}function Zm(e,t){if(e==null)return{};var n=rr(hm(e),function(r){return[r]});return t=We(t),c5(e,n,function(r,i){return t(r,i[0])})}function l5(e,t){return Zm(e,Ru(We(t)))}function f5(e){return Yp(2,e)}function h5(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e==e,o=di(e),a=t!==void 0,s=t===null,u=t==t,c=di(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!u)return-1}return 0}function d5(e,t,n){t=t.length?rr(t,function(o){return Ve(o)?function(a){return As(a,o.length===1?o[0]:o)}:o}):[Qr];var r=-1;t=rr(t,Ci(We));var i=LC(e,function(o,a,s){var u=rr(t,function(c){return c(o)});return{criteria:u,index:++r,value:o}});return function(o,a){var s=o.length;for(o.sort(a);s--;)o[s]=o[s].value;return o}(i,function(o,a){return function(s,u,c){for(var l=-1,f=s.criteria,h=u.criteria,d=f.length,v=c.length;++l<d;){var p=h5(f[l],h[l]);if(p)return l>=v?p:p*(c[l]=="desc"?-1:1)}return s.index-u.index}(o,a,n)})}function v5(e,t,n,r){return e==null?[]:(Ve(t)||(t=t==null?[]:[t]),Ve(n=r?void 0:n)||(n=n==null?[]:[n]),d5(e,t,n))}function Xm(e){return ka(function(t){return t=rr(t,Ci(We)),sn(function(n){var r=this;return e(t,function(i){return Si(i,r,n)})})})}var p5=Xm(rr),UF=sn,JF=Math.min,KF=UF(function(e,t){var n=(t=t.length==1&&Ve(t[0])?rr(t[0],Ci(We)):rr(Fr(t,1),Ci(We))).length;return sn(function(r){for(var i=-1,o=JF(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Si(e,this,r)})}),m5=KF,g5=Xm(_C),y5=Xm(wm),GF=9007199254740991,QF=Math.floor;function tg(e,t){var n="";if(!e||t<1||t>GF)return n;do t%2&&(n+=e),(t=QF(t/2))&&(e+=e);while(t);return n}var YF=Cm("length"),b5="\\ud800-\\udfff",ZF="["+b5+"]",eg="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ng="\\ud83c[\\udffb-\\udfff]",w5="[^"+b5+"]",x5="(?:\\ud83c[\\udde6-\\uddff]){2}",k5="[\\ud800-\\udbff][\\udc00-\\udfff]",j5="(?:"+eg+"|"+ng+")?",S5="[\\ufe0e\\ufe0f]?",XF=S5+j5+("(?:\\u200d(?:"+[w5,x5,k5].join("|")+")"+S5+j5+")*"),tV="(?:"+[w5+eg+"?",eg,x5,k5,ZF].join("|")+")",C5=RegExp(ng+"(?="+ng+")|"+tV+XF,"g");function Nu(e){return $u(e)?function(t){for(var n=C5.lastIndex=0;C5.test(t);)++n;return n}(e):YF(e)}var eV=Math.ceil;function mh(e,t){var n=(t=t===void 0?" ":ki(t)).length;if(n<2)return n?tg(t,e):t;var r=tg(t,eV(e/Nu(t)));return $u(t)?za(co(r),0,e).join(""):r.slice(0,e)}var nV=Math.ceil,rV=Math.floor;function $5(e,t,n){e=Cn(e);var r=(t=Je(t))?Nu(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return mh(rV(i),n)+e+mh(nV(i),n)}function _5(e,t,n){e=Cn(e);var r=(t=Je(t))?Nu(e):0;return t&&r<t?e+mh(t-r,n):e}function O5(e,t,n){e=Cn(e);var r=(t=Je(t))?Nu(e):0;return t&&r<t?mh(t-r,n)+e:e}var iV=/^\s+/,oV=Br.parseInt;function M5(e,t,n){return n||t==null?t=0:t&&(t=+t),oV(Cn(e).replace(iV,""),t||0)}var rg=sn(function(e,t){return ga(e,32,void 0,t,Ia(t,xu(rg)))});rg.placeholder={};var ig=rg,og=sn(function(e,t){return ga(e,64,void 0,t,Ia(t,xu(og)))});og.placeholder={};var E5=og,aV=ih(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ag=aV,sV=ka(function(e,t){return e==null?{}:function(n,r){return c5(n,r,function(i,o){return rh(n,o)})}(e,t)}),A5=sV;function sg(e){for(var t,n=this;n instanceof Lf;){var r=i4(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t}function P5(e){return function(t){return e==null?void 0:As(e,t)}}function uV(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}var T5=Array.prototype.splice;function ug(e,t,n,r){var i=r?uV:wu,o=-1,a=t.length,s=e;for(e===t&&(t=vi(t)),n&&(s=rr(e,Ci(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&T5.call(s,u,1),T5.call(e,u,1);return e}function cg(e,t){return e&&e.length&&t&&t.length?ug(e,t):e}var R5=sn(cg);function N5(e,t,n){return e&&e.length&&t&&t.length?ug(e,t,We(n)):e}function I5(e,t,n){return e&&e.length&&t&&t.length?ug(e,t,void 0,n):e}var cV=Array.prototype.splice;function D5(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ma(i)?cV.call(e,i,1):Ym(e,i)}}return e}var lV=ka(function(e,t){var n=e==null?0:e.length,r=Kp(e,t);return D5(e,rr(t,function(i){return ma(i,n)?+i:i}).sort(h5)),r}),L5=lV,fV=Math.floor,hV=Math.random;function lg(e,t){return e+fV(hV()*(t-e+1))}var dV=parseFloat,vV=Math.min,pV=Math.random;function B5(e,t,n){if(n&&typeof n!="boolean"&&ii(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=Do(e),t===void 0?(t=e,e=0):t=Do(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=pV();return vV(e+i*(t-e+dV("1e-"+((i+"").length-1))),t)}return lg(e,t)}var mV=Math.ceil,gV=Math.max;function z5(e){return function(t,n,r){return r&&typeof r!="number"&&ii(t,n,r)&&(n=r=void 0),t=Do(t),n===void 0?(n=t,t=0):n=Do(n),function(i,o,a,s){for(var u=-1,c=gV(mV((o-i)/(a||1)),0),l=Array(c);c--;)l[s?c:++u]=i,i+=a;return l}(t,n,r=r===void 0?t<n?1:-1:Do(r),e)}}var fg=z5(),F5=z5(!0),yV=ka(function(e,t){return ga(e,256,void 0,void 0,void 0,t)}),V5=yV;function W5(e,t,n,r,i){return i(e,function(o,a,s){n=r?(r=!1,o):t(n,o,a,s)}),n}function q5(e,t,n){var r=Ve(e)?im:W5,i=arguments.length<3;return r(e,We(t),n,i,Va)}function bV(e,t,n,r){var i=e==null?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function H5(e,t,n){var r=Ve(e)?bV:W5,i=arguments.length<3;return r(e,We(t),n,i,xC)}function U5(e,t){return(Ve(e)?Fa:EC)(e,Ru(We(t)))}function J5(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=We(t);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return D5(e,i),n}function K5(e,t,n){return t=(n?ii(e,t,n):t===void 0)?1:Je(t),tg(Cn(e),t)}function G5(){var e=arguments,t=Cn(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Q5(e,t){if(typeof e!="function")throw new TypeError("Expected a function");return sn(e,t=t===void 0?t:Je(t))}function Y5(e,t,n){var r=-1,i=(t=La(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=e==null?void 0:e[zo(t[r])];o===void 0&&(r=i,o=n),e=Lo(o)?o.call(e):o}return e}var wV=Array.prototype.reverse;function gh(e){return e==null?e:wV.call(e)}var Z5=um("round");function X5(e){var t=e.length;return t?e[lg(0,t-1)]:void 0}function xV(e){return X5(Ns(e))}function t$(e){return(Ve(e)?X5:xV)(e)}function yh(e,t){var n=-1,r=e.length,i=r-1;for(t=t===void 0?r:t;++n<t;){var o=lg(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}function kV(e,t){return yh(vi(e),Ps(t,0,e.length))}function jV(e,t){var n=Ns(e);return yh(n,Ps(t,0,n.length))}function e$(e,t,n){return t=(n?ii(e,t,n):t===void 0)?1:Je(t),(Ve(e)?kV:jV)(e,t)}function n$(e,t,n){return e==null?e:ll(e,t,n)}function r$(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:ll(e,t,n,r)}function SV(e){return yh(vi(e))}function CV(e){return yh(Ns(e))}function i$(e){return(Ve(e)?SV:CV)(e)}function o$(e){if(e==null)return 0;if(ri(e))return ul(e)?Nu(e):e.length;var t=Fo(e);return t=="[object Map]"||t=="[object Set]"?e.size:Up(e).length}function a$(e,t,n){var r=e==null?0:e.length;return r?(n&&typeof n!="number"&&ii(e,t,n)?(t=0,n=r):(t=t==null?0:Je(t),n=n===void 0?r:Je(n)),zi(e,t,n)):[]}var $V=Ou(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),s$=$V;function _V(e,t){var n;return Va(e,function(r,i,o){return!(n=t(r,i,o))}),!!n}function u$(e,t,n){var r=Ve(e)?wm:_V;return n&&ii(e,t,n)&&(t=void 0),r(e,We(t))}var OV=sn(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ii(e,t[0],t[1])?t=[]:n>2&&ii(t[0],t[1],t[2])&&(t=[t[0]]),d5(e,Fr(t,1),[])}),hg=OV,MV=4294967294,EV=Math.floor,AV=Math.min;function dg(e,t,n,r){var i=0,o=e==null?0:e.length;if(o===0)return 0;for(var a=(t=n(t))!=t,s=t===null,u=di(t),c=t===void 0;i<o;){var l=EV((i+o)/2),f=n(e[l]),h=f!==void 0,d=f===null,v=f==f,p=di(f);if(a)var m=r||v;else m=c?v&&(r||h):s?v&&h&&(r||!d):u?v&&h&&!d&&(r||!p):!d&&!p&&(r?f<=t:f<t);m?i=l+1:o=l}return AV(o,MV)}var PV=2147483647;function bh(e,t,n){var r=0,i=e==null?r:e.length;if(typeof t=="number"&&t==t&&i<=PV){for(;r<i;){var o=r+i>>>1,a=e[o];a!==null&&!di(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return dg(e,t,Qr,n)}function c$(e,t){return bh(e,t)}function l$(e,t,n){return dg(e,t,We(n))}function f$(e,t){var n=e==null?0:e.length;if(n){var r=bh(e,t);if(r<n&&Li(e[r],t))return r}return-1}function h$(e,t){return bh(e,t,!0)}function d$(e,t,n){return dg(e,t,We(n),!0)}function v$(e,t){if(e!=null&&e.length){var n=bh(e,t,!0)-1;if(Li(e[n],t))return n}return-1}function p$(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Li(s,u)){var u=s;o[i++]=a===0?0:a}}return o}function m$(e){return e&&e.length?p$(e):[]}function g$(e,t){return e&&e.length?p$(e,We(t)):[]}function y$(e,t,n){return n&&typeof n!="number"&&ii(e,t,n)&&(t=n=void 0),(n=n===void 0?4294967295:n>>>0)?(e=Cn(e))&&(typeof t=="string"||t!=null&&!vh(t))&&!(t=ki(t))&&$u(e)?za(co(e),0,n):e.split(t,n):[]}var TV=Math.max;function b$(e,t){if(typeof e!="function")throw new TypeError("Expected a function");return t=t==null?0:TV(Je(t),0),sn(function(n){var r=n[t],i=za(n,0,t);return r&&Ba(i,r),Si(e,this,i)})}var RV=Ou(function(e,t,n){return e+(n?" ":"")+Zf(t)}),w$=RV;function x$(e,t,n){return e=Cn(e),n=n==null?0:Ps(Je(n),0,e.length),t=ki(t),e.slice(n,n+t.length)==t}function k$(){return{}}function j$(){return""}function S$(){return!0}var C$=Nf(function(e,t){return e-t},0);function $$(e){return e&&e.length?Um(e,Qr):0}function _$(e,t){return e&&e.length?Um(e,We(t)):0}function O$(e){var t=e==null?0:e.length;return t?zi(e,1,t):[]}function M$(e,t,n){return e&&e.length?zi(e,0,(t=n||t===void 0?1:Je(t))<0?0:t):[]}function E$(e,t,n){var r=e==null?0:e.length;return r?zi(e,(t=r-(t=n||t===void 0?1:Je(t)))<0?0:t,r):[]}function A$(e,t){return e&&e.length?uh(e,We(t),!1,!0):[]}function P$(e,t){return e&&e.length?uh(e,We(t)):[]}function T$(e,t){return t(e),e}var R$=Object.prototype,NV=R$.hasOwnProperty;function N$(e,t,n,r){return e===void 0||Li(e,R$[n])&&!NV.call(r,n)?t:e}var IV={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function DV(e){return"\\"+IV[e]}var I$=/<%=([\s\S]+?)%>/g,wh={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I$,variable:"",imports:{_:{escape:Rm}}},LV=/\b__p \+= '';/g,BV=/\b(__p \+=) '' \+/g,zV=/(__e\(.*?\)|\b__t\)) \+\n'';/g,FV=/[()=,{}\[\]\/\s]/,VV=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xh=/($^)/,WV=/['\n\r\u2028\u2029\\]/g,D$=Object.prototype.hasOwnProperty;function L$(e,t,n){var r=wh.imports._.templateSettings||wh;n&&ii(e,t,n)&&(t=void 0),e=Cn(e),t=ju({},t,r,N$);var i,o,a=ju({},t.imports,r.imports,N$),s=$r(a),u=Bm(a,s),c=0,l=t.interpolate||xh,f="__p += '",h=RegExp((t.escape||xh).source+"|"+l.source+"|"+(l===I$?VV:xh).source+"|"+(t.evaluate||xh).source+"|$","g"),d=D$.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+`
|
|
`:"";e.replace(h,function(m,g,y,b,w,j){return y||(y=b),f+=e.slice(c,j).replace(WV,DV),g&&(i=!0,f+=`' +
|
|
__e(`+g+`) +
|
|
'`),w&&(o=!0,f+=`';
|
|
`+w+`;
|
|
__p += '`),y&&(f+=`' +
|
|
((__t = (`+y+`)) == null ? '' : __t) +
|
|
'`),c=j+m.length,m}),f+=`';
|
|
`;var v=D$.call(t,"variable")&&t.variable;if(v){if(FV.test(v))throw new Error("Invalid `variable` option passed into `_.template`")}else f=`with (obj) {
|
|
`+f+`
|
|
}
|
|
`;f=(o?f.replace(LV,""):f).replace(BV,"$1").replace(zV,"$1;"),f="function("+(v||"obj")+`) {
|
|
`+(v?"":`obj || (obj = {});
|
|
`)+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?`, __j = Array.prototype.join;
|
|
function print() { __p += __j.call(arguments, '') }
|
|
`:`;
|
|
`)+f+`return __p
|
|
}`;var p=Qp(function(){return Function(s,d+"return "+f).apply(void 0,u)});if(p.source=f,Yf(p))throw p;return p}var qV="Expected a function";function vg(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(qV);return Kn(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Eu(e,t,{leading:r,maxWait:t,trailing:i})}function Iu(e,t){return t(e)}var HV=9007199254740991,pg=4294967295,UV=Math.min;function mg(e,t){if((e=Je(e))<1||e>HV)return[];var n=pg,r=UV(e,pg);t=Wo(t),e-=pg;for(var i=qp(r,t);++n<e;)t(n);return i}function gg(){return this}function B$(e,t){var n=e;return n instanceof mn&&(n=n.value()),im(t,function(r,i){return i.func.apply(i.thisArg,Ba([r],i.args))},n)}function Is(){return B$(this.__wrapped__,this.__actions__)}function z$(e){return Cn(e).toLowerCase()}function F$(e){return Ve(e)?rr(e,zo):di(e)?[e]:vi(P4(Cn(e)))}var JV=9007199254740991;function V$(e){return e?Ps(Je(e),-9007199254740991,JV):e===0?e:0}function W$(e){return Cn(e).toUpperCase()}function q$(e,t,n){var r=Ve(e),i=r||ba(e)||Ms(e);if(t=We(t),n==null){var o=e&&e.constructor;n=i?r?new o:[]:Kn(e)&&Lo(o)?yu(Qf(e)):{}}return(i?Di:Vo)(e,function(a,s,u){return t(n,a,s,u)}),n}function H$(e,t){for(var n=e.length;n--&&wu(t,e[n],0)>-1;);return n}function U$(e,t){for(var n=-1,r=e.length;++n<r&&wu(t,e[n],0)>-1;);return n}function J$(e,t,n){if((e=Cn(e))&&(n||t===void 0))return J3(e);if(!e||!(t=ki(t)))return e;var r=co(e),i=co(t);return za(r,U$(r,i),H$(r,i)+1).join("")}function K$(e,t,n){if((e=Cn(e))&&(n||t===void 0))return e.slice(0,U3(e)+1);if(!e||!(t=ki(t)))return e;var r=co(e);return za(r,0,H$(r,co(t))+1).join("")}var KV=/^\s+/;function G$(e,t,n){if((e=Cn(e))&&(n||t===void 0))return e.replace(KV,"");if(!e||!(t=ki(t)))return e;var r=co(e);return za(r,U$(r,co(t))).join("")}var GV=/\w*$/;function Q$(e,t){var n=30,r="...";if(Kn(t)){var i="separator"in t?t.separator:i;n="length"in t?Je(t.length):n,r="omission"in t?ki(t.omission):r}var o=(e=Cn(e)).length;if($u(e)){var a=co(e);o=a.length}if(n>=o)return e;var s=n-Nu(r);if(s<1)return r;var u=a?za(a,0,s).join(""):e.slice(0,s);if(i===void 0)return u+r;if(a&&(s+=u.length-s),vh(i)){if(e.slice(s).search(i)){var c,l=u;for(i.global||(i=RegExp(i.source,Cn(GV.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var f=c.index;u=u.slice(0,f===void 0?s:f)}}else if(e.indexOf(ki(i),s)!=s){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+r}function Y$(e){return Wp(e,1)}var QV=om({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Z$=/&(?:amp|lt|gt|quot|#39);/g,YV=RegExp(Z$.source);function X$(e){return(e=Cn(e))&&YV.test(e)?e.replace(Z$,QV):e}var ZV=Mu&&1/eh(new Mu([,-0]))[1]==1/0?function(e){return new Mu(e)}:Dn,XV=ZV,tW=200;function Wa(e,t,n){var r=-1,i=Wf,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Pm;else if(o>=tW){var c=t?null:XV(e);if(c)return eh(c);a=!1,i=rl,u=new Rs}else u=t?[]:s;t:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||l!==0?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}var t6=sn(function(e){return Wa(Fr(e,1,mr,!0))}),eW=sn(function(e){var t=le(e);return mr(t)&&(t=void 0),Wa(Fr(e,1,mr,!0),We(t))}),e6=eW,n6=sn(function(e){var t=le(e);return t=typeof t=="function"?t:void 0,Wa(Fr(e,1,mr,!0),void 0,t)});function r6(e){return e&&e.length?Wa(e):[]}function i6(e,t){return e&&e.length?Wa(e,We(t)):[]}function o6(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?Wa(e,void 0,t):[]}var nW=0;function qa(e){var t=++nW;return Cn(e)+t}function a6(e,t){return e==null||Ym(e,t)}var rW=Math.max;function kh(e){if(!e||!e.length)return[];var t=0;return e=Fa(e,function(n){if(mr(n))return t=rW(n.length,t),!0}),qp(t,function(n){return rr(e,Cm(n))})}function yg(e,t){if(!e||!e.length)return[];var n=kh(e);return t==null?n:rr(n,function(r){return Si(t,void 0,r)})}function s6(e,t,n,r){return ll(e,t,n(As(e,t)),r)}function u6(e,t,n){return e==null?e:s6(e,t,Wo(n))}function c6(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:s6(e,t,Wo(n),r)}var iW=Ou(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),l6=iW;function f6(e){return e==null?[]:Bm(e,oi(e))}var oW=sn(function(e,t){return mr(e)?al(e,t):[]}),h6=oW;function d6(e,t){return ig(Wo(t),e)}var aW=ka(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(o){return Kp(o,e)};return!(t>1||this.__actions__.length)&&r instanceof mn&&ma(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:Iu,args:[i],thisArg:void 0}),new Ii(r,this.__chain__).thru(function(o){return t&&!o.length&&o.push(void 0),o})):this.thru(i)}),v6=aW;function p6(){return cm(this)}function m6(){var e=this.__wrapped__;if(e instanceof mn){var t=e;return this.__actions__.length&&(t=new mn(this)),(t=t.reverse()).__actions__.push({func:Iu,args:[gh],thisArg:void 0}),new Ii(t,this.__chain__)}return this.thru(gh)}function bg(e,t,n){var r=e.length;if(r<2)return r?Wa(e[0]):[];for(var i=-1,o=Array(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=al(o[i]||a,e[s],t,n));return Wa(Fr(o,1),t,n)}var g6=sn(function(e){return bg(Fa(e,mr))}),sW=sn(function(e){var t=le(e);return mr(t)&&(t=void 0),bg(Fa(e,mr),We(t))}),y6=sW,b6=sn(function(e){var t=le(e);return t=typeof t=="function"?t:void 0,bg(Fa(e,mr),void 0,t)}),w6=sn(kh);function x6(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}function k6(e,t){return x6(e||[],t||[],Yc)}function j6(e,t){return x6(e||[],t||[],ll)}var uW=sn(function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n=typeof n=="function"?(e.pop(),n):void 0,yg(e,n)}),S6=uW,ge={chunk:lS,compact:LS,concat:BS,difference:hC,differenceBy:dC,differenceWith:vC,drop:mC,dropRight:gC,dropRightWhile:yC,dropWhile:bC,fill:MC,findIndex:Im,findLastIndex:Dm,first:Ar,flatten:Gp,flattenDeep:VC,flattenDepth:WC,fromPairs:XC,head:Ar,indexOf:s8,initial:Ze,intersection:u8,intersectionBy:c8,intersectionWith:l8,join:L8,last:le,lastIndexOf:F8,nth:a5,pull:R5,pullAll:cg,pullAllBy:N5,pullAllWith:I5,pullAt:L5,remove:J5,reverse:gh,slice:a$,sortedIndex:c$,sortedIndexBy:l$,sortedIndexOf:f$,sortedLastIndex:h$,sortedLastIndexBy:d$,sortedLastIndexOf:v$,sortedUniq:m$,sortedUniqBy:g$,tail:O$,take:M$,takeRight:E$,takeRightWhile:A$,takeWhile:P$,union:t6,unionBy:e6,unionWith:n6,uniq:r6,uniqBy:i6,uniqWith:o6,unzip:kh,unzipWith:yg,without:h6,xor:g6,xorBy:y6,xorWith:b6,zip:w6,zipObject:k6,zipObjectDeep:j6,zipWith:S6},Ln={countBy:nC,each:ch,eachRight:sl,every:OC,filter:AC,find:TC,findLast:IC,flatMap:BC,flatMapDeep:zC,flatMapDepth:FC,forEach:ch,forEachRight:sl,groupBy:Pu,includes:a8,invokeMap:g8,keyBy:z8,map:Au,orderBy:v5,partition:ag,reduce:q5,reduceRight:H5,reject:U5,sample:t$,sampleSize:e$,shuffle:i$,size:o$,some:u$,sortBy:hg},cW={now:ol},gr={after:Q3,ary:Wp,before:Yp,bind:Xp,bindKey:D4,curry:oh,curryRight:ah,debounce:Eu,defer:lC,delay:fC,flip:qC,memoize:Su,negate:Ru,once:f5,overArgs:m5,partial:ig,partialRight:E5,rearg:V5,rest:Q5,spread:b$,throttle:vg,unary:Y$,wrap:d6},Pe={castArray:uS,clone:NS,cloneDeep:IS,cloneDeepWith:ym,cloneWith:DS,conformsTo:XS,eq:Li,gt:n8,gte:r8,isArguments:Da,isArray:Ve,isArrayBuffer:b8,isArrayLike:ri,isArrayLikeObject:mr,isBoolean:w8,isBuffer:ba,isDate:k8,isElement:j8,isEmpty:Ue,isEqual:rn,isEqualWith:S8,isError:Yf,isFinite:C8,isFunction:Lo,isInteger:Vm,isLength:Zc,isMap:mm,isMatch:$8,isMatchWith:_8,isNaN:O8,isNative:M8,isNil:E8,isNull:A8,isNumber:Wm,isObject:Kn,isObjectLike:cr,isPlainObject:Cu,isRegExp:vh,isSafeInteger:T8,isSet:gm,isString:ul,isSymbol:di,isTypedArray:Ms,isUndefined:R8,isWeakMap:N8,isWeakSet:I8,lt:q8,lte:H8,toArray:Gm,toFinite:Do,toInteger:Je,toLength:Nm,toNumber:ji,toPlainObject:Em,toSafeInteger:V$,toString:Cn},ai={add:H3,ceil:cS,divide:pC,floor:HC,max:G8,maxBy:Q8,mean:Z8,meanBy:X8,min:r5,minBy:Tu,multiply:i5,round:Z5,subtract:C$,sum:$$,sumBy:_$},lW=fS,fW=o8,hW=B5,Fe={assign:E4,assignIn:Uf,assignInWith:ju,assignWith:A4,at:R4,create:rC,defaults:aC,defaultsDeep:uC,entries:lh,entriesIn:fh,extend:Uf,extendWith:ju,findKey:NC,findLastKey:DC,forIn:GC,forInRight:QC,forOwn:YC,forOwnRight:ZC,functions:t8,functionsIn:e8,get:Gf,has:i8,hasIn:rh,invert:h8,invertBy:v8,invoke:m8,keys:$r,keysIn:oi,mapKeys:U8,mapValues:Hm,merge:t5,mergeWith:Am,omit:u5,omitBy:l5,pick:A5,pickBy:Zm,result:Y5,set:n$,setWith:r$,toPairs:lh,toPairsIn:fh,transform:q$,unset:a6,update:u6,updateWith:c6,values:Ns,valuesIn:f6},qo={at:v6,chain:cm,commit:bm,lodash:J,next:Qm,plant:sg,reverse:m6,tap:T$,thru:Iu,toIterator:gg,toJSON:Is,value:Is,valueOf:Is,wrapperChain:p6},$n={camelCase:sS,capitalize:rm,deburr:am,endsWith:kC,escape:Rm,escapeRegExp:$C,kebabCase:B8,lowerCase:V8,lowerFirst:W8,pad:$5,padEnd:_5,padStart:O5,parseInt:M5,repeat:K5,replace:G5,snakeCase:s$,split:y$,startCase:w$,startsWith:x$,template:L$,templateSettings:wh,toLower:z$,toUpper:W$,trim:J$,trimEnd:K$,trimStart:G$,truncate:Q$,unescape:X$,upperCase:l6,upperFirst:Zf,words:sm},Pn={attempt:Qp,bindAll:I4,cond:QS,conforms:ZS,constant:zf,defaultTo:iC,flow:JC,flowRight:KC,identity:Qr,iteratee:D8,matches:J8,matchesProperty:K8,method:e5,methodOf:n5,mixin:Jm,noop:Dn,nthArg:s5,over:p5,overEvery:g5,overSome:y5,property:$m,propertyOf:P5,range:fg,rangeRight:F5,stubArray:Xf,stubFalse:Hf,stubObject:k$,stubString:j$,stubTrue:S$,times:mg,toPath:F$,uniqueId:qa},dW=Math.max,vW=Math.min,pW=Math.min;var wg,C6=4294967295,mW=Array.prototype,$6=Object.prototype.hasOwnProperty,_6=Gr?Gr.iterator:void 0,gW=Math.max,O6=Math.min,xg=function(e){return function(t,n,r){if(r==null){var i=Kn(n),o=i&&$r(n),a=o&&o.length&&hh(n,o);(a?a.length:i)||(r=n,n=t,t=this)}return e(t,n,r)}}(Jm);J.after=gr.after,J.ary=gr.ary,J.assign=Fe.assign,J.assignIn=Fe.assignIn,J.assignInWith=Fe.assignInWith,J.assignWith=Fe.assignWith,J.at=Fe.at,J.before=gr.before,J.bind=gr.bind,J.bindAll=Pn.bindAll,J.bindKey=gr.bindKey,J.castArray=Pe.castArray,J.chain=qo.chain,J.chunk=ge.chunk,J.compact=ge.compact,J.concat=ge.concat,J.cond=Pn.cond,J.conforms=Pn.conforms,J.constant=Pn.constant,J.countBy=Ln.countBy,J.create=Fe.create,J.curry=gr.curry,J.curryRight=gr.curryRight,J.debounce=gr.debounce,J.defaults=Fe.defaults,J.defaultsDeep=Fe.defaultsDeep,J.defer=gr.defer,J.delay=gr.delay,J.difference=ge.difference,J.differenceBy=ge.differenceBy,J.differenceWith=ge.differenceWith,J.drop=ge.drop,J.dropRight=ge.dropRight,J.dropRightWhile=ge.dropRightWhile,J.dropWhile=ge.dropWhile,J.fill=ge.fill,J.filter=Ln.filter,J.flatMap=Ln.flatMap,J.flatMapDeep=Ln.flatMapDeep,J.flatMapDepth=Ln.flatMapDepth,J.flatten=ge.flatten,J.flattenDeep=ge.flattenDeep,J.flattenDepth=ge.flattenDepth,J.flip=gr.flip,J.flow=Pn.flow,J.flowRight=Pn.flowRight,J.fromPairs=ge.fromPairs,J.functions=Fe.functions,J.functionsIn=Fe.functionsIn,J.groupBy=Ln.groupBy,J.initial=ge.initial,J.intersection=ge.intersection,J.intersectionBy=ge.intersectionBy,J.intersectionWith=ge.intersectionWith,J.invert=Fe.invert,J.invertBy=Fe.invertBy,J.invokeMap=Ln.invokeMap,J.iteratee=Pn.iteratee,J.keyBy=Ln.keyBy,J.keys=$r,J.keysIn=Fe.keysIn,J.map=Ln.map,J.mapKeys=Fe.mapKeys,J.mapValues=Fe.mapValues,J.matches=Pn.matches,J.matchesProperty=Pn.matchesProperty,J.memoize=gr.memoize,J.merge=Fe.merge,J.mergeWith=Fe.mergeWith,J.method=Pn.method,J.methodOf=Pn.methodOf,J.mixin=xg,J.negate=Ru,J.nthArg=Pn.nthArg,J.omit=Fe.omit,J.omitBy=Fe.omitBy,J.once=gr.once,J.orderBy=Ln.orderBy,J.over=Pn.over,J.overArgs=gr.overArgs,J.overEvery=Pn.overEvery,J.overSome=Pn.overSome,J.partial=gr.partial,J.partialRight=gr.partialRight,J.partition=Ln.partition,J.pick=Fe.pick,J.pickBy=Fe.pickBy,J.property=Pn.property,J.propertyOf=Pn.propertyOf,J.pull=ge.pull,J.pullAll=ge.pullAll,J.pullAllBy=ge.pullAllBy,J.pullAllWith=ge.pullAllWith,J.pullAt=ge.pullAt,J.range=Pn.range,J.rangeRight=Pn.rangeRight,J.rearg=gr.rearg,J.reject=Ln.reject,J.remove=ge.remove,J.rest=gr.rest,J.reverse=ge.reverse,J.sampleSize=Ln.sampleSize,J.set=Fe.set,J.setWith=Fe.setWith,J.shuffle=Ln.shuffle,J.slice=ge.slice,J.sortBy=Ln.sortBy,J.sortedUniq=ge.sortedUniq,J.sortedUniqBy=ge.sortedUniqBy,J.split=$n.split,J.spread=gr.spread,J.tail=ge.tail,J.take=ge.take,J.takeRight=ge.takeRight,J.takeRightWhile=ge.takeRightWhile,J.takeWhile=ge.takeWhile,J.tap=qo.tap,J.throttle=gr.throttle,J.thru=Iu,J.toArray=Pe.toArray,J.toPairs=Fe.toPairs,J.toPairsIn=Fe.toPairsIn,J.toPath=Pn.toPath,J.toPlainObject=Pe.toPlainObject,J.transform=Fe.transform,J.unary=gr.unary,J.union=ge.union,J.unionBy=ge.unionBy,J.unionWith=ge.unionWith,J.uniq=ge.uniq,J.uniqBy=ge.uniqBy,J.uniqWith=ge.uniqWith,J.unset=Fe.unset,J.unzip=ge.unzip,J.unzipWith=ge.unzipWith,J.update=Fe.update,J.updateWith=Fe.updateWith,J.values=Fe.values,J.valuesIn=Fe.valuesIn,J.without=ge.without,J.words=$n.words,J.wrap=gr.wrap,J.xor=ge.xor,J.xorBy=ge.xorBy,J.xorWith=ge.xorWith,J.zip=ge.zip,J.zipObject=ge.zipObject,J.zipObjectDeep=ge.zipObjectDeep,J.zipWith=ge.zipWith,J.entries=Fe.toPairs,J.entriesIn=Fe.toPairsIn,J.extend=Fe.assignIn,J.extendWith=Fe.assignInWith,xg(J,J),J.add=ai.add,J.attempt=Pn.attempt,J.camelCase=$n.camelCase,J.capitalize=$n.capitalize,J.ceil=ai.ceil,J.clamp=lW,J.clone=Pe.clone,J.cloneDeep=Pe.cloneDeep,J.cloneDeepWith=Pe.cloneDeepWith,J.cloneWith=Pe.cloneWith,J.conformsTo=Pe.conformsTo,J.deburr=$n.deburr,J.defaultTo=Pn.defaultTo,J.divide=ai.divide,J.endsWith=$n.endsWith,J.eq=Pe.eq,J.escape=$n.escape,J.escapeRegExp=$n.escapeRegExp,J.every=Ln.every,J.find=Ln.find,J.findIndex=ge.findIndex,J.findKey=Fe.findKey,J.findLast=Ln.findLast,J.findLastIndex=ge.findLastIndex,J.findLastKey=Fe.findLastKey,J.floor=ai.floor,J.forEach=Ln.forEach,J.forEachRight=Ln.forEachRight,J.forIn=Fe.forIn,J.forInRight=Fe.forInRight,J.forOwn=Fe.forOwn,J.forOwnRight=Fe.forOwnRight,J.get=Fe.get,J.gt=Pe.gt,J.gte=Pe.gte,J.has=Fe.has,J.hasIn=Fe.hasIn,J.head=ge.head,J.identity=Qr,J.includes=Ln.includes,J.indexOf=ge.indexOf,J.inRange=fW,J.invoke=Fe.invoke,J.isArguments=Pe.isArguments,J.isArray=Ve,J.isArrayBuffer=Pe.isArrayBuffer,J.isArrayLike=Pe.isArrayLike,J.isArrayLikeObject=Pe.isArrayLikeObject,J.isBoolean=Pe.isBoolean,J.isBuffer=Pe.isBuffer,J.isDate=Pe.isDate,J.isElement=Pe.isElement,J.isEmpty=Pe.isEmpty,J.isEqual=Pe.isEqual,J.isEqualWith=Pe.isEqualWith,J.isError=Pe.isError,J.isFinite=Pe.isFinite,J.isFunction=Pe.isFunction,J.isInteger=Pe.isInteger,J.isLength=Pe.isLength,J.isMap=Pe.isMap,J.isMatch=Pe.isMatch,J.isMatchWith=Pe.isMatchWith,J.isNaN=Pe.isNaN,J.isNative=Pe.isNative,J.isNil=Pe.isNil,J.isNull=Pe.isNull,J.isNumber=Pe.isNumber,J.isObject=Kn,J.isObjectLike=Pe.isObjectLike,J.isPlainObject=Pe.isPlainObject,J.isRegExp=Pe.isRegExp,J.isSafeInteger=Pe.isSafeInteger,J.isSet=Pe.isSet,J.isString=Pe.isString,J.isSymbol=Pe.isSymbol,J.isTypedArray=Pe.isTypedArray,J.isUndefined=Pe.isUndefined,J.isWeakMap=Pe.isWeakMap,J.isWeakSet=Pe.isWeakSet,J.join=ge.join,J.kebabCase=$n.kebabCase,J.last=le,J.lastIndexOf=ge.lastIndexOf,J.lowerCase=$n.lowerCase,J.lowerFirst=$n.lowerFirst,J.lt=Pe.lt,J.lte=Pe.lte,J.max=ai.max,J.maxBy=ai.maxBy,J.mean=ai.mean,J.meanBy=ai.meanBy,J.min=ai.min,J.minBy=ai.minBy,J.stubArray=Pn.stubArray,J.stubFalse=Pn.stubFalse,J.stubObject=Pn.stubObject,J.stubString=Pn.stubString,J.stubTrue=Pn.stubTrue,J.multiply=ai.multiply,J.nth=ge.nth,J.noop=Pn.noop,J.now=cW.now,J.pad=$n.pad,J.padEnd=$n.padEnd,J.padStart=$n.padStart,J.parseInt=$n.parseInt,J.random=hW,J.reduce=Ln.reduce,J.reduceRight=Ln.reduceRight,J.repeat=$n.repeat,J.replace=$n.replace,J.result=Fe.result,J.round=ai.round,J.sample=Ln.sample,J.size=Ln.size,J.snakeCase=$n.snakeCase,J.some=Ln.some,J.sortedIndex=ge.sortedIndex,J.sortedIndexBy=ge.sortedIndexBy,J.sortedIndexOf=ge.sortedIndexOf,J.sortedLastIndex=ge.sortedLastIndex,J.sortedLastIndexBy=ge.sortedLastIndexBy,J.sortedLastIndexOf=ge.sortedLastIndexOf,J.startCase=$n.startCase,J.startsWith=$n.startsWith,J.subtract=ai.subtract,J.sum=ai.sum,J.sumBy=ai.sumBy,J.template=$n.template,J.times=Pn.times,J.toFinite=Pe.toFinite,J.toInteger=Je,J.toLength=Pe.toLength,J.toLower=$n.toLower,J.toNumber=Pe.toNumber,J.toSafeInteger=Pe.toSafeInteger,J.toString=Pe.toString,J.toUpper=$n.toUpper,J.trim=$n.trim,J.trimEnd=$n.trimEnd,J.trimStart=$n.trimStart,J.truncate=$n.truncate,J.unescape=$n.unescape,J.uniqueId=Pn.uniqueId,J.upperCase=$n.upperCase,J.upperFirst=$n.upperFirst,J.each=Ln.forEach,J.eachRight=Ln.forEachRight,J.first=ge.head,xg(J,(wg={},Vo(J,function(e,t){$6.call(J.prototype,t)||(wg[t]=e)}),wg),{chain:!1}),J.VERSION="4.17.21",(J.templateSettings=$n.templateSettings).imports._=J,Di(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){J[e].placeholder=J}),Di(["drop","take"],function(e,t){mn.prototype[e]=function(n){n=n===void 0?1:gW(Je(n),0);var r=this.__filtered__&&!t?new mn(this):this.clone();return r.__filtered__?r.__takeCount__=O6(n,r.__takeCount__):r.__views__.push({size:O6(n,C6),type:e+(r.__dir__<0?"Right":"")}),r},mn.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Di(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==1||n==3;mn.prototype[e]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:We(i),type:n}),o.__filtered__=o.__filtered__||r,o}}),Di(["head","last"],function(e,t){var n="take"+(t?"Right":"");mn.prototype[e]=function(){return this[n](1).value()[0]}}),Di(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");mn.prototype[e]=function(){return this.__filtered__?new mn(this):this[n](1)}}),mn.prototype.compact=function(){return this.filter(Qr)},mn.prototype.find=function(e){return this.filter(e).head()},mn.prototype.findLast=function(e){return this.reverse().find(e)},mn.prototype.invokeMap=sn(function(e,t){return typeof e=="function"?new mn(this):this.map(function(n){return cl(n,e,t)})}),mn.prototype.reject=function(e){return this.filter(Ru(We(e)))},mn.prototype.slice=function(e,t){e=Je(e);var n=this;return n.__filtered__&&(e>0||t<0)?new mn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==void 0&&(n=(t=Je(t))<0?n.dropRight(-t):n.take(t-e)),n)},mn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},mn.prototype.toArray=function(){return this.take(C6)},Vo(mn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=J[r?"take"+(t=="last"?"Right":""):t],o=r||/^find/.test(t);i&&(J.prototype[t]=function(){var a=this.__wrapped__,s=r?[1]:arguments,u=a instanceof mn,c=s[0],l=u||Ve(a),f=function(g){var y=i.apply(J,Ba([g],s));return r&&h?y[0]:y};l&&n&&typeof c=="function"&&c.length!=1&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,v=o&&!h,p=u&&!d;if(!o&&l){a=p?a:new mn(this);var m=e.apply(a,s);return m.__actions__.push({func:Iu,args:[f],thisArg:void 0}),new Ii(m,h)}return v&&p?e.apply(this,s):(m=this.thru(f),v?r?m.value()[0]:m.value():m)})}),Di(["pop","push","shift","sort","splice","unshift"],function(e){var t=mW[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);J.prototype[e]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ve(o)?o:[],i)}return this[n](function(a){return t.apply(Ve(a)?a:[],i)})}}),Vo(mn.prototype,function(e,t){var n=J[t];if(n){var r=n.name+"";$6.call(bu,r)||(bu[r]=[]),bu[r].push({name:t,func:n})}}),bu[qf(void 0,2).name]=[{name:"wrapper",func:void 0}],mn.prototype.clone=function(){var e=new mn(this.__wrapped__);return e.__actions__=vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vi(this.__views__),e},mn.prototype.reverse=function(){if(this.__filtered__){var e=new mn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},mn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ve(e),r=t<0,i=n?e.length:0,o=function(j,x,R){for(var M=-1,E=R.length;++M<E;){var N=R[M],A=N.size;switch(N.type){case"drop":j+=A;break;case"dropRight":x-=A;break;case"take":x=vW(x,j+A);break;case"takeRight":j=dW(j,x-A)}}return{start:j,end:x}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,d=pW(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return B$(e,this.__actions__);var v=[];t:for(;u--&&h<d;){for(var p=-1,m=e[c+=t];++p<f;){var g=l[p],y=g.iteratee,b=g.type,w=y(m);if(b==2)m=w;else if(!w){if(b==1)continue t;break t}}v[h++]=m}return v},J.prototype.at=qo.at,J.prototype.chain=qo.wrapperChain,J.prototype.commit=qo.commit,J.prototype.next=qo.next,J.prototype.plant=qo.plant,J.prototype.reverse=qo.reverse,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=qo.value,J.prototype.first=J.prototype.head,_6&&(J.prototype[_6]=qo.toIterator);var yW=Object.freeze({__proto__:null,add:H3,after:Q3,ary:Wp,assign:E4,assignIn:Uf,assignInWith:ju,assignWith:A4,at:R4,attempt:Qp,before:Yp,bind:Xp,bindAll:I4,bindKey:D4,camelCase:sS,capitalize:rm,castArray:uS,ceil:cS,chain:cm,chunk:lS,clamp:fS,clone:NS,cloneDeep:IS,cloneDeepWith:ym,cloneWith:DS,commit:bm,compact:LS,concat:BS,cond:QS,conforms:ZS,conformsTo:XS,constant:zf,countBy:nC,create:rC,curry:oh,curryRight:ah,debounce:Eu,deburr:am,default:J,defaultTo:iC,defaults:aC,defaultsDeep:uC,defer:lC,delay:fC,difference:hC,differenceBy:dC,differenceWith:vC,divide:pC,drop:mC,dropRight:gC,dropRightWhile:yC,dropWhile:bC,each:ch,eachRight:sl,endsWith:kC,entries:lh,entriesIn:fh,eq:Li,escape:Rm,escapeRegExp:$C,every:OC,extend:Uf,extendWith:ju,fill:MC,filter:AC,find:TC,findIndex:Im,findKey:NC,findLast:IC,findLastIndex:Dm,findLastKey:DC,first:Ar,flatMap:BC,flatMapDeep:zC,flatMapDepth:FC,flatten:Gp,flattenDeep:VC,flattenDepth:WC,flip:qC,floor:HC,flow:JC,flowRight:KC,forEach:ch,forEachRight:sl,forIn:GC,forInRight:QC,forOwn:YC,forOwnRight:ZC,fromPairs:XC,functions:t8,functionsIn:e8,get:Gf,groupBy:Pu,gt:n8,gte:r8,has:i8,hasIn:rh,head:Ar,identity:Qr,inRange:o8,includes:a8,indexOf:s8,initial:Ze,intersection:u8,intersectionBy:c8,intersectionWith:l8,invert:h8,invertBy:v8,invoke:m8,invokeMap:g8,isArguments:Da,isArray:Ve,isArrayBuffer:b8,isArrayLike:ri,isArrayLikeObject:mr,isBoolean:w8,isBuffer:ba,isDate:k8,isElement:j8,isEmpty:Ue,isEqual:rn,isEqualWith:S8,isError:Yf,isFinite:C8,isFunction:Lo,isInteger:Vm,isLength:Zc,isMap:mm,isMatch:$8,isMatchWith:_8,isNaN:O8,isNative:M8,isNil:E8,isNull:A8,isNumber:Wm,isObject:Kn,isObjectLike:cr,isPlainObject:Cu,isRegExp:vh,isSafeInteger:T8,isSet:gm,isString:ul,isSymbol:di,isTypedArray:Ms,isUndefined:R8,isWeakMap:N8,isWeakSet:I8,iteratee:D8,join:L8,kebabCase:B8,keyBy:z8,keys:$r,keysIn:oi,last:le,lastIndexOf:F8,lodash:J,lowerCase:V8,lowerFirst:W8,lt:q8,lte:H8,map:Au,mapKeys:U8,mapValues:Hm,matches:J8,matchesProperty:K8,max:G8,maxBy:Q8,mean:Z8,meanBy:X8,memoize:Su,merge:t5,mergeWith:Am,method:e5,methodOf:n5,min:r5,minBy:Tu,mixin:Jm,multiply:i5,negate:Ru,next:Qm,noop:Dn,now:ol,nth:a5,nthArg:s5,omit:u5,omitBy:l5,once:f5,orderBy:v5,over:p5,overArgs:m5,overEvery:g5,overSome:y5,pad:$5,padEnd:_5,padStart:O5,parseInt:M5,partial:ig,partialRight:E5,partition:ag,pick:A5,pickBy:Zm,plant:sg,property:$m,propertyOf:P5,pull:R5,pullAll:cg,pullAllBy:N5,pullAllWith:I5,pullAt:L5,random:B5,range:fg,rangeRight:F5,rearg:V5,reduce:q5,reduceRight:H5,reject:U5,remove:J5,repeat:K5,replace:G5,rest:Q5,result:Y5,reverse:gh,round:Z5,sample:t$,sampleSize:e$,set:n$,setWith:r$,shuffle:i$,size:o$,slice:a$,snakeCase:s$,some:u$,sortBy:hg,sortedIndex:c$,sortedIndexBy:l$,sortedIndexOf:f$,sortedLastIndex:h$,sortedLastIndexBy:d$,sortedLastIndexOf:v$,sortedUniq:m$,sortedUniqBy:g$,split:y$,spread:b$,startCase:w$,startsWith:x$,stubArray:Xf,stubFalse:Hf,stubObject:k$,stubString:j$,stubTrue:S$,subtract:C$,sum:$$,sumBy:_$,tail:O$,take:M$,takeRight:E$,takeRightWhile:A$,takeWhile:P$,tap:T$,template:L$,templateSettings:wh,throttle:vg,thru:Iu,times:mg,toArray:Gm,toFinite:Do,toInteger:Je,toIterator:gg,toJSON:Is,toLength:Nm,toLower:z$,toNumber:ji,toPairs:lh,toPairsIn:fh,toPath:F$,toPlainObject:Em,toSafeInteger:V$,toString:Cn,toUpper:W$,transform:q$,trim:J$,trimEnd:K$,trimStart:G$,truncate:Q$,unary:Y$,unescape:X$,union:t6,unionBy:e6,unionWith:n6,uniq:r6,uniqBy:i6,uniqWith:o6,uniqueId:qa,unset:a6,unzip:kh,unzipWith:yg,update:u6,updateWith:c6,upperCase:l6,upperFirst:Zf,value:Is,valueOf:Is,values:Ns,valuesIn:f6,without:h6,words:sm,wrap:d6,wrapperAt:v6,wrapperChain:p6,wrapperCommit:bm,wrapperLodash:J,wrapperNext:Qm,wrapperPlant:sg,wrapperReverse:m6,wrapperToIterator:gg,wrapperValue:Is,xor:g6,xorBy:y6,xorWith:b6,zip:w6,zipObject:k6,zipObjectDeep:j6,zipWith:S6}),bW=1e4,wW=[];function kg(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n={};if(!Array.isArray(e))throw new TypeError("Array expected");function r(a,s){(!Array.isArray(a)&&!In(a)||t&&s.length>0)&&(n[Qt(s)]=!0),In(a)&&Object.keys(a).forEach(function(u){r(a[u],s.concat(u))})}for(var i=Math.min(e.length,bW),o=0;o<i;o++)r(e[o],wW);return Object.keys(n).sort().map(ao)}function M6(e,t,n){if(!(t<=e))for(var r=e;r<t;r++)n(r)}function jh(e,t){return e.length>t?e.slice(0,t):e}function E6(e){return dt({},e)}function A6(e){return Object.values(e)}function P6(e,t,n,r){var i=e.slice(0),o=i.splice(t,n);return i.splice.apply(i,[t+r,0].concat(Oe(o))),i}function jg(e,t){try{return t.parse(e)}catch(n){return t.parse(Io(e))}}function T6(e,t){try{return jg(e,t)}catch(n){return}}function Sh(e,t){e=e.replace(N6,"");try{return t(e)}catch(n){}try{return t("["+e+"]")}catch(n){}try{return t("{"+e+"}")}catch(n){}throw new Error("Failed to parse partial JSON")}function R6(e){e=e.replace(N6,"");try{return Io(e)}catch(r){}try{var t=Io("["+e+"]");return t.substring(1,t.length-1)}catch(r){}try{var n=Io("{"+e+"}");return n.substring(1,n.length-1)}catch(r){}throw new Error("Failed to repair partial JSON")}var N6=/,\s*$/;function Du(e,t){var n=L6.exec(t);if(n){var r=Cr(n[2]),i=function(d,v){for(var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d.length,g=0,y=p;y<m;y++)d.charAt(y)===v&&g++;return g}(e,`
|
|
`,0,r),o=r-e.lastIndexOf(`
|
|
`,r)-1;return{position:r,line:i,column:o,message:t.replace(L6,function(){return"line ".concat(i+1," column ").concat(o+1)})}}var a=jW.exec(t),s=a?Cr(a[1]):null,u=s!==null?s-1:null,c=SW.exec(t),l=c?Cr(c[1]):null,f=l!==null?l-1:null,h=u!==null&&f!==null?function(d,v,p){for(var m=d.indexOf(`
|
|
`),g=1;g<v&&m!==-1;)m=d.indexOf(`
|
|
`,m+1),g++;return m!==-1?m+p+1:null}(e,u,f):null;return{position:h,line:u,column:f,message:t.replace(/^JSON.parse: /,"").replace(/ of the JSON data$/,"")}}function Sg(e){return In(e)?e.json!==void 0?e.text!==void 0?'Content must contain either a property "json" or a property "text" but not both':null:e.text===void 0?'Content must contain either a property "json" or a property "text"':typeof e.text!="string"?'Content "text" property must be a string containing a JSON document. Did you mean to use the "json" property instead?':null:"Content must be an object"}function Irt(e){return In(e)&&(e.json!==void 0||typeof e.text=="string")}function Lu(e){return In(e)&&typeof e.text=="string"}function Cg(e){return In(e)&&e.json!==void 0&&!Lu(e)}function xW(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:JSON;return Lu(e)?e:{text:n.stringify(e.json,null,t)}}function I6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:JSON;return Cg(e)?e:{json:t.parse(e.text)}}function Ch(e,t,n){return xW(e,t,n).text}function D6(e,t){return kW(e,t)>t}function kW(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0;if(Lu(e))return e.text.length;var n=e.json,r=0;return function i(o){if(Array.isArray(o)){if((r+=o.length-1+2)>t)return r;for(var a=0;a<o.length;a++)if(i(o[a]),r>t)return r}else if(In(o)){var s=Object.keys(o);r+=2+s.length+(s.length-1);for(var u=0;u<s.length;u++){var c=s[u],l=o[c];r+=c.length+2,i(l)}}else r+=typeof o=="string"?o.length+2:String(o).length}(n),r}var L6=/(position|char) (\d+)/,jW=/line (\d+)/,SW=/column (\d+)/;function B6(e,t){return e.parse===t.parse&&e.stringify===t.stringify}function z6(e){return CW.test(e)&&e.length>2}var CW=/^[[{]\S/;function $g(e){var t=e.escapeControlCharacters,n=e.escapeUnicodeCharacters;return t?n?$W:_W:n?OW:MW}var $W={escapeValue:function(e){return F6(q6(String(e)))},unescapeValue:function(e){return H6(V6(e))}},_W={escapeValue:function(e){return q6(String(e))},unescapeValue:function(e){return H6(e)}},OW={escapeValue:function(e){return F6(String(e))},unescapeValue:function(e){return V6(e)}},MW={escapeValue:function(e){return String(e)},unescapeValue:function(e){return e}};function F6(e){return e.replace(/[^\x20-\x7F]/g,function(t){var n;return t==="\b"||t==="\f"||t===`
|
|
`||t==="\r"||t===" "?t:"\\u"+("000"+((n=t.codePointAt(0))===null||n===void 0?void 0:n.toString(16))).slice(-4)})}function V6(e){return e.replace(/\\u[a-fA-F0-9]{4}/g,function(t){try{var n=JSON.parse('"'+t+'"');return W6[n]||n}catch(r){return t}})}var W6={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},EW={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
`,"\\r":"\r","\\t":" "};function q6(e){return e.replace(/["\b\f\n\r\t\\]/g,function(t){return W6[t]||t})}function H6(e){return e.replace(/\\["bfnrt\\]/g,function(t){return EW[t]||t})}function Ds(e){return typeof e!="string"?String(e):e.endsWith(`
|
|
`)?e+`
|
|
`:e}function U6(e,t){return fl(e,function(n){return n.nodeName.toUpperCase()===t.toUpperCase()})}function Ls(e,t,n){return fl(e,function(r){return function(i,o,a){return typeof i.getAttribute=="function"&&i.getAttribute(o)===a}(r,t,n)})}function fl(e,t){return!!_g(e,t)}function _g(e,t){for(var n=e;n&&!t(n);)n=n.parentNode;return n||void 0}function J6(e){if(e.firstChild!=null){var t=document.createRange(),n=window.getSelection();t.setStart(e,1),t.collapse(!0),n==null||n.removeAllRanges(),n==null||n.addRange(t)}else e.focus()}function $h(e,t,n){var r=Bu(e);if(r){var i=r.document.activeElement?r.document.activeElement:null;i&&i.isContentEditable&&(i.textContent=n?t:i.textContent+t,J6(i))}}function Bu(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:null}function _h(e){var t=Bu(e),n=t==null?void 0:t.document.activeElement;return!!n&&fl(n,function(r){return r===e})}function K6(e,t){return _g(e,function(n){return n.nodeName===t})}function Og(e){return Ls(e,"data-type","selectable-key")?En.key:Ls(e,"data-type","selectable-value")?En.value:Ls(e,"data-type","insert-selection-area-inside")?En.inside:Ls(e,"data-type","insert-selection-area-after")?En.after:En.multi}function zu(e){return encodeURIComponent(Qt(e))}function G6(e){var t=_g(e,function(r){return!(r==null||!r.hasAttribute)&&r.hasAttribute("data-path")}),n=t==null?void 0:t.getAttribute("data-path");return n?ao(decodeURIComponent(n)):null}function AW(e){var t=e.allElements,n=e.currentElement,r=e.direction,i=e.hasPrio,o=i===void 0?function(){return!0}:i,a=e.margin,s=a===void 0?10:a,u=Au(t.filter(function(y){var b=y.getBoundingClientRect();return b.width>0&&b.height>0}),l),c=l(n);function l(y){var b=y.getBoundingClientRect();return{x:b.left+b.width/2,y:b.top+b.height/2,rect:b,element:y}}function f(y,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=y.x-b.x,x=(y.y-b.y)*w;return Math.sqrt(j*j+x*x)}var h=function(y){return f(y,c)};if(r==="Left"||r==="Right"){var d=r==="Left"?u.filter(function(y){return function(b,w){return b.rect.left+s<w.rect.left}(y,c)}):u.filter(function(y){return function(b,w){return b.rect.right>w.rect.right+s}(y,c)}),v=d.filter(function(y){return function(b,w){return Math.abs(b.y-w.y)<s}(y,c)}),p=Tu(v,h)||Tu(d,function(y){return f(y,c,10)});return p==null?void 0:p.element}if(r==="Up"||r==="Down"){var m=r==="Up"?u.filter(function(y){return function(b,w){return b.y+s<w.y}(y,c)}):u.filter(function(y){return function(b,w){return b.y>w.y+s}(y,c)}),g=Tu(m.filter(function(y){return o(y.element)}),h)||Tu(m,h);return g==null?void 0:g.element}}function Ha(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"+",n=[];e.ctrlKey&&n.push("Ctrl"),e.metaKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift");var r=e.key.length===1?e.key.toUpperCase():e.key;return r in PW||n.push(r),n.join(t)}var PW={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},Mg=Zv.window;function TW(e){Ae(e,"svelte-1r8q3m8",".jse-absolute-popup.svelte-1r8q3m8.svelte-1r8q3m8{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input.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.svelte-1r8q3m8{position:absolute}")}function Q6(e){var t,n,r,i,o,a,s=[e[0].props],u=e[0].component;function c(l){for(var f={},h=0;h<s.length;h+=1)f=hi(f,s[h]);return{props:f}}return u&&(i=Ro(u,c())),{c:function(){t=G("div"),n=G("input"),r=vt(),i&&jt(i.$$.fragment),C(n,"type","text"),n.readOnly=!0,C(n,"tabindex","-1"),C(n,"class","jse-hidden-input svelte-1r8q3m8"),C(t,"class","jse-absolute-popup-content svelte-1r8q3m8"),C(t,"style",o=Y6(e[1],e[0].options))},m:function(l,f){ot(l,t,f),F(t,n),e[7](n),F(t,r),i&&xt(i,t,null),a=!0},p:function(l,f){var h=1&f?ha(s,[zc(l[0].props)]):{};if(1&f&&u!==(u=l[0].component)){if(i){Dt();var d=i;z(d.$$.fragment,1,0,function(){kt(d,1)}),Lt()}u?(jt((i=Ro(u,c())).$$.fragment),T(i.$$.fragment,1),xt(i,t,null)):i=null}else u&&i.$set(h);(!a||3&f&&o!==(o=Y6(l[1],l[0].options)))&&C(t,"style",o)},i:function(l){a||(i&&T(i.$$.fragment,l),a=!0)},o:function(l){i&&z(i.$$.fragment,l),a=!1},d:function(l){l&&it(t),e[7](null),i&&kt(i)}}}function RW(e){var t,n,r,i,o=e[1]&&Q6(e);return{c:function(){t=G("div"),o&&o.c(),C(t,"class","jse-absolute-popup svelte-1r8q3m8")},m:function(a,s){ot(a,t,s),o&&o.m(t,null),e[8](t),n=!0,r||(i=[Nt(Mg,"mousedown",e[3],!0),Nt(Mg,"keydown",e[4],!0),Nt(Mg,"wheel",e[5],!0),Nt(t,"mousedown",NW),Nt(t,"keydown",e[4])],r=!0)},p:function(a,s){var u=ke(s,1)[0];a[1]?o?(o.p(a,u),2&u&&T(o,1)):((o=Q6(a)).c(),T(o,1),o.m(t,null)):o&&(Dt(),z(o,1,1,function(){o=null}),Lt())},i:function(a){n||(T(o),n=!0)},o:function(a){z(o),n=!1},d:function(a){a&&it(t),o&&o.d(),e[8](null),r=!1,Mn(i)}}}function NW(e){e.stopPropagation()}function Y6(e,t){var n=e.getBoundingClientRect(),r=function(){if(t.anchor){var u=t.anchor,c=t.width,l=c===void 0?0:c,f=t.height,h=f===void 0?0:f,d=t.offsetTop,v=d===void 0?0:d,p=t.offsetLeft,m=p===void 0?0:p,g=t.position,y=u.getBoundingClientRect(),b=y.left,w=y.top,j=y.bottom,x=y.right,R=g==="top"||w+h>window.innerHeight&&w>h,M=g==="left"||b+l>window.innerWidth&&b>l;return{left:M?x-m:b+m,top:R?w-v:j+v,positionAbove:R,positionLeft:M}}if(typeof t.left=="number"&&typeof t.top=="number"){var E=t.left,N=t.top,A=t.width,L=A===void 0?0:A,W=t.height,O=W===void 0?0:W;return{left:E,top:N,positionAbove:N+O>window.innerHeight&&N>O,positionLeft:E+L>window.innerWidth&&E>L}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),i=r.left,o=r.top,a=r.positionAbove,s=r.positionLeft;return(a?"bottom: ".concat(n.top-o,"px;"):"top: ".concat(o-n.top,"px;"))+(s?"right: ".concat(n.left-i,"px;"):"left: ".concat(i-n.left,"px;"))}function IW(e,t,n){var r,i,o=t.popup,a=t.closeAbsolutePopup;function s(u){o.options&&o.options.closeOnOuterClick&&!fl(u.target,function(c){return c===r})&&a(o.id)}return Ti(function(){i&&i.focus()}),e.$$set=function(u){"popup"in u&&n(0,o=u.popup),"closeAbsolutePopup"in u&&n(6,a=u.closeAbsolutePopup)},[o,r,i,function(u){s(u)},function(u){Ha(u)==="Escape"&&a(o.id)},function(u){s(u)},a,function(u){He[u?"unshift":"push"](function(){n(2,i=u)})},function(u){He[u?"unshift":"push"](function(){n(1,r=u)})}]}var DW=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,IW,RW,Sr,{popup:0,closeAbsolutePopup:6},TW),i}return tt(n)}();function Z6(e,t,n){var r=e.slice();return r[6]=t[n],r}function X6(e){var t,n;return t=new DW({props:{popup:e[6],closeAbsolutePopup:e[1]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.popup=r[6]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function LW(e){for(var t,n,r=e[0],i=[],o=0;o<r.length;o+=1)i[o]=X6(Z6(e,r,o));var a=function(c){return z(i[c],1,1,function(){i[c]=null})},s=e[3].default,u=Zn(s,e,e[2],null);return{c:function(){for(var c=0;c<i.length;c+=1)i[c].c();t=vt(),u&&u.c()},m:function(c,l){for(var f=0;f<i.length;f+=1)i[f]&&i[f].m(c,l);ot(c,t,l),u&&u.m(c,l),n=!0},p:function(c,l){var f=ke(l,1)[0];if(3&f){var h;for(r=c[0],h=0;h<r.length;h+=1){var d=Z6(c,r,h);i[h]?(i[h].p(d,f),T(i[h],1)):(i[h]=X6(d),i[h].c(),T(i[h],1),i[h].m(t.parentNode,t))}for(Dt(),h=r.length;h<i.length;h+=1)a(h);Lt()}u&&u.p&&(!n||4&f)&&tr(u,s,c,c[2],n?Xn(s,c[2],f,null):er(c[2]),null)},i:function(c){if(!n){for(var l=0;l<r.length;l+=1)T(i[l]);T(u,c),n=!0}},o:function(c){i=i.filter(Boolean);for(var l=0;l<i.length;l+=1)z(i[l]);z(u,c),n=!1},d:function(c){ur(i,c),c&&it(t),u&&u.d(c)}}}function BW(e,t,n){var r=t.$$slots,i=r===void 0?{}:r,o=t.$$scope,a=Dr("jsoneditor:AbsolutePopup"),s=[];function u(c){var l=s.findIndex(function(h){return h.id===c});if(l!==-1){var f=s[l];f.options.onClose&&f.options.onClose(),n(0,s=s.filter(function(h){return h.id!==c}))}}return n3("absolute-popup",{openAbsolutePopup:function(c,l,f){a("open...",l,f);var h={id:Wc(),component:c,props:l||{},options:f||{}};return n(0,s=[].concat(Oe(s),[h])),h.id},closeAbsolutePopup:u}),e.$$set=function(c){"$$scope"in c&&n(2,o=c.$$scope)},e.$$.update=function(){1&e.$$.dirty&&a("popups",s)},[s,u,o,i]}var t_=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,BW,LW,Be,{}),i}return tt(n)}();function pi(e){return e.map(function(t,n){return Oh.test(t)?"["+t+"]":/[.[\]]/.test(t)||t===""?'["'+(t.replace(/"/g,'\\"')+'"]'):(n>0?".":"")+t}).join("")}function zW(e){for(var t=[],n=0;n<e.length;)e[n]==="."&&n++,e[n]==="["?(n++,e[n]==='"'?(n++,t.push(r(function(o){return o==='"'},!0)),i('"')):t.push(r(function(o){return o==="]"})),i("]")):t.push(r(function(o){return o==="."||o==="["}));function r(o){for(var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s="";n<e.length&&!o(e[n]);)a&&e[n]==="\\"&&e[n+1]==='"'?(s+='"',n+=2):(s+=e[n],n++);return s}function i(o){if(e[n]!==o)throw new SyntaxError("Invalid JSON path: ".concat(o," expected at position ").concat(n));n++}return t}function hl(e){return{value:e,label:Ue(e)?"(whole item)":pi(e)}}function FW(e){if(Oh.test(e))return"["+e+"]";if(Eg.test(e))return"."+e;var t=JSON.stringify(e);return"['"+t.substring(1,t.length-1).replace(/\\"/g,'"')+"']"}function Ho(e){return e.map(function(t){return Oh.test(t)?"?.[".concat(t,"]"):Eg.test(t)?"?.".concat(t):"?.[".concat(JSON.stringify(t),"]")}).join("")}var Eg=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,Oh=/^\d+$/;function dl(e,t){for(var n=new Set(t),r=e.replace(/ \(copy( \d+)?\)$/,""),i=e,o=1;n.has(i);){var a="copy"+(o>1?" "+o:"");i="".concat(r," (").concat(a,")"),o++}return i}function Uo(e,t){var n=t-3;return e.length>t?e.substring(0,n)+"...":e}function Ag(e){if(e==="")return"";var t=e.toLowerCase();if(t==="null")return null;if(t==="true")return!0;if(t==="false")return!1;if(t!=="undefined"){var n=Number(e),r=parseFloat(e);return isNaN(n)||isNaN(r)?e:n}}var VW={id:"javascript",name:"JavaScript",description:`
|
|
<p>
|
|
Enter a JavaScript function to filter, sort, or transform the data.
|
|
</p>
|
|
`,createQuery:function(e,t){var n=t.filter,r=t.sort,i=t.projection,o=[` return data
|
|
`];if(n&&n.path&&n.relation&&n.value){var a="item => item".concat(Ho(n.path)),s=Ag(n.value),u=typeof s=="string"?"'".concat(n.value,"'"):L3(n.value)&&!Number.isSafeInteger(s)?"".concat(n.value,"n"):n.value;o.push(" .filter(".concat(a," ").concat(n.relation," ").concat(u,`)
|
|
`))}if(r&&r.path&&r.direction&&(r.direction==="desc"?o.push(` .slice()
|
|
.sort((a, b) => {
|
|
// sort descending
|
|
`+" const valueA = a".concat(Ho(r.path),`
|
|
`)+" const valueB = b".concat(Ho(r.path),`
|
|
`)+` return valueA > valueB ? -1 : valueA < valueB ? 1 : 0
|
|
})
|
|
`):o.push(` .slice()
|
|
.sort((a, b) => {
|
|
// sort ascending
|
|
`+" const valueA = a".concat(Ho(r.path),`
|
|
`)+" const valueB = b".concat(Ho(r.path),`
|
|
`)+` return valueA > valueB ? 1 : valueA < valueB ? -1 : 0
|
|
})
|
|
`)),i&&i.paths)if(i.paths.length>1){var c=i.paths.map(function(f){var h=f[f.length-1]||"item",d="item".concat(Ho(f));return" ".concat(JSON.stringify(h),": ").concat(d)});o.push(` .map(item => ({
|
|
`.concat(c.join(`,
|
|
`),`})
|
|
)
|
|
`))}else{var l="item".concat(Ho(i.paths[0]));o.push(" .map(item => ".concat(l,`)
|
|
`))}return`function query (data) {
|
|
`.concat(o.join(""),"}")},executeQuery:function(e,t){var n=new Function(`"use strict";
|
|
|
|
`+t+`
|
|
|
|
if (typeof query !== "function") {
|
|
throw new Error("Cannot execute query: expecting a function named 'query' but is undefined")
|
|
}
|
|
|
|
return query;
|
|
`)()(e);return n!==void 0?n:null}},WW={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.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H109c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 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.4l0 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.5H226.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 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-80V416H272v16c0 44.2-35.8 80-80 80z"]},vl={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V96c0-8.8-7.2-16-16-16H64zM0 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-64V96zM337 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"]},pl={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 80c8.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-16 16-16H384zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"]},qW={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 120V256c0 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.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};function HW(e){var t;return{c:function(){t=To("g")},m:function(n,r){ot(n,t,r),t.innerHTML=e[0]},p:function(n,r){1&ke(r,1)[0]&&(t.innerHTML=n[0])},i:It,o:It,d:function(n){n&&it(t)}}}function UW(e,t,n){var r=870711,i="",o=t.data;function a(s){if(!s||!s.raw)return"";var u=s.raw,c={};return u=u.replace(/\s(?:xml:)?id=["']?([^"')\s]+)/g,function(l,f){var h="fa-".concat((r+=1).toString(16));return c[f]=h,' id="'.concat(h,'"')}),u=u.replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,function(l,f,h,d){var v=f||d;return v&&c[v]?"#".concat(c[v]):l}),u}return e.$$set=function(s){"data"in s&&n(1,o=s.data)},e.$$.update=function(){2&e.$$.dirty&&n(0,i=a(o))},[i,o]}var JW=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,UW,HW,Sr,{data:1}),i}return tt(n)}();function KW(e){Ae(e,"svelte-1mc5hvj",".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)}}")}function GW(e){for(var t,n,r,i,o=e[12].default,a=Zn(o,e,e[11],null),s=[{version:"1.1"},{class:n="fa-icon "+e[0]},{width:e[1]},{height:e[2]},{"aria-label":e[9]},{role:r=e[9]?"img":"presentation"},{viewBox:e[3]},{style:e[8]},e[10]],u={},c=0;c<s.length;c+=1)u=hi(u,s[c]);return{c:function(){t=To("svg"),a&&a.c(),cu(t,u),At(t,"fa-spin",e[4]),At(t,"fa-pulse",e[6]),At(t,"fa-inverse",e[5]),At(t,"fa-flip-horizontal",e[7]==="horizontal"),At(t,"fa-flip-vertical",e[7]==="vertical"),At(t,"svelte-1mc5hvj",!0)},m:function(l,f){ot(l,t,f),a&&a.m(t,null),i=!0},p:function(l,f){var h=ke(f,1)[0];a&&a.p&&(!i||2048&h)&&tr(a,o,l,l[11],i?Xn(o,l[11],h,null):er(l[11]),null),cu(t,u=ha(s,[{version:"1.1"},(!i||1&h&&n!==(n="fa-icon "+l[0]))&&{class:n},(!i||2&h)&&{width:l[1]},(!i||4&h)&&{height:l[2]},(!i||512&h)&&{"aria-label":l[9]},(!i||512&h&&r!==(r=l[9]?"img":"presentation"))&&{role:r},(!i||8&h)&&{viewBox:l[3]},(!i||256&h)&&{style:l[8]},1024&h&&l[10]])),At(t,"fa-spin",l[4]),At(t,"fa-pulse",l[6]),At(t,"fa-inverse",l[5]),At(t,"fa-flip-horizontal",l[7]==="horizontal"),At(t,"fa-flip-vertical",l[7]==="vertical"),At(t,"svelte-1mc5hvj",!0)},i:function(l){i||(T(a,l),i=!0)},o:function(l){z(a,l),i=!1},d:function(l){l&&it(t),a&&a.d(l)}}}function QW(e,t,n){var r=["class","width","height","box","spin","inverse","pulse","flip","style","label"],i=gf(t,r),o=t,a=o.$$slots,s=a===void 0?{}:a,u=o.$$scope,c=t.class,l=c===void 0?"":c,f=t.width,h=t.height,d=t.box,v=d===void 0?"0 0 0 0":d,p=t.spin,m=p!==void 0&&p,g=t.inverse,y=g!==void 0&&g,b=t.pulse,w=b!==void 0&&b,j=t.flip,x=j===void 0?"none":j,R=t.style,M=R===void 0?"":R,E=t.label,N=E===void 0?"":E;return e.$$set=function(A){t=hi(hi({},t),Jj(A)),n(10,i=gf(t,r)),"class"in A&&n(0,l=A.class),"width"in A&&n(1,f=A.width),"height"in A&&n(2,h=A.height),"box"in A&&n(3,v=A.box),"spin"in A&&n(4,m=A.spin),"inverse"in A&&n(5,y=A.inverse),"pulse"in A&&n(6,w=A.pulse),"flip"in A&&n(7,x=A.flip),"style"in A&&n(8,M=A.style),"label"in A&&n(9,N=A.label),"$$scope"in A&&n(11,u=A.$$scope)},[l,f,h,v,m,y,w,x,M,N,i,u,s]}var YW=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,QW,GW,Sr,{class:0,width:1,height:2,box:3,spin:4,inverse:5,pulse:6,flip:7,style:8,label:9},KW),i}return tt(n)}();function e_(e,t,n){var r=e.slice();return r[24]=t[n],r}function n_(e,t,n){var r=e.slice();return r[27]=t[n],r}function r_(e){var t,n,r,i,o=e[6].paths&&i_(e),a=e[6].polygons&&a_(e),s=e[6].raw&&u_(e);return{c:function(){o&&o.c(),t=vt(),a&&a.c(),n=vt(),s&&s.c(),r=vn()},m:function(u,c){o&&o.m(u,c),ot(u,t,c),a&&a.m(u,c),ot(u,n,c),s&&s.m(u,c),ot(u,r,c),i=!0},p:function(u,c){u[6].paths?o?o.p(u,c):((o=i_(u)).c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null),u[6].polygons?a?a.p(u,c):((a=a_(u)).c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null),u[6].raw?s?(s.p(u,c),64&c&&T(s,1)):((s=u_(u)).c(),T(s,1),s.m(r.parentNode,r)):s&&(Dt(),z(s,1,1,function(){s=null}),Lt())},i:function(u){i||(T(s),i=!0)},o:function(u){z(s),i=!1},d:function(u){o&&o.d(u),u&&it(t),a&&a.d(u),u&&it(n),s&&s.d(u),u&&it(r)}}}function i_(e){for(var t,n=e[6].paths,r=[],i=0;i<n.length;i+=1)r[i]=o_(n_(e,n,i));return{c:function(){for(var o=0;o<r.length;o+=1)r[o].c();t=vn()},m:function(o,a){for(var s=0;s<r.length;s+=1)r[s]&&r[s].m(o,a);ot(o,t,a)},p:function(o,a){if(64&a){var s;for(n=o[6].paths,s=0;s<n.length;s+=1){var u=n_(o,n,s);r[s]?r[s].p(u,a):(r[s]=o_(u),r[s].c(),r[s].m(t.parentNode,t))}for(;s<r.length;s+=1)r[s].d(1);r.length=n.length}},d:function(o){ur(r,o),o&&it(t)}}}function o_(e){for(var t,n=[e[27]],r={},i=0;i<n.length;i+=1)r=hi(r,n[i]);return{c:function(){cu(t=To("path"),r)},m:function(o,a){ot(o,t,a)},p:function(o,a){cu(t,r=ha(n,[64&a&&o[27]]))},d:function(o){o&&it(t)}}}function a_(e){for(var t,n=e[6].polygons,r=[],i=0;i<n.length;i+=1)r[i]=s_(e_(e,n,i));return{c:function(){for(var o=0;o<r.length;o+=1)r[o].c();t=vn()},m:function(o,a){for(var s=0;s<r.length;s+=1)r[s]&&r[s].m(o,a);ot(o,t,a)},p:function(o,a){if(64&a){var s;for(n=o[6].polygons,s=0;s<n.length;s+=1){var u=e_(o,n,s);r[s]?r[s].p(u,a):(r[s]=s_(u),r[s].c(),r[s].m(t.parentNode,t))}for(;s<r.length;s+=1)r[s].d(1);r.length=n.length}},d:function(o){ur(r,o),o&&it(t)}}}function s_(e){for(var t,n=[e[24]],r={},i=0;i<n.length;i+=1)r=hi(r,n[i]);return{c:function(){cu(t=To("polygon"),r)},m:function(o,a){ot(o,t,a)},p:function(o,a){cu(t,r=ha(n,[64&a&&o[24]]))},d:function(o){o&&it(t)}}}function u_(e){var t,n,r;function i(a){e[16](a)}var o={};return e[6]!==void 0&&(o.data=e[6]),t=new JW({props:o}),He.push(function(){return no(t,"data",i)}),{c:function(){jt(t.$$.fragment)},m:function(a,s){xt(t,a,s),r=!0},p:function(a,s){var u={};!n&&64&s&&(n=!0,u.data=a[6],eo(function(){return n=!1})),t.$set(u)},i:function(a){r||(T(t.$$.fragment,a),r=!0)},o:function(a){z(t.$$.fragment,a),r=!1},d:function(a){kt(t,a)}}}function ZW(e){var t,n=e[15].default,r=Zn(n,e,e[17],null),i=r||function(o){var a,s,u=o[6]&&r_(o);return{c:function(){u&&u.c(),a=vn()},m:function(c,l){u&&u.m(c,l),ot(c,a,l),s=!0},p:function(c,l){c[6]?u?(u.p(c,l),64&l&&T(u,1)):((u=r_(c)).c(),T(u,1),u.m(a.parentNode,a)):u&&(Dt(),z(u,1,1,function(){u=null}),Lt())},i:function(c){s||(T(u),s=!0)},o:function(c){z(u),s=!1},d:function(c){u&&u.d(c),c&&it(a)}}}(e);return{c:function(){i&&i.c()},m:function(o,a){i&&i.m(o,a),t=!0},p:function(o,a){r?r.p&&(!t||131072&a)&&tr(r,n,o,o[17],t?Xn(n,o[17],a,null):er(o[17]),null):i&&i.p&&(!t||64&a)&&i.p(o,t?a:-1)},i:function(o){t||(T(i,o),t=!0)},o:function(o){z(i,o),t=!1},d:function(o){i&&i.d(o)}}}function XW(e){for(var t,n,r=[{label:e[5]},{width:e[7]},{height:e[8]},{box:e[10]},{style:e[9]},{spin:e[1]},{flip:e[4]},{inverse:e[2]},{pulse:e[3]},{class:e[0]},e[11]],i={$$slots:{default:[ZW]},$$scope:{ctx:e}},o=0;o<r.length;o+=1)i=hi(i,r[o]);return t=new YW({props:i}),{c:function(){jt(t.$$.fragment)},m:function(a,s){xt(t,a,s),n=!0},p:function(a,s){var u=ke(s,1)[0],c=4031&u?ha(r,[32&u&&{label:a[5]},128&u&&{width:a[7]},256&u&&{height:a[8]},1024&u&&{box:a[10]},512&u&&{style:a[9]},2&u&&{spin:a[1]},16&u&&{flip:a[4]},4&u&&{inverse:a[2]},8&u&&{pulse:a[3]},1&u&&{class:a[0]},2048&u&&zc(a[11])]):{};131136&u&&(c.$$scope={dirty:u,ctx:a}),t.$set(c)},i:function(a){n||(T(t.$$.fragment,a),n=!0)},o:function(a){z(t.$$.fragment,a),n=!1},d:function(a){kt(t,a)}}}function tq(e,t,n){var r,i,o,a=["class","data","scale","spin","inverse","pulse","flip","label","style"],s=gf(t,a),u=t,c=u.$$slots,l=c===void 0?{}:c,f=u.$$scope,h=t.class,d=h===void 0?"":h,v=t.data,p=t.scale,m=p===void 0?1:p,g=t.spin,y=g!==void 0&&g,b=t.inverse,w=b!==void 0&&b,j=t.pulse,x=j!==void 0&&j,R=t.flip,M=R===void 0?void 0:R,E=t.label,N=E===void 0?"":E,A=t.style,L=A===void 0?"":A,W=10,O=10;function I(){var P=1;return m!==void 0&&(P=Number(m)),isNaN(P)||P<=0?(console.warn('Invalid prop: prop "scale" should be a number over 0.'),1):1*P}function q(){return r?Math.max(r.width,r.height)/16:1}return e.$$set=function(P){t=hi(hi({},t),Jj(P)),n(11,s=gf(t,a)),"class"in P&&n(0,d=P.class),"data"in P&&n(12,v=P.data),"scale"in P&&n(13,m=P.scale),"spin"in P&&n(1,y=P.spin),"inverse"in P&&n(2,w=P.inverse),"pulse"in P&&n(3,x=P.pulse),"flip"in P&&n(4,M=P.flip),"label"in P&&n(5,N=P.label),"style"in P&&n(14,L=P.style),"$$scope"in P&&n(17,f=P.$$scope)},e.$$.update=function(){28672&e.$$.dirty&&(n(6,r=function(P){var _;if(P){if(!("definition"in P)){if("iconName"in P&&"icon"in P){P.iconName;var S=ke(P.icon,5),$=S[0],D=S[1],B=S[4];_={width:$,height:D,paths:(Array.isArray(B)?B:[B]).map(function(k){return{d:k}})}}else _=P[Object.keys(P)[0]];return _}console.error("`import faIconName from '@fortawesome/package-name/faIconName` not supported - Please use `import { faIconName } from '@fortawesome/package-name/faIconName'` instead")}}(v)),n(7,W=r?r.width/q()*I():0),n(8,O=r?r.height/q()*I():0),n(9,i=function(){var P="";L!==null&&(P+=L);var _=I();return _===1?P.length===0?"":P:(P===""||P.endsWith(";")||(P+="; "),"".concat(P,"font-size: ").concat(_,"em"))}()),n(10,o=r?"0 0 ".concat(r.width," ").concat(r.height):"0 0 ".concat(W," ").concat(O)))},[d,y,w,x,M,N,r,W,O,i,o,s,v,m,L,l,function(P){n(6,r=P),n(12,v),n(14,L),n(13,m)},f]}var on=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,tq,XW,Sr,{class:0,data:12,scale:13,spin:1,inverse:2,pulse:3,flip:4,label:5,style:14}),i}return tt(n)}();function eq(e){Ae(e,"svelte-1vj58yv",".jse-boolean-toggle.svelte-1vj58yv{padding:0;margin:1px 0 0;vertical-align:top;display:inline-flex;color:var(--jse-value-color-boolean)}.jse-boolean-toggle.svelte-1vj58yv:not(.jse-readonly){cursor:pointer}")}function nq(e){var t,n,r,i,o,a;return n=new on({props:{data:e[0]===!0?vl:pl}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-boolean-toggle svelte-1vj58yv"),C(t,"title",r=e[1]?"Boolean value ".concat(e[0]):"Click to toggle this boolean value"),At(t,"jse-readonly",e[1])},m:function(s,u){ot(s,t,u),xt(n,t,null),i=!0,o||(a=Nt(t,"mousedown",e[2]),o=!0)},p:function(s,u){var c=ke(u,1)[0],l={};1&c&&(l.data=s[0]===!0?vl:pl),n.$set(l),(!i||3&c&&r!==(r=s[1]?"Boolean value ".concat(s[0]):"Click to toggle this boolean value"))&&C(t,"title",r),(!i||2&c)&&At(t,"jse-readonly",s[1])},i:function(s){i||(T(n.$$.fragment,s),i=!0)},o:function(s){z(n.$$.fragment,s),i=!1},d:function(s){s&&it(t),kt(n),o=!1,a()}}}function rq(e,t,n){var r=t.path,i=t.value,o=t.readOnly,a=t.onPatch,s=t.focus;return e.$$set=function(u){"path"in u&&n(3,r=u.path),"value"in u&&n(0,i=u.value),"readOnly"in u&&n(1,o=u.readOnly),"onPatch"in u&&n(4,a=u.onPatch),"focus"in u&&n(5,s=u.focus)},[i,o,function(u){u.stopPropagation(),o||(a([{op:"replace",path:Qt(r),value:!i}]),setTimeout(s))},r,a,s]}var iq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,rq,nq,Be,{path:3,value:0,readOnly:1,onPatch:4,focus:5},eq),i}return tt(n)}();function oq(e){Ae(e,"svelte-1gn8yt9",".jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup,.jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup .picker_arrow::before,.jse-color-picker-popup.svelte-1gn8yt9 .picker_wrapper.popup .picker_arrow::after{background:var(--jse-color-picker-background);line-height:normal}.jse-color-picker-popup.svelte-1gn8yt9 .picker_slider,.jse-color-picker-popup.svelte-1gn8yt9 .picker_sl,.jse-color-picker-popup.svelte-1gn8yt9 .picker_editor input,.jse-color-picker-popup.svelte-1gn8yt9 .picker_sample,.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button{box-shadow:var(--jse-color-picker-border-box-shadow)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_editor input{background:var(--jse-background-color);color:var(--jse-text-color)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button{background:var(--jse-button-background);color:var(--jse-button-color)}.jse-color-picker-popup.svelte-1gn8yt9 .picker_done button:hover{background:var(--jse-button-background-highlight)}")}function aq(e){var t;return{c:function(){C(t=G("div"),"class","jse-color-picker-popup svelte-1gn8yt9")},m:function(n,r){ot(n,t,r),e[4](t)},p:It,i:It,o:It,d:function(n){n&&it(t),e[4](null)}}}function sq(e,t,n){var r,i,o=t.color,a=t.onChange,s=t.showOnTop;return Ti(Ee(Ft().mark(function u(){var c,l;return Ft().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,Promise.resolve().then(function(){return Trt});case 2:if(f.t1=c=f.sent,f.t0=f.t1===null,f.t0){f.next=6;break}f.t0=c===void 0;case 6:if(!f.t0){f.next=10;break}f.t2=void 0,f.next=11;break;case 10:f.t2=c.default;case 11:l=f.t2,i=new l({parent:r,color:o,popup:s?"top":"bottom",onDone:function(h){var d=h.rgba[3]===1?h.hex.substring(0,7):h.hex;a(d)}}),i.show();case 14:case"end":return f.stop()}},u)}))),xi(function(){i&&i.destroy()}),e.$$set=function(u){"color"in u&&n(1,o=u.color),"onChange"in u&&n(2,a=u.onChange),"showOnTop"in u&&n(3,s=u.showOnTop)},[r,o,a,s,function(u){He[u?"unshift":"push"](function(){n(0,r=u)})}]}var uq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,sq,aq,Sr,{color:1,onChange:2,showOnTop:3},oq),i}return tt(n)}();function cq(e){Ae(e,"svelte-1nv0s05",".jse-color-picker-button.svelte-1nv0s05{font-size:var(--jse-font-size-mono);width:var(--jse-color-picker-button-size);height:var(--jse-color-picker-button-size);box-sizing:border-box;padding:0;margin:2px 0 0;display:inline-flex;vertical-align:top;border:1px solid var(--jse-text-color);border-radius:2px;background:inherit;outline:none}.jse-color-picker-button.svelte-1nv0s05:not(.jse-readonly){cursor:pointer}")}function lq(e){var t,n,r,i;return{c:function(){C(t=G("button"),"type","button"),C(t,"class","jse-color-picker-button svelte-1nv0s05"),Ra(t,"background",e[2]),C(t,"title",n=e[1]?"Color ".concat(e[0]):"Click to open a color picker"),At(t,"jse-readonly",e[1])},m:function(o,a){ot(o,t,a),r||(i=Nt(t,"click",e[3]),r=!0)},p:function(o,a){var s=ke(a,1)[0];4&s&&Ra(t,"background",o[2]),3&s&&n!==(n=o[1]?"Color ".concat(o[0]):"Click to open a color picker")&&C(t,"title",n),2&s&&At(t,"jse-readonly",o[1])},i:It,o:It,d:function(o){o&&it(t),r=!1,i()}}}function fq(e,t,n){var r,i=Ir("absolute-popup").openAbsolutePopup,o=t.path,a=t.value,s=t.readOnly,u=t.onPatch,c=t.focus;function l(h){u([{op:"replace",path:Qt(o),value:h}]),f()}function f(){c()}return e.$$set=function(h){"path"in h&&n(4,o=h.path),"value"in h&&n(0,a=h.value),"readOnly"in h&&n(1,s=h.readOnly),"onPatch"in h&&n(5,u=h.onPatch),"focus"in h&&n(6,c=h.focus)},e.$$.update=function(){1&e.$$.dirty&&n(2,r=D3(a))},[a,s,r,function(h){if(!s){var d=h.target.getBoundingClientRect().top,v=Bu(h.target).innerHeight;i(uq,{color:a,onChange:l,showOnTop:v-d<300&&d>300},{anchor:h.target,closeOnOuterClick:!0,onClose:f,offsetTop:18,offsetLeft:-8,height:300})}},o,u,c]}var hq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,fq,lq,Be,{path:4,value:0,readOnly:1,onPatch:5,focus:6},cq),i}return tt(n)}();function c_(e){for(var t=hg(e,function(s){return s.start}),n=[t[0]],r=0;r<t.length;r++){var i=n.length-1,o=n[i],a=t[r];a.start<=o.end?n[i]={start:Math.min(o.start,a.start),end:Math.max(o.end,a.end)}:n.push(a)}return n}function dq(e,t){return e.some(function(n){return t>=n.start&&t<n.end})}function Pg(e){return Mh(e)+Fc}function Mh(e){return Math.floor(e/Fc)*Fc}function Eh(e){var t={expandedMap:{},enforceStringMap:{},visibleSectionsMap:{},selection:void 0,sortedColumn:void 0};return e!=null&&e.select&&e.json!==void 0&&(t=dt(dt({},t),{},{selection:e.select(e.json,t)})),e!=null&&e.expand&&(t=Vi(e.json,t,[],e.expand)),t}function Ah(e,t){return e.visibleSectionsMap[t]||js}function Tg(e,t,n){t.forEach(function(r){var i=r.start,o=r.end;M6(i,Math.min(e.length,o),n)})}function Rg(e,t,n){for(var r=dt({},t.expandedMap),i=dt({},t.visibleSectionsMap),o=0;o<n.length;o++){var a=n.slice(0,o),s=Qt(a),u=se(e,a);if(Jn(u)&&(r[s]=!0),Array.isArray(u)&&o<n.length){var c=i[s]||js,l=Cr(n[o]);if(!dq(c,l)){var f=Mh(l),h={start:f,end:Pg(f)};i[s]=c_(c.concat(h))}}}return dt(dt({},t),{},{expandedMap:r,visibleSectionsMap:i})}function Vi(e,t,n,r){var i=dt({},t.expandedMap),o=n.slice(),a=e!==void 0?se(e,n):e;return a!==void 0&&function s(u){var c=o.length;if(Array.isArray(u)){if(r(o)){var l=Qt(o);if(i[l]=!0,u.length>0){var f=Ah(t,l);Tg(u,f,function(m){o[c]=String(m),s(u[m])}),o.pop()}}}else if(In(u)&&r(o)){i[Qt(o)]=!0;var h=Object.keys(u);if(h.length>0){var d,v=at(h);try{for(v.s();!(d=v.n()).done;){var p=d.value;o[c]=p,s(u[p])}}catch(m){v.e(m)}finally{v.f()}o.pop()}}}(a),dt(dt({},t),{},{expandedMap:i})}function l_(e,t){var n=Fu(e.expandedMap,t),r=Fu(e.enforceStringMap,t),i=Fu(e.visibleSectionsMap,t);return dt(dt({},e),{},{expandedMap:n,enforceStringMap:r,visibleSectionsMap:i})}function f_(e,t,n){if(n){var r=dt({},e.enforceStringMap);return r[t]=n,dt(dt({},e),{},{enforceStringMap:r})}if(typeof e.enforceStringMap[t]=="boolean"){var i=dt({},e.enforceStringMap);return delete i[t],dt(dt({},e),{},{enforceStringMap:i})}return e}function h_(e,t,n){var r=so(e,n),i=n.reduce(function(o,a){return m3(a)?d_(r,o,a):g3(a)?v_(r,o,a):dp(a)?function(s,u,c){var l=c.path,f=Lg(s,u.expandedMap),h=Lg(s,u.enforceStringMap),d=Lg(s,u.visibleSectionsMap);return nr(c.value)||An(c.value)||delete f[l],An(c.value)||delete d[l],(nr(c.value)||An(c.value))&&delete h[l],dt(dt({},u),{},{expandedMap:f,enforceStringMap:h,visibleSectionsMap:d})}(r,o,a):vp(a)||pu(a)?function(s,u,c){if(pu(c)&&c.from===c.path)return u;var l=function(y){return c.path+y.substring(c.from.length)},f=Dg(Ng(u.expandedMap,c.from),l),h=Dg(Ng(u.enforceStringMap,c.from),l),d=Dg(Ng(u.visibleSectionsMap,c.from),l),v=u;pu(c)&&(v=v_(s,v,{op:"remove",path:c.from})),v=d_(s,v,{op:"add",path:c.path,value:null});var p=Ig(v.expandedMap,f),m=Ig(v.enforceStringMap,h),g=Ig(v.visibleSectionsMap,d);return dt(dt({},u),{},{expandedMap:p,enforceStringMap:m,visibleSectionsMap:g})}(r,o,a):o},t);return{json:r,documentState:i}}function d_(e,t,n){var r=uo(e,n.path),i=Ze(r),o=Qt(i);if(An(se(e,i))){var a=Cr(le(r)),s=Vu(t.expandedMap,i,a,1),u=Vu(t.enforceStringMap,i,a,1),c=Vu(t.visibleSectionsMap,i,a,1);return c=p_(c,o,function(l){return m_(l,a,1)}),dt(dt({},t),{},{expandedMap:s,enforceStringMap:u,visibleSectionsMap:c})}return t}function v_(e,t,n){var r=uo(e,n.path),i=Ze(r),o=Qt(i),a=se(e,i),s=t.expandedMap,u=t.enforceStringMap,c=t.visibleSectionsMap;if(s=Fu(s,r),u=Fu(u,r),c=Fu(c,r),An(a)){var l=Cr(le(r));s=Vu(s,i,l,-1),u=Vu(u,i,l,-1),c=p_(c=Vu(c,i,l,-1),o,function(f){return m_(f,l,-1)})}return dt(dt({},t),{},{expandedMap:s,enforceStringMap:u,visibleSectionsMap:c})}function Fu(e,t){var n={},r=Qt(t);return Object.keys(e).forEach(function(i){mu(i,r)||(n[i]=e[i])}),n}function Ng(e,t){var n={};return Object.keys(e).forEach(function(r){mu(r,t)&&(n[r]=e[r])}),n}function Ig(e,t){return dt(dt({},e),t)}function Dg(e,t){var n={};return Object.keys(e).forEach(function(r){var i=t(r);n[i]=e[r]}),n}function Vu(e,t,n,r){for(var i=t.length,o=Qt(t),a=[],s=0,u=Object.keys(e);s<u.length;s++){var c=u[s];if(mu(c,o)){var l=ao(c),f=Cr(l[i]);f>=n&&(l[i]=String(f+r),a.push({oldPointer:c,newPointer:Qt(l),value:e[c]}))}}if(a.length===0)return e;var h=dt({},e);return a.forEach(function(d){delete h[d.oldPointer]}),a.forEach(function(d){h[d.newPointer]=d.value}),h}function Lg(e,t){var n={};return Object.keys(t).filter(function(r){return Ni(e,uo(e,r))}).forEach(function(r){n[r]=t[r]}),n}function p_(e,t,n){var r=e[t];if(t in e){var i=n(r);if(!rn(r,i)){var o=dt({},e);return i===void 0?delete o[t]:o[t]=i,o}}return e}function m_(e,t,n){return e.map(function(r){return{start:r.start>t?r.start+n:r.start,end:r.end>=t?r.end+n:r.end}})}function ja(e,t,n,r){var i=t?t[n]:void 0;return typeof i=="boolean"?i:function(o,a){return typeof o=="string"&&typeof gu(o,a)!="string"}(e,r)}function ml(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=e.indexOf(t);return r!==-1?n?e.slice(r):e.slice(r+1):[]}function Bg(e,t){var n=[];return function r(i,o){n.push(o);var a=Qt(o);if(i&&t.expandedMap[a]===!0){if(An(i)){var s=Ah(t,a);Tg(i,s,function(u){r(i[u],o.concat(String(u)))})}nr(i)&&Object.keys(i).forEach(function(u){r(i[u],o.concat(u))})}}(e,[]),n}function g_(e,t){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],r=[];return function i(o,a){r.push({path:a,type:ro.value});var s=Qt(a);if(o&&t.expandedMap[s]===!0){if(n&&r.push({path:a,type:ro.inside}),An(o)){var u=Ah(t,s);Tg(o,u,function(c){var l=a.concat(String(c));i(o[c],l),n&&r.push({path:l,type:ro.after})})}nr(o)&&Object.keys(o).forEach(function(c){var l=a.concat(c);r.push({path:l,type:ro.key}),i(o[c],l),n&&r.push({path:l,type:ro.after})})}}(e,[]),r}function zg(e,t,n){var r=Bg(e,t),i=r.map(Qt).indexOf(Qt(n));return i!==-1&&i<r.length-1?r[i+1]:null}function Ua(e,t,n){var r=se(e,n);return r===void 0?t:Vi(e,t,n,D6({json:r},d3)?Jo:gl)}function Jo(e){return e.length===0||e.length===1&&e[0]==="0"}function gl(){return!0}function fo(e){return e&&e.type===En.after||!1}function _r(e){return e&&e.type===En.inside||!1}function yr(e){return e&&e.type===En.key||!1}function Ge(e){return e&&e.type===En.value||!1}function yn(e){return e&&e.type===En.multi||!1}function y_(e){return _r(e)?e.focusPath:Ze(e.focusPath)}function Wu(e){return yn(e)?Ar(e.paths):e.focusPath}function Ph(e){return yn(e)?le(e.paths):e.focusPath}function b_(e,t,n){if(!e)return!1;var r=t.slice(0);if(yn(e))for(;r.length>0;){if(e.pointersMap[Qt(r)]===!0)return!0;r.pop()}return yr(e)?n===En.key&&rn(e.focusPath,t):!!(Ge(e)&&(n===En.value&&rn(e.focusPath,t)||Uu(t,e.focusPath)&&t.length>e.focusPath.length&&(n===En.key||n===En.value||n===En.multi)))}function w_(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3],i=t.selection;if(!i)return null;var o=!r&&yn(i)?Ar(i.paths):i.focusPath,a=function(l,f,h){var d=Bg(l,f),v=d.map(Qt),p=Qt(h),m=v.indexOf(p);return m!==-1&&m>0?d[m-1]:null}(e,t,o);if(a===null)return null;var s=a,u=a;if(n)return fo(i)||_r(i)?wr(e,i.anchorPath,i.anchorPath):wr(e,i.anchorPath,u);if(yr(i)){var c=se(e,Ze(a));return Array.isArray(c)||Ue(a)?un(a,!1):Wi(a,!1)}return Ge(i)?un(a,!1):fo(i)||_r(i)?wr(e,o,o):wr(e,s,u)}function x_(e,t,n){var r=t.selection;if(!r)return{caret:null,previous:null,next:null};var i=g_(e,t,n),o=i.findIndex(function(a){return rn(a.path,r.focusPath)&&String(a.type)===String(r.type)});return{caret:o!==-1?i[o]:null,previous:o!==-1&&o>0?i[o-1]:null,next:o!==-1&&o<i.length-1?i[o+1]:null}}function qu(e,t){for(var n=Bg(e,t),r=0;r<n.length-1&&n[r+1].length>n[r].length;)r++;var i=n[r];return i.length===0||Array.isArray(se(e,Ze(i)))?un(i,!1):Wi(i,!1)}function Hu(e,t){if(t.length===1){var n=Ar(t);if(n.op==="replace"||n.op==="move")return un(uo(e,n.path),!1)}if(!Ue(t)&&t.every(function(a){return a.op==="move"})){var r=Ar(t),i=t.slice(1);if((vp(r)||pu(r))&&r.from!==r.path&&i.every(function(a){return(vp(a)||pu(a))&&a.from===a.path}))return Wi(uo(e,r.path),!1)}var o=t.filter(function(a){return a.op!=="test"&&a.op!=="remove"&&(a.op!=="move"||a.from!==a.path)&&typeof a.path=="string"}).map(function(a){return uo(e,a.path)});if(!Ue(o))return{type:En.multi,paths:o,anchorPath:Ar(o),focusPath:le(o),pointersMap:k_(o)}}function k_(e){var t={};return e.forEach(function(n){t[Qt(n)]=!0}),t}function Th(e){return fi({},Qt(e),!0)}function yl(e){return e!==void 0&&(yr(e)||Ge(e)||yn(e)&&e.paths.length===1)}function j_(e,t){return yl(t)&&Jn(se(e,t.focusPath))?t.focusPath:Ze(t.focusPath)}function Uu(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Yr(e){var t=e.selection;return(yr(t)||Ge(t))&&t.edit?dt(dt({},e),{},{selection:dt(dt({},t),{},{edit:!1})}):e}function Wi(e,t){return{type:En.key,anchorPath:e,focusPath:e,pointersMap:Th(e),edit:t}}function un(e,t){return{type:En.value,anchorPath:e,focusPath:e,pointersMap:Th(e),edit:t}}function Ja(e){return{type:En.inside,anchorPath:e,focusPath:e,pointersMap:Th(e)}}function Sa(e){return{type:En.after,anchorPath:e,focusPath:e,pointersMap:Th(e)}}function wr(e,t,n){var r=function(o,a,s){if(rn(a,s))return[a];var u=function(R,M){for(var E=0;E<R.length&&E<M.length&&R[E]===M[E];)E++;return R.slice(0,E)}(a,s);if(a.length===u.length||s.length===u.length)return[u];var c=a[u.length],l=s[u.length],f=se(o,u);if(nr(f)){var h=Object.keys(f),d=h.indexOf(c),v=h.indexOf(l);if(d!==-1&&v!==-1){for(var p=Math.min(d,v),m=Math.max(d,v),g=[],y=p;y<=m;y++)g.push(u.concat(h[y]));return g}}if(An(f)){for(var b=Math.min(Cr(c),Cr(l)),w=Math.max(Cr(c),Cr(l)),j=[],x=b;x<=w;x++)j.push(u.concat(String(x)));return j}throw new Error("Failed to create selection")}(e,t,n),i=Uu(n,le(r))||Uu(t,Ar(r));return{type:En.multi,anchorPath:i?Ar(r):le(r),focusPath:i?le(r):Ar(r),paths:r,pointersMap:k_(r)}}function S_(e,t,n,r){if(yr(t))return String(le(t.focusPath));if(Ge(t)){var i=se(e,t.focusPath);return typeof i=="string"?i:r.stringify(i,null,n)}if(yn(t)){if(Ue(t.focusPath))return r.stringify(e,null,n);var o=y_(t),a=se(e,o);if(Array.isArray(a)){if(t.paths.length===1){var s=se(e,Ar(t.paths)||[]);return r.stringify(s,null,n)}return t.paths.map(function(u){var c=se(e,u);return"".concat(r.stringify(c,null,n),",")}).join(`
|
|
`)}return t.paths.map(function(u){var c=le(u),l=se(e,u);return"".concat(r.stringify(c),": ").concat(r.stringify(l,null,n),",")}).join(`
|
|
`)}return null}function C_(e){return yn(e)?e.paths:[e.focusPath]}function Ka(e){return(yr(e)||Ge(e))&&e.edit===!0}function Ju(e){return yn(e)||yr(e)||Ge(e)}function Bs(e){return!(!yr(e)&&!Ge(e))||!(!yn(e)||e.paths.length!==1)}function Fg(e){switch(e.type){case ro.key:return Wi(e.path,!1);case ro.value:return un(e.path,!1);case ro.after:return Sa(e.path);case ro.inside:return Ja(e.path)}}function $_(e,t,n){switch(t){case En.key:return Wi(n,!1);case En.value:return un(n,!1);case En.after:return Sa(n);case En.inside:return Ja(n);case En.multi:return wr(e,n,n)}}function __(e,t){if(e)return Object.keys(e.pointersMap).some(function(n){return mu(n,t)||mu(t,n)})?e:void 0}function Ko(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if(typeof a=="string"&&e.push(a),a&&ee(a)==="object")for(var s in a)Object.hasOwnProperty.call(a,s)&&a[s]&&e.push(s)}return e.join(" ")}function bl(e,t){return Ko("jse-value","jse-"+Np(e,t),{"jse-url":Rf(e),"jse-empty":typeof e=="string"&&e.length===0})}function vq(e){Ae(e,"svelte-1iltvlj",".jse-value.jse-string.svelte-1iltvlj{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-1iltvlj,.jse-value.jse-array.svelte-1iltvlj{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-1iltvlj{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-1iltvlj{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-1iltvlj{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-1iltvlj{color:var(--jse-text-color)}.jse-value.jse-url.svelte-1iltvlj{color:var(--jse-value-color-url);text-decoration:underline}div.jse-editable-div.svelte-1iltvlj{min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;cursor:text !important;word-break:normal;white-space:pre-wrap;overflow-wrap:anywhere}div.jse-editable-div.jse-short-text.svelte-1iltvlj{overflow-wrap:normal}div.jse-editable-div[contenteditable=true].svelte-1iltvlj{outline:var(--jse-edit-outline);background:inherit !important;position:relative;border-radius:0;z-index:3}div.jse-editable-div.jse-empty.svelte-1iltvlj:not(:focus){outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}div.jse-editable-div.jse-empty.svelte-1iltvlj::after{pointer-events:none;color:var(--jse-tag-background)}")}function pq(e){var t,n,r,i;return{c:function(){C(t=G("div"),"class",n=Wn(Ko("jse-editable-div",e[2],{"jse-short-text":e[0]}))+" svelte-1iltvlj"),C(t,"contenteditable","true"),C(t,"spellcheck","false")},m:function(o,a){ot(o,t,a),e[13](t),r||(i=[Nt(t,"input",e[3]),Nt(t,"keydown",e[4]),Nt(t,"paste",e[5]),Nt(t,"blur",e[6])],r=!0)},p:function(o,a){5&ke(a,1)[0]&&n!==(n=Wn(Ko("jse-editable-div",o[2],{"jse-short-text":o[0]}))+" svelte-1iltvlj")&&C(t,"class",n)},i:It,o:It,d:function(o){o&&it(t),e[13](null),r=!1,Mn(i)}}}function mq(e,t,n){var r,i=Dr("jsoneditor:EditableDiv"),o=t.value,a=t.shortText,s=a!==void 0&&a,u=t.onChange,c=t.onCancel,l=t.onFind,f=t.onPaste,h=f===void 0?Dn:f,d=t.onValueClass,v=d===void 0?function(){return""}:d,p=v(o),m=!1;function g(){return r?function(b){return b.replace(/\n$/,"")}(r.innerText):""}function y(b){r&&n(1,r.innerText=Ds(b),r)}return Ti(function(){i("onMount",{value:o}),y(o),setTimeout(function(){r&&J6(r)})}),xi(function(){var b=g();i("onDestroy",{closed:m,value:o,newValue:b}),m||b===o||u(b,aI)}),e.$$set=function(b){"value"in b&&n(7,o=b.value),"shortText"in b&&n(0,s=b.shortText),"onChange"in b&&n(8,u=b.onChange),"onCancel"in b&&n(9,c=b.onCancel),"onFind"in b&&n(10,l=b.onFind),"onPaste"in b&&n(11,h=b.onPaste),"onValueClass"in b&&n(12,v=b.onValueClass)},[s,r,p,function(){var b=g();b===""&&y(""),n(2,p=v(b))},function(b){b.stopPropagation();var w=Ha(b);if(w==="Escape"&&(m=!0,c()),w==="Enter"||w==="Tab"){m=!0;var j=g();u(j,hp)}w==="Ctrl+F"&&(b.preventDefault(),l(!1)),w==="Ctrl+H"&&(b.preventDefault(),l(!0))},function(b){if(h){var w=b.clipboardData.getData("text/plain");h(w)}},function(){var b=document.hasFocus(),w=g();i("handleBlur",{hasFocus:b,closed:m,value:o,newValue:w}),document.hasFocus()&&!m&&(m=!0,w!==o?u(w,fp):c())},o,u,c,l,h,v,function(b){He[b?"unshift":"push"](function(){n(1,r=b)})}]}var O_=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,mq,pq,Be,{value:7,shortText:0,onChange:8,onCancel:9,onFind:10,onPaste:11,onValueClass:12},vq),i}return tt(n)}();function gq(e){var t,n;return t=new O_({props:{value:e[1].escapeValue(e[0]),onChange:e[3],onCancel:e[4],onPaste:e[5],onFind:e[2],onValueClass:e[6]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o=ke(i,1)[0],a={};3&o&&(a.value=r[1].escapeValue(r[0])),4&o&&(a.onFind=r[2]),t.$set(a)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function yq(e,t,n){var r=t.path,i=t.value,o=t.parser,a=t.normalization,s=t.enforceString,u=t.onPatch,c=t.onPasteJson,l=t.onSelect,f=t.onFind,h=t.focus,d=t.findNextInside;function v(p){return s?p:gu(p,o)}return e.$$set=function(p){"path"in p&&n(7,r=p.path),"value"in p&&n(0,i=p.value),"parser"in p&&n(8,o=p.parser),"normalization"in p&&n(1,a=p.normalization),"enforceString"in p&&n(9,s=p.enforceString),"onPatch"in p&&n(10,u=p.onPatch),"onPasteJson"in p&&n(11,c=p.onPasteJson),"onSelect"in p&&n(12,l=p.onSelect),"onFind"in p&&n(2,f=p.onFind),"focus"in p&&n(13,h=p.focus),"findNextInside"in p&&n(14,d=p.findNextInside)},[i,a,f,function(p,m){u([{op:"replace",path:Qt(r),value:v(a.unescapeValue(p))}],function(g,y){if(rn(r,y.selection.focusPath)){var b=m===hp?d(r):un(r,!1);return{state:dt(dt({},y),{},{selection:b})}}}),m!==fp&&h()},function(){l(un(r,!1)),h()},function(p){try{var m=o.parse(p);Jn(m)&&c({path:r,contents:m})}catch(g){}},function(p){return bl(v(a.unescapeValue(p)),o)},r,o,s,u,c,l,h,d]}var bq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,yq,gq,Be,{path:7,value:0,parser:8,normalization:1,enforceString:9,onPatch:10,onPasteJson:11,onSelect:12,onFind:2,focus:13,findNextInside:14}),i}return tt(n)}();function Ku(e,t,n){var r=Ze(t),i=se(e,r);if(An(i)){var o=Cr(le(t));return n.map(function(c,l){return{op:"add",path:Qt(r.concat(String(o+l))),value:c.value}})}if(nr(i)){var a=le(t),s=Object.keys(i),u=a!==void 0?ml(s,a,!0):[];return[].concat(Oe(n.map(function(c){var l=dl(c.key,s);return{op:"add",path:Qt(r.concat(l)),value:c.value}})),Oe(u.map(function(c){return zs(r,c)})))}throw new Error("Cannot create insert operations: parent must be an Object or Array")}function Vg(e,t,n){var r=se(e,t);if(Array.isArray(r)){var i=r.length;return n.map(function(o,a){return{op:"add",path:Qt(t.concat(String(i+a))),value:o.value}})}return n.map(function(o){var a=dl(o.key,Object.keys(r));return{op:"add",path:Qt(t.concat(a)),value:o.value}})}function wl(e,t,n,r){var i=dl(r,t.filter(function(a){return a!==n})),o=ml(t,n,!1);return[{op:"move",from:Qt(e.concat(n)),path:Qt(e.concat(i))}].concat(Oe(o.map(function(a){return zs(e,a)})))}function M_(e,t){var n=le(t);if(Ue(n))throw new Error("Cannot duplicate root object");var r=Ze(n),i=le(n),o=se(e,r);if(An(o)){var a=le(t),s=a?Cr(le(a))+1:0;return Oe(t.map(function(l,f){return{op:"copy",from:Qt(l),path:Qt(r.concat(String(f+s)))}}))}if(nr(o)){var u=Object.keys(o),c=i!==void 0?ml(u,i,!1):[];return[].concat(Oe(t.map(function(l){var f=dl(le(l),u);return{op:"copy",from:Qt(l),path:Qt(r.concat(f))}})),Oe(c.map(function(l){return zs(r,l)})))}throw new Error("Cannot create duplicate operations: parent must be an Object or Array")}function E_(e,t,n,r){if(yr(t)){var i=T6(n,r),o=Ze(t.focusPath),a=se(e,o);return wl(o,Object.keys(a),le(t.focusPath),typeof i=="string"?i:n)}if(Ge(t)||yn(t)&&Ue(t.focusPath))try{return[{op:"replace",path:Qt(t.focusPath),value:Sh(n,function(x){return jg(x,r)})}]}catch(x){return[{op:"replace",path:Qt(t.focusPath),value:n}]}if(yn(t)){var s=Wg(n,r);return function(x,R,M){var E=Ze(Ar(R)),N=se(x,E);if(An(N)){var A=Ar(R),L=A?Cr(le(A)):0;return[].concat(Oe(Rh(R)),Oe(M.map(function($,D){return{op:"add",path:Qt(E.concat(String(D+L))),value:$.value}})))}if(nr(N)){var W=le(R),O=Ze(W),I=le(W),q=Object.keys(N),P=I!==void 0?ml(q,I,!1):[],_=new Set(R.map(function($){return le($)})),S=q.filter(function($){return!_.has($)});return[].concat(Oe(Rh(R)),Oe(M.map(function($){var D=dl($.key,S);return{op:"add",path:Qt(O.concat(D)),value:$.value}})),Oe(P.map(function($){return zs(O,$)})))}throw new Error("Cannot create replace operations: parent must be an Object or Array")}(e,t.paths,s)}if(fo(t)){var u=Wg(n,r),c=t.focusPath,l=Ze(c),f=se(e,l);if(An(f)){var h=Cr(le(c));return Ku(e,l.concat(String(h+1)),u)}if(nr(f)){var d=String(le(c)),v=Object.keys(f);if(Ue(v)||le(v)===d)return Vg(e,l,u);var p=v.indexOf(d),m=v[p+1];return Ku(e,l.concat(m),u)}throw new Error("Cannot create insert operations: parent must be an Object or Array")}if(_r(t)){var g=Wg(n,r),y=t.focusPath,b=se(e,y);if(An(b))return Ku(e,y.concat("0"),g);if(nr(b)){var w=Object.keys(b);if(Ue(w))return Vg(e,y,g);var j=Ar(w);return Ku(e,y.concat(j),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(t))}function Rh(e){return e.map(function(t){return{op:"remove",path:Qt(t)}}).reverse()}function zs(e,t){return{op:"move",from:Qt(e.concat(t)),path:Qt(e.concat(t))}}function Wg(e,t){var n=/^\s*{/.test(e),r=/^\s*\[/.test(e),i=T6(e,t),o=i!==void 0?i:Sh(e,function(a){return jg(a,t)});return n&&In(o)||r&&Array.isArray(o)?[{key:"New item",value:o}]:Array.isArray(o)?o.map(function(a,s){return{key:"New item "+s,value:a}}):In(o)?Object.keys(o).map(function(a){return{key:a,value:o[a]}}):[{key:"New item",value:o}]}function A_(e,t){if(yr(t)){var n=Ze(t.focusPath),r=se(e,n),i=wl(n,Object.keys(r),le(t.focusPath),"");return{operations:i,newSelection:Hu(e,i)}}if(Ge(t))return{operations:[{op:"replace",path:Qt(t.focusPath),value:""}],newSelection:t};if(yn(t)){var o=Rh(t.paths),a=le(t.paths);if(Ue(a))return{operations:[{op:"replace",path:"",value:""}],newSelection:un([],!1)};var s=Ze(a),u=se(e,s);if(An(u)){var c=Cr(le(Ar(t.paths)));return{operations:o,newSelection:c===0?Ja(s):Sa(s.concat(String(c-1)))}}if(nr(u)){var l=Object.keys(u),f=le(Ar(t.paths)),h=l.indexOf(f),d=l[h-1];return{operations:o,newSelection:h===0?Ja(s):Sa(s.concat(d))}}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(t))}function P_(e,t){return j3(e,t,{before:function(n,r,i){if(g3(r)){var o=ao(r.path);return{revertOperations:[].concat(Oe(i),Oe(T_(n,o)))}}if(pu(r)){var a=ao(r.from);return{revertOperations:[].concat(Oe(i),Oe(T_(n,a)))}}return{revertOperations:i}}})}function T_(e,t){var n=Ze(t),r=le(t),i=se(e,n);return nr(i)?ml(Object.keys(i),r,!1).map(function(o){return zs(n,o)}):[]}function wq(e){var t=e.activeIndex<e.items.length-1?e.activeIndex+1:e.items.length>0?0:-1,n=e.items[t],r=e.items.map(function(i,o){return dt(dt({},i),{},{active:o===t})});return dt(dt({},e),{},{items:r,itemsMap:Pu(r,function(i){return Qt(i.path)}),activeItem:n,activeIndex:t})}function xq(e){var t=e.activeIndex>0?e.activeIndex-1:e.items.length-1,n=e.items[t],r=e.items.map(function(i,o){return dt(dt({},i),{},{active:o===t})});return dt(dt({},e),{},{items:r,itemsMap:Pu(r,function(i){return Qt(i.path)}),activeItem:n,activeIndex:t})}function R_(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1/0,r=[],i=[];function o(a){r.length<n&&r.push(a)}return typeof e=="string"&&e!==""&&function a(s,u){if(An(u)){var c=i.length;i.push("0");for(var l=0;l<u.length;l++)if(i[c]=String(l),a(s,u[l]),r.length>=n)return;i.pop()}else if(nr(u)){var f=Object.keys(u),h=i.length;i.push("");for(var d=0,v=f;d<v.length;d++){var p=v[d];if(i[h]=p,N_(p,s,i,io.key,o),a(s,u[p]),r.length>=n)return}i.pop()}else N_(String(u),s,i,io.value,o)}(e.toLowerCase(),t),r}function N_(e,t,n,r,i){var o=e.toLowerCase(),a=0,s=-1,u=-1;do(u=o.indexOf(t,s))!==-1&&(s=u+t.length,i({path:n.slice(0),field:r,fieldIndex:a,start:u,end:s}),a++);while(u!==-1)}function qg(e,t,n,r){return e.substring(0,n)+t+e.substring(r)}function I_(e,t,n){var r=e;return sl(n,function(i){r=qg(r,t,i.start,i.end)}),r}function kq(e,t,n,r,i){var o=r.field,a=r.path,s=r.start,u=r.end;if(o===io.key){var c=Ze(a),l=se(e,c),f=le(a),h=wl(c,Object.keys(l),f,qg(f,n,s,u));return{newSelection:Hu(e,h),operations:h}}if(o===io.value){var d=se(e,a);if(d===void 0)throw new Error("Cannot replace: path not found ".concat(Qt(a)));var v=typeof d=="string"?d:String(d),p=Qt(a),m=ja(d,t.enforceStringMap,p,i),g=qg(v,n,s,u),y=[{op:"replace",path:Qt(a),value:m?g:gu(g,i)}];return{newSelection:Hu(e,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function jq(e,t,n,r,i){for(var o=R_(n,e,1/0),a=[],s=0;s<o.length;s++){var u=o[s-1],c=o[s];s!==0&&c.field===u.field&&rn(c.path,u.path)?le(a).items.push(c):a.push({path:c.path,field:c.field,items:[c]})}a.sort(function(h,d){return h.field!==d.field?h.field===io.key?1:-1:d.path.length-h.path.length});var l=[],f=void 0;return a.forEach(function(h){var d=h.field,v=h.path,p=h.items;if(d===io.key){var m=Ze(v),g=se(e,m),y=le(v),b=wl(m,Object.keys(g),y,I_(y,r,p));l=l.concat(b),f=Hu(e,b)}else{if(d!==io.value)throw new Error("Cannot replace: unknown type of search result field ".concat(d));var w=se(e,v);if(w===void 0)throw new Error("Cannot replace: path not found ".concat(Qt(v)));var j=typeof w=="string"?w:String(w),x=Qt(v),R=ja(w,t.enforceStringMap,x,i),M=I_(j,r,p),E=[{op:"replace",path:Qt(v),value:R?M:gu(M,i)}];l=l.concat(E),f=Hu(e,E)}}),{operations:l,newSelection:f}}function D_(e){return e.path.concat(e.field,String(e.fieldIndex))}function Sq(e,t){var n,r=e==null||(n=e[t])===null||n===void 0?void 0:n.filter(function(i){return i.field===io.key});if(r&&r.length!==0)return r}function L_(e,t){var n,r=e==null||(n=e[t])===null||n===void 0?void 0:n.filter(function(i){return i.field===io.value});if(r&&r.length!==0)return r}function Cq(e){Ae(e,"svelte-s6kbew",".jse-highlight.svelte-s6kbew{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-highlight.jse-active.svelte-s6kbew{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}")}function B_(e,t,n){var r=e.slice();return r[3]=t[n],r}function $q(e){var t,n,r=Ds(e[3].text)+"";return{c:function(){t=G("span"),n=Jt(r),C(t,"class","jse-highlight svelte-s6kbew"),At(t,"jse-active",e[3].active)},m:function(i,o){ot(i,t,o),F(t,n)},p:function(i,o){1&o&&r!==(r=Ds(i[3].text)+"")&&be(n,r),1&o&&At(t,"jse-active",i[3].active)},d:function(i){i&&it(t)}}}function _q(e){var t,n=e[3].text+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=r[3].text+"")&&be(t,n)},d:function(r){r&&it(t)}}}function z_(e){var t;function n(o,a){return o[3].type==="normal"?_q:$q}var r=n(e),i=r(e);return{c:function(){i.c(),t=vn()},m:function(o,a){i.m(o,a),ot(o,t,a)},p:function(o,a){r===(r=n(o))&&i?i.p(o,a):(i.d(1),(i=r(o))&&(i.c(),i.m(t.parentNode,t)))},d:function(o){i.d(o),o&&it(t)}}}function Oq(e){for(var t,n=e[0],r=[],i=0;i<n.length;i+=1)r[i]=z_(B_(e,n,i));return{c:function(){for(var o=0;o<r.length;o+=1)r[o].c();t=vn()},m:function(o,a){for(var s=0;s<r.length;s+=1)r[s]&&r[s].m(o,a);ot(o,t,a)},p:function(o,a){var s=ke(a,1)[0];if(1&s){var u;for(n=o[0],u=0;u<n.length;u+=1){var c=B_(o,n,u);r[u]?r[u].p(c,s):(r[u]=z_(c),r[u].c(),r[u].m(t.parentNode,t))}for(;u<r.length;u+=1)r[u].d(1);r.length=n.length}},i:It,o:It,d:function(o){ur(r,o),o&&it(t)}}}function Mq(e,t,n){var r,i=t.text,o=t.searchResultItems;return e.$$set=function(a){"text"in a&&n(1,i=a.text),"searchResultItems"in a&&n(2,o=a.searchResultItems)},e.$$.update=function(){6&e.$$.dirty&&n(0,r=function(a,s){var u,c=[],l=0,f=at(s);try{for(f.s();!(u=f.n()).done;){var h=u.value,d=a.slice(l,h.start);d!==""&&c.push({type:"normal",text:d,active:!1});var v=a.slice(h.start,h.end);c.push({type:"highlight",text:v,active:h.active}),l=h.end}}catch(m){f.e(m)}finally{f.f()}var p=le(s);return p&&p.end<a.length&&c.push({type:"normal",text:a.slice(p.end),active:!1}),c}(String(i),o))},[r,i,o]}var F_=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Mq,Oq,Sr,{text:1,searchResultItems:2},Cq),i}return tt(n)}();function Eq(e){Ae(e,"svelte-4unvg2",'.jse-value.jse-string.svelte-4unvg2{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-4unvg2,.jse-value.jse-array.svelte-4unvg2{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-4unvg2{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-4unvg2{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-4unvg2{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-4unvg2{color:var(--jse-text-color)}.jse-value.jse-url.svelte-4unvg2{color:var(--jse-value-color-url);text-decoration:underline}.jse-value.svelte-4unvg2{min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:anywhere;white-space:pre-wrap}.jse-value.svelte-4unvg2:hover{background:var(--jse-hover-background-color)}.jse-value.jse-empty.svelte-4unvg2{min-width:4em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-value.jse-empty.svelte-4unvg2::after{pointer-events:none;color:var(--jse-tag-background);content:"value"}')}function Aq(e){var t,n=Ds(e[1].escapeValue(e[0]))+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){3&i&&n!==(n=Ds(r[1].escapeValue(r[0]))+"")&&be(t,n)},i:It,o:It,d:function(r){r&&it(t)}}}function Pq(e){var t,n;return t=new F_({props:{text:e[1].escapeValue(e[0]),searchResultItems:e[3]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};3&i&&(o.text=r[1].escapeValue(r[0])),8&i&&(o.searchResultItems=r[3]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function Tq(e){var t,n,r,i,o,a,s,u,c=[Pq,Aq],l=[];function f(h,d){return h[3]?0:1}return n=f(e),r=l[n]=c[n](e),{c:function(){t=G("div"),r.c(),C(t,"data-type","selectable-value"),C(t,"class",i=Wn(bl(e[0],e[2]))+" svelte-4unvg2"),C(t,"title",o=e[4]?"Ctrl+Click or Ctrl+Enter to open url in new window":null)},m:function(h,d){ot(h,t,d),l[n].m(t,null),a=!0,s||(u=[Nt(t,"click",e[5]),Nt(t,"dblclick",e[6])],s=!0)},p:function(h,d){var v=ke(d,1)[0],p=n;(n=f(h))===p?l[n].p(h,v):(Dt(),z(l[p],1,1,function(){l[p]=null}),Lt(),(r=l[n])?r.p(h,v):(r=l[n]=c[n](h)).c(),T(r,1),r.m(t,null)),(!a||5&v&&i!==(i=Wn(bl(h[0],h[2]))+" svelte-4unvg2"))&&C(t,"class",i),(!a||16&v&&o!==(o=h[4]?"Ctrl+Click or Ctrl+Enter to open url in new window":null))&&C(t,"title",o)},i:function(h){a||(T(r),a=!0)},o:function(h){z(r),a=!1},d:function(h){h&&it(t),l[n].d(),s=!1,Mn(u)}}}function Rq(e,t,n){var r,i=t.path,o=t.value,a=t.readOnly,s=t.normalization,u=t.parser,c=t.onSelect,l=t.searchResultItems;return e.$$set=function(f){"path"in f&&n(7,i=f.path),"value"in f&&n(0,o=f.value),"readOnly"in f&&n(8,a=f.readOnly),"normalization"in f&&n(1,s=f.normalization),"parser"in f&&n(2,u=f.parser),"onSelect"in f&&n(9,c=f.onSelect),"searchResultItems"in f&&n(3,l=f.searchResultItems)},e.$$.update=function(){1&e.$$.dirty&&n(4,r=Rf(o))},[o,s,u,l,r,function(f){typeof o=="string"&&r&&f.ctrlKey&&(f.preventDefault(),f.stopPropagation(),window.open(o,"_blank"))},function(f){a||(f.preventDefault(),c(un(i,!0)))},i,a,c]}var Nq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Rq,Tq,Be,{path:7,value:0,readOnly:8,normalization:1,parser:2,onSelect:9,searchResultItems:3},Eq),i}return tt(n)}();function Iq(e){Ae(e,"svelte-r4omvg",".jse-tooltip.svelte-r4omvg{font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);border-radius:3px;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);white-space:nowrap;box-shadow:var(--jse-controls-box-shadow)}")}function Dq(e){var t,n;return{c:function(){t=G("div"),n=Jt(e[0]),C(t,"class","jse-tooltip svelte-r4omvg")},m:function(r,i){ot(r,t,i),F(t,n)},p:function(r,i){1&ke(i,1)[0]&&be(n,r[0])},i:It,o:It,d:function(r){r&&it(t)}}}function Lq(e,t,n){var r=t.text;return e.$$set=function(i){"text"in i&&n(0,r=i.text)},[r]}var Bq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Lq,Dq,Sr,{text:0},Iq),i}return tt(n)}();function Hg(e,t){var n,r=t.text,i=t.openAbsolutePopup,o=t.closeAbsolutePopup;function a(){n=i(Bq,{text:r},{position:"top",width:10*r.length,offsetTop:3,anchor:e,closeOnOuterClick:!0})}function s(){o(n)}return e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",s),{destroy:function(){e.removeEventListener("mouseenter",a),e.removeEventListener("mouseleave",s)}}}function zq(e){Ae(e,"svelte-1w5pf7",".jse-timestamp.svelte-1w5pf7{padding:0;margin:0;vertical-align:middle;display:inline-flex;color:var(--jse-value-color-number)}")}function Fq(e){var t,n,r,i,o,a;return n=new on({props:{data:qW}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-timestamp svelte-1w5pf7")},m:function(s,u){ot(s,t,u),xt(n,t,null),i=!0,o||(a=Nr(r=Hg.call(null,t,dt({text:e[0]},e[1]))),o=!0)},p:function(s,u){var c=ke(u,1)[0];r&&Rr(r.update)&&1&c&&r.update.call(null,dt({text:s[0]},s[1]))},i:function(s){i||(T(n.$$.fragment,s),i=!0)},o:function(s){z(n.$$.fragment,s),i=!1},d:function(s){s&&it(t),kt(n),o=!1,a()}}}function Vq(e,t,n){var r,i=Ir("absolute-popup"),o=t.value;return e.$$set=function(a){"value"in a&&n(2,o=a.value)},e.$$.update=function(){4&e.$$.dirty&&n(0,r="Time: ".concat(new Date(o).toString()))},[r,i,o]}var Wq=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Vq,Fq,Be,{value:2},zq),i}return tt(n)}();function qq(e){var t=e.path,n=e.value,r=e.readOnly,i=e.enforceString,o=e.searchResultItems,a=e.isEditing,s=e.parser,u=e.normalization,c=e.onPatch,l=e.onPasteJson,f=e.onSelect,h=e.onFind,d=e.findNextInside,v=e.focus,p=[];return!a&&function(m){return m===!0||m===!1}(n)&&p.push({component:iq,props:{path:t,value:n,readOnly:r,onPatch:c,focus:v}}),!a&&function(m){return typeof m=="string"&&!!D3(m)}(n)&&p.push({component:hq,props:{path:t,value:n,readOnly:r,onPatch:c,focus:v}}),a&&p.push({component:bq,props:{path:t,value:n,enforceString:i,parser:s,normalization:u,onPatch:c,onPasteJson:l,onSelect:f,onFind:h,findNextInside:d,focus:v}}),a||p.push({component:Nq,props:{path:t,value:n,readOnly:r,parser:s,normalization:u,searchResultItems:o,onSelect:f}}),!a&&Rp(n)&&p.push({component:Wq,props:{value:n}}),p}var Ug={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"]},Ga={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"]},V_={prefix:"fas",iconName:"paste",icon:[512,512,["file-clipboard"],"f0ea","M160 0c-23.7 0-44.4 12.9-55.4 32H48C21.5 32 0 53.5 0 80V400c0 26.5 21.5 48 48 48H192V176c0-44.2 35.8-80 80-80h48V80c0-26.5-21.5-48-48-48H215.4C204.4 12.9 183.7 0 160 0zM272 128c-26.5 0-48 21.5-48 48V448v16c0 26.5 21.5 48 48 48H464c26.5 0 48-21.5 48-48V243.9c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1H320 272zM160 40a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},Hq={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"]},Gu={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"]},Uq={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"]},Jq={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"]},W_={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 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},Kq={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"]},q_={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"]},Gq={prefix:"fas",iconName:"square-caret-up",icon:[448,512,["caret-square-up"],"f151","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM224 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.4H120c-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"]},H_={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.8H288c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},Nh={prefix:"fas",iconName:"filter",icon:[512,512,[],"f0b0","M3.9 54.9C10.5 40.9 24.5 32 40 32H472c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9V448c0 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.6V320.9L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]},Qa={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"]},Ih={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.7H336c-8.8 0-16-7.2-16-16V118.6c0-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"]},Qq={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"]},Qu={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"]},Jg={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.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"]},Kg={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160H176c17.7 0 32 14.3 32 32s-14.3 32-32 32H48c-17.7 0-32-14.3-32-32V64c0-17.7 14.3-32 32-32s32 14.3 32 32v51.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"]},Yq={prefix:"fas",iconName:"crop-simple",icon:[512,512,["crop-alt"],"f565","M128 32c0-17.7-14.3-32-32-32S64 14.3 64 32V64H32C14.3 64 0 78.3 0 96s14.3 32 32 32H64V384c0 35.3 28.7 64 64 64H352V384H128V32zM384 480c0 17.7 14.3 32 32 32s32-14.3 32-32V448h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H448l0-256c0-35.3-28.7-64-64-64L160 64v64l224 0 0 352z"]},Zq={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"]},qi={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"]},U_={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"]},Dh={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"]},Lh={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.7V64c0-17.7 14.3-32 32-32s32 14.3 32 32V365.7l32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 128H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},Xq={prefix:"fas",iconName:"angle-down",icon:[448,512,[8964],"f107","M201.4 342.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 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},tH={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"]},Gg={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"]},eH={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"]},Ya={prefix:"fas",iconName:"copy",icon:[512,512,[],"f0c5","M272 0H396.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H272c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128H192v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"]},Yu={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},J_={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"]},K_=J_,Zu=J_,nH={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"]},G_={prefix:"fas",iconName:"clone",icon:[512,512,[],"f24d","M288 448H64V224h64V160H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V384H288v64zm-64-96H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H224c-35.3 0-64 28.7-64 64V288c0 35.3 28.7 64 64 64z"]},xl={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"]},Fs={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 480H40c-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 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},ho={};function Bh(e){return e.split("-")[1]}function Q_(e){return e==="y"?"height":"width"}function Vs(e){return e.split("-")[0]}function zh(e){return["top","bottom"].includes(Vs(e))?"x":"y"}function Y_(e,t,n){var r,i=e.reference,o=e.floating,a=i.x+i.width/2-o.width/2,s=i.y+i.height/2-o.height/2,u=zh(t),c=Q_(u),l=i[c]/2-o[c]/2,f=u==="x";switch(Vs(t)){case"top":r={x:a,y:i.y-o.height};break;case"bottom":r={x:a,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:s};break;case"left":r={x:i.x-o.width,y:s};break;default:r={x:i.x,y:i.y}}switch(Bh(t)){case"start":r[u]-=l*(n&&f?-1:1);break;case"end":r[u]+=l*(n&&f?-1:1)}return r}var rH=function(){var e=Ee(Ft().mark(function t(n,r,i){var o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,W,O;return Ft().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return o=i.placement,a=o===void 0?"bottom":o,s=i.strategy,u=s===void 0?"absolute":s,c=i.middleware,l=c===void 0?[]:c,f=i.platform,h=l.filter(Boolean),I.next=10,f.isRTL==null?void 0:f.isRTL(r);case 10:return d=I.sent,I.next=13,f.getElementRects({reference:n,floating:r,strategy:u});case 13:v=I.sent,p=Y_(v,a,d),m=p.x,g=p.y,y=a,b={},w=0,j=0;case 21:if(!(j<h.length)){I.next=56;break}return R=h[j],M=R.name,E=R.fn,I.next=27,E({x:m,y:g,initialPlacement:a,placement:y,strategy:u,middlewareData:b,rects:v,platform:f,elements:{reference:n,floating:r}});case 27:if(N=I.sent,A=N.x,L=N.y,W=N.data,O=N.reset,m=A!=null?A:m,g=L!=null?L:g,b=dt(dt({},b),{},fi({},M,dt(dt({},b[M]),W))),I.t0=O&&w<=50,!I.t0){I.next=53;break}if(w++,I.t1=ee(O)=="object",!I.t1){I.next=52;break}if(O.placement&&(y=O.placement),I.t2=O.rects,!I.t2){I.next=51;break}if(O.rects!==!0){I.next=49;break}return I.next=46,f.getElementRects({reference:n,floating:r,strategy:u});case 46:I.t3=I.sent,I.next=50;break;case 49:I.t3=O.rects;case 50:v=I.t3;case 51:x=Y_(v,y,d),m=x.x,g=x.y;case 52:j=-1;case 53:j++,I.next=21;break;case 56:return I.abrupt("return",{x:m,y:g,placement:y,strategy:u,middlewareData:b});case 57:case"end":return I.stop()}},t)}));return function(t,n,r){return e.apply(this,arguments)}}();function iH(e){return typeof e!="number"?function(t){return dt({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function Qg(e){return dt(dt({},e),{},{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function Z_(e,t){return Yg.apply(this,arguments)}function Yg(){return Yg=Ee(Ft().mark(function e(t,n){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N;return Ft().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return n===void 0&&(n={}),i=t.x,o=t.y,a=t.platform,s=t.rects,u=t.elements,c=t.strategy,f=(l=n).boundary,h=f===void 0?"clippingAncestors":f,d=l.rootBoundary,v=d===void 0?"viewport":d,p=l.elementContext,m=p===void 0?"floating":p,g=l.altBoundary,y=g!==void 0&&g,b=l.padding,w=iH(b===void 0?0:b),j=u[y?m==="floating"?"reference":"floating":m],A.t0=Qg,A.t1=a,A.next=24,a.isElement==null?void 0:a.isElement(j);case 24:if(A.t3=r=A.sent,A.t2=A.t3==null,A.t2){A.next=28;break}A.t2=r;case 28:if(!A.t2){A.next=32;break}A.t4=j,A.next=38;break;case 32:if(A.t5=j.contextElement,A.t5){A.next=37;break}return A.next=36,a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating);case 36:A.t5=A.sent;case 37:A.t4=A.t5;case 38:return A.t6=A.t4,A.t7=h,A.t8=v,A.t9=c,A.t10={element:A.t6,boundary:A.t7,rootBoundary:A.t8,strategy:A.t9},A.next=45,A.t1.getClippingRect.call(A.t1,A.t10);case 45:return A.t11=A.sent,x=(0,A.t0)(A.t11),R=m==="floating"?dt(dt({},s.floating),{},{x:i,y:o}):s.reference,A.next=50,a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating);case 50:return M=A.sent,A.next=53,a.isElement==null?void 0:a.isElement(M);case 53:if(A.t13=A.sent,!A.t13){A.next=58;break}return A.next=57,a.getScale==null?void 0:a.getScale(M);case 57:A.t13=A.sent;case 58:if(A.t12=A.t13,A.t12){A.next=61;break}A.t12={x:1,y:1};case 61:if(E=A.t12,A.t14=Qg,!a.convertOffsetParentRelativeRectToViewportRelativeRect){A.next=69;break}return A.next=66,a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:R,offsetParent:M,strategy:c});case 66:A.t15=A.sent,A.next=70;break;case 69:A.t15=R;case 70:return A.t16=A.t15,N=(0,A.t14)(A.t16),A.abrupt("return",{top:(x.top-N.top+w.top)/E.y,bottom:(N.bottom-x.bottom+w.bottom)/E.y,left:(x.left-N.left+w.left)/E.x,right:(N.right-x.right+w.right)/E.x});case 73:case"end":return A.stop()}},e)})),Yg.apply(this,arguments)}var oH=Math.min,aH=Math.max;function X_(e,t,n){return aH(e,oH(t,n))}["top","right","bottom","left"].reduce(function(e,t){return e.concat(t,t+"-start",t+"-end")},[]);var sH={left:"right",right:"left",bottom:"top",top:"bottom"};function Fh(e){return e.replace(/left|right|bottom|top/g,function(t){return sH[t]})}function uH(e,t,n){n===void 0&&(n=!1);var r=Bh(e),i=zh(e),o=Q_(i),a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Fh(a)),{main:a,cross:Fh(a)}}var cH={start:"end",end:"start"};function Zg(e){return e.replace(/start|end/g,function(t){return cH[t]})}var lH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn:function(t){return Ee(Ft().mark(function n(){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,W,O,I,q,P,_,S,$,D,B,k,H;return Ft().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return i=t.placement,o=t.middlewareData,a=t.rects,s=t.initialPlacement,u=t.platform,c=t.elements,f=(l=e).mainAxis,h=f===void 0||f,d=l.crossAxis,v=d===void 0||d,p=l.fallbackPlacements,m=l.fallbackStrategy,g=m===void 0?"bestFit":m,y=l.fallbackAxisSideDirection,b=y===void 0?"none":y,w=l.flipAlignment,j=w===void 0||w,x=Rj(l,NN),R=Vs(i),M=Vs(s)===s,U.next=23,u.isRTL==null?void 0:u.isRTL(c.floating);case 23:return E=U.sent,N=p||(M||!j?[Fh(s)]:function(st){var ut=Fh(st);return[Zg(st),ut,Zg(ut)]}(s)),p||b==="none"||N.push.apply(N,Oe(function(st,ut,gt,St){var Pt=Bh(st),pt=function(Bt,K,$t){var Kt=["left","right"],Ct=["right","left"];switch(Bt){case"top":case"bottom":return $t?K?Ct:Kt:K?Kt:Ct;case"left":case"right":return K?["top","bottom"]:["bottom","top"];default:return[]}}(Vs(st),gt==="start",St);return Pt&&(pt=pt.map(function(Bt){return Bt+"-"+Pt}),ut&&(pt=pt.concat(pt.map(Zg)))),pt}(s,j,b,E))),A=[s].concat(Oe(N)),U.next=29,Z_(t,x);case 29:if(L=U.sent,W=[],O=((r=o.flip)==null?void 0:r.overflows)||[],h&&W.push(L[R]),v&&(I=uH(i,a,E),q=I.main,P=I.cross,W.push(L[q],L[P])),O=[].concat(Oe(O),[{placement:i,overflows:W}]),W.every(function(st){return st<=0})){U.next=48;break}if($=(((_=o.flip)==null?void 0:_.index)||0)+1,!(D=A[$])){U.next=37;break}return U.abrupt("return",{data:{index:$,overflows:O},reset:{placement:D}});case 37:if(B=(S=O.filter(function(st){return st.overflows[0]<=0}).sort(function(st,ut){return st.overflows[1]-ut.overflows[1]})[0])==null?void 0:S.placement,B){U.next=46;break}U.t0=g,U.next=U.t0==="bestFit"?42:U.t0==="initialPlacement"?45:46;break;case 42:return H=(k=O.map(function(st){return[st.placement,st.overflows.filter(function(ut){return ut>0}).reduce(function(ut,gt){return ut+gt},0)]}).sort(function(st,ut){return st[1]-ut[1]})[0])==null?void 0:k[0],H&&(B=H),U.abrupt("break",46);case 45:B=s;case 46:if(i===B){U.next=48;break}return U.abrupt("return",{reset:{placement:B}});case 48:return U.abrupt("return",{});case 49:case"end":return U.stop()}},n)}))()}}},fH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn:function(t){return Ee(Ft().mark(function n(){var r,i,o;return Ft().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=t.x,i=t.y,a.next=4,function(){var s=Ee(Ft().mark(function u(c,l){var f,h,d,v,p,m,g,y,b,w,j,x,R,M;return Ft().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return f=c.placement,h=c.platform,d=c.elements,E.next=5,h.isRTL==null?void 0:h.isRTL(d.floating);case 5:return v=E.sent,p=Vs(f),m=Bh(f),g=zh(f)==="x",y=["left","top"].includes(p)?-1:1,b=v&&g?-1:1,w=typeof l=="function"?l(c):l,j=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:dt({mainAxis:0,crossAxis:0,alignmentAxis:null},w),x=j.mainAxis,R=j.crossAxis,M=j.alignmentAxis,E.abrupt("return",(m&&typeof M=="number"&&(R=m==="end"?-1*M:M),g?{x:R*b,y:x*y}:{x:x*y,y:R*b}));case 14:case"end":return E.stop()}},u)}));return function(u,c){return s.apply(this,arguments)}}()(t,e);case 4:return o=a.sent,a.abrupt("return",{x:r+o.x,y:i+o.y,data:o});case 6:case"end":return a.stop()}},n)}))()}}};function hH(e){return e==="x"?"y":"x"}var dH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn:function(t){return Ee(Ft().mark(function n(){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R;return Ft().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return i=t.x,o=t.y,a=t.placement,u=(s=e).mainAxis,c=u===void 0||u,l=s.crossAxis,f=l!==void 0&&l,h=s.limiter,d=h===void 0?{fn:function(E){return{x:E.x,y:E.y}}}:h,v=Rj(s,IN),p={x:i,y:o},M.next=14,Z_(t,v);case 14:return m=M.sent,g=zh(Vs(a)),y=hH(g),b=p[g],w=p[y],c&&(j=g==="y"?"bottom":"right",b=X_(b+m[g==="y"?"top":"left"],b,b-m[j])),f&&(x=y==="y"?"bottom":"right",w=X_(w+m[y==="y"?"top":"left"],w,w-m[x])),R=d.fn(dt(dt({},t),{},(fi(r={},g,b),fi(r,y,w),r))),M.abrupt("return",dt(dt({},R),{},{data:{x:R.x-i,y:R.y-o}}));case 22:case"end":return M.stop()}},n)}))()}}};function $i(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){return $i(e).getComputedStyle(e)}var Xg,tO=Math.min,kl=Math.max,Vh=Math.round;function eO(e){var t=Go(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,o=e.offsetHeight,a=Vh(n)!==i||Vh(r)!==o;return a&&(n=i,r=o),{width:n,height:r,fallback:a}}function Za(e){return rO(e)?(e.nodeName||"").toLowerCase():""}function nO(){if(Xg)return Xg;var e=navigator.userAgentData;return e&&Array.isArray(e.brands)?Xg=e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Qo(e){return e instanceof $i(e).HTMLElement}function vo(e){return e instanceof $i(e).Element}function rO(e){return e instanceof $i(e).Node}function iO(e){return typeof ShadowRoot!="undefined"&&(e instanceof $i(e).ShadowRoot||e instanceof ShadowRoot)}function Wh(e){var t=Go(e),n=t.overflow,r=t.overflowX,i=t.overflowY,o=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!["inline","contents"].includes(o)}function vH(e){return["table","td","th"].includes(Za(e))}function t0(e){var t=/firefox/i.test(nO()),n=Go(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!r&&r!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some(function(i){return n.willChange.includes(i)})||["paint","layout","strict","content"].some(function(i){var o=n.contain;return o!=null&&o.includes(i)})}function e0(){return/^((?!chrome|android).)*safari/i.test(nO())}function n0(e){return["html","body","#document"].includes(Za(e))}function oO(e){return vo(e)?e:e.contextElement}var aO={x:1,y:1};function Xu(e){var t=oO(e);if(!Qo(t))return aO;var n=t.getBoundingClientRect(),r=eO(t),i=r.width,o=r.height,a=r.fallback,s=(a?Vh(n.width):n.width)/i,u=(a?Vh(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),u&&Number.isFinite(u)||(u=1),{x:s,y:u}}function Ws(e,t,n,r){var i,o;t===void 0&&(t=!1),n===void 0&&(n=!1);var a=e.getBoundingClientRect(),s=oO(e),u=aO;t&&(r?vo(r)&&(u=Xu(r)):u=Xu(e));var c=s?$i(s):window,l=e0()&&n,f=(a.left+(l&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,h=(a.top+(l&&((o=c.visualViewport)==null?void 0:o.offsetTop)||0))/u.y,d=a.width/u.x,v=a.height/u.y;if(s)for(var p=$i(s),m=r&&vo(r)?$i(r):r,g=p.frameElement;g&&r&&m!==p;){var y=Xu(g),b=g.getBoundingClientRect(),w=getComputedStyle(g);b.x+=(g.clientLeft+parseFloat(w.paddingLeft))*y.x,b.y+=(g.clientTop+parseFloat(w.paddingTop))*y.y,f*=y.x,h*=y.y,d*=y.x,v*=y.y,f+=b.x,h+=b.y,g=$i(g).frameElement}return{width:d,height:v,top:h,right:f+d,bottom:h+v,left:f,x:f,y:h}}function Xa(e){return((rO(e)?e.ownerDocument:e.document)||window.document).documentElement}function qh(e){return vo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function sO(e){return Ws(Xa(e)).left+qh(e).scrollLeft}function jl(e){if(Za(e)==="html")return e;var t=e.assignedSlot||e.parentNode||iO(e)&&e.host||Xa(e);return iO(t)?t.host:t}function uO(e){var t=jl(e);return n0(t)?t.ownerDocument.body:Qo(t)&&Wh(t)?t:uO(t)}function Sl(e,t){var n;t===void 0&&(t=[]);var r=uO(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=$i(r);return i?t.concat(o,o.visualViewport||[],Wh(r)?r:[]):t.concat(r,Sl(r))}function cO(e,t,n){var r;if(t==="viewport")r=function(u,c){var l=$i(u),f=Xa(u),h=l.visualViewport,d=f.clientWidth,v=f.clientHeight,p=0,m=0;if(h){d=h.width,v=h.height;var g=e0();(!g||g&&c==="fixed")&&(p=h.offsetLeft,m=h.offsetTop)}return{width:d,height:v,x:p,y:m}}(e,n);else if(t==="document")r=function(u){var c=Xa(u),l=qh(u),f=u.ownerDocument.body,h=kl(c.scrollWidth,c.clientWidth,f.scrollWidth,f.clientWidth),d=kl(c.scrollHeight,c.clientHeight,f.scrollHeight,f.clientHeight),v=-l.scrollLeft+sO(u),p=-l.scrollTop;return Go(f).direction==="rtl"&&(v+=kl(c.clientWidth,f.clientWidth)-h),{width:h,height:d,x:v,y:p}}(Xa(e));else if(vo(t))r=function(u,c){var l=Ws(u,!0,c==="fixed"),f=l.top+u.clientTop,h=l.left+u.clientLeft,d=Qo(u)?Xu(u):{x:1,y:1};return{width:u.clientWidth*d.x,height:u.clientHeight*d.y,x:h*d.x,y:f*d.y}}(t,n);else{var i=dt({},t);if(e0()){var o,a,s=$i(e);i.x-=((o=s.visualViewport)==null?void 0:o.offsetLeft)||0,i.y-=((a=s.visualViewport)==null?void 0:a.offsetTop)||0}r=i}return Qg(r)}function lO(e,t){return Qo(e)&&Go(e).position!=="fixed"?t?t(e):e.offsetParent:null}function fO(e,t){for(var n=$i(e),r=lO(e,t);r&&vH(r)&&Go(r).position==="static";)r=lO(r,t);return r&&(Za(r)==="html"||Za(r)==="body"&&Go(r).position==="static"&&!t0(r))?n:r||function(i){for(var o=jl(i);Qo(o)&&!n0(o);){if(t0(o))return o;o=jl(o)}return null}(e)||n}function pH(e,t,n){var r=Qo(t),i=Xa(t),o=Ws(e,!0,n==="fixed",t),a={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!=="fixed")if((Za(t)!=="body"||Wh(i))&&(a=qh(t)),Qo(t)){var u=Ws(t,!0);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else i&&(s.x=sO(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}var mH={getClippingRect:function(e){var t=e.element,n=e.boundary,r=e.rootBoundary,i=e.strategy,o=n==="clippingAncestors"?function(c,l){var f=l.get(c);if(f)return f;for(var h=Sl(c).filter(function(y){return vo(y)&&Za(y)!=="body"}),d=null,v=Go(c).position==="fixed",p=v?jl(c):c;vo(p)&&!n0(p);){var m=Go(p),g=t0(p);m.position==="fixed"?d=null:(v?g||d:g||m.position!=="static"||!d||!["absolute","fixed"].includes(d.position))?d=m:h=h.filter(function(y){return y!==p}),p=jl(p)}return l.set(c,h),h}(t,this._c):[].concat(n),a=[].concat(Oe(o),[r]),s=a[0],u=a.reduce(function(c,l){var f=cO(t,l,i);return c.top=kl(f.top,c.top),c.right=tO(f.right,c.right),c.bottom=tO(f.bottom,c.bottom),c.left=kl(f.left,c.left),c},cO(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){var t=e.rect,n=e.offsetParent,r=e.strategy,i=Qo(n),o=Xa(n);if(n===o)return t;var a={scrollLeft:0,scrollTop:0},s={x:1,y:1},u={x:0,y:0};if((i||!i&&r!=="fixed")&&((Za(n)!=="body"||Wh(o))&&(a=qh(n)),Qo(n))){var c=Ws(n);s=Xu(n),u.x=c.x+n.clientLeft,u.y=c.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+u.x,y:t.y*s.y-a.scrollTop*s.y+u.y}},isElement:vo,getDimensions:function(e){return Qo(e)?eO(e):e.getBoundingClientRect()},getOffsetParent:fO,getDocumentElement:Xa,getScale:Xu,getElementRects:function(e){var t=this;return Ee(Ft().mark(function n(){var r,i,o,a,s;return Ft().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return r=e.reference,i=e.floating,o=e.strategy,a=t.getOffsetParent||fO,s=t.getDimensions,u.t0=pH,u.t1=r,u.next=6,a(i);case 6:return u.t2=u.sent,u.t3=o,u.t4=(0,u.t0)(u.t1,u.t2,u.t3),u.t5=dt,u.t6={x:0,y:0},u.next=13,s(i);case 13:return u.t7=u.sent,u.t8=(0,u.t5)(u.t6,u.t7),u.abrupt("return",{reference:u.t4,floating:u.t8});case 16:case"end":return u.stop()}},n)}))()},getClientRects:function(e){return Array.from(e.getClientRects())},isRTL:function(e){return Go(e).direction==="rtl"}},gH=function(e,t,n){var r=new Map,i=dt({platform:mH},n),o=dt(dt({},i.platform),{},{_c:r});return rH(e,t,dt(dt({},i),{},{platform:o}))};function yH(e){var t,n,r={autoUpdate:!0},i=e,o=function(u){return dt(dt(dt({},r),e||{}),u||{})},a=function(u){t&&n&&(i=o(u),gH(t,n,i).then(function(c){var l;Object.assign(n.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),!((l=i)===null||l===void 0)&&l.onComputed&&i.onComputed(c)}))},s=function(u){xi(u.subscribe(function(c){t===void 0?(t=c,a()):(Object.assign(t,c),a())}))};return[function(u){if("subscribe"in u)return s(u),{};t=u,a()},function(u,c){var l;n=u,i=o(c),setTimeout(function(){return a(c)},0),a(c);var f=function(){l&&(l(),l=void 0)},h=function(){var d=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:i||{}).autoUpdate;if(f(),d!==!1)return function(v,p,m,g){g===void 0&&(g={});var y=g,b=y.ancestorScroll,w=b===void 0||b,j=y.ancestorResize,x=j===void 0||j,R=y.elementResize,M=R===void 0||R,E=y.animationFrame,N=E!==void 0&&E,A=w&&!N,L=A||x?[].concat(Oe(vo(v)?Sl(v):v.contextElement?Sl(v.contextElement):[]),Oe(Sl(p))):[];L.forEach(function(P){A&&P.addEventListener("scroll",m,{passive:!0}),x&&P.addEventListener("resize",m)});var W,O=null;if(M){var I=!0;O=new ResizeObserver(function(){I||m(),I=!1}),vo(v)&&!N&&O.observe(v),vo(v)||!v.contextElement||N||O.observe(v.contextElement),O.observe(p)}var q=N?Ws(v):null;return N&&function P(){var _=Ws(v);!q||_.x===q.x&&_.y===q.y&&_.width===q.width&&_.height===q.height||m(),q=_,W=requestAnimationFrame(P)}(),m(),function(){var P;L.forEach(function(_){A&&_.removeEventListener("scroll",m),x&&_.removeEventListener("resize",m)}),(P=O)==null||P.disconnect(),O=null,N&&cancelAnimationFrame(W)}}(t,n,function(){return a(i)},d===!0?{}:d)};return l=h(),{update:function(d){a(d),l=h(d)},destroy:function(){f()}}},a]}function bH(e){var t=e.loadOptions,n=e.filterText,r=e.items,i=e.multiple,o=e.value,a=e.itemId,s=e.groupBy,u=e.filterSelectedItems,c=e.itemFilter,l=e.convertStringItemsToObjects,f=e.filterGroupedItems,h=e.label;if(r&&t)return r;if(!r)return[];r&&r.length>0&&ee(r[0])!=="object"&&(r=l(r));var d=r.filter(function(v){var p=c(v[h],n,v);return p&&i&&o!=null&&o.length&&(p=!o.some(function(m){return!!u&&m[a]===v[a]})),p});return s&&(d=f(d)),d}function wH(e){return r0.apply(this,arguments)}function r0(){return r0=Ee(Ft().mark(function e(t){var n,r,i,o,a;return Ft().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return n=t.dispatch,r=t.loadOptions,i=t.convertStringItemsToObjects,o=t.filterText,s.next=3,r(o).catch(function(u){console.warn("svelte-select loadOptions error :>> ",u),n("error",{type:"loadOptions",details:u})});case 3:if(!(a=s.sent)||a.cancelled){s.next=7;break}return a?(a&&a.length>0&&ee(a[0])!=="object"&&(a=i(a)),n("loaded",{items:a})):a=[],s.abrupt("return",{filteredItems:a,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return s.stop()}},e)})),r0.apply(this,arguments)}function xH(e){Ae(e,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function kH(e){var t,n;return{c:function(){t=To("svg"),C(n=To("path"),"fill","currentColor"),C(n,"d",`M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747
|
|
3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0
|
|
1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502
|
|
0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0
|
|
0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z`),C(t,"width","100%"),C(t,"height","100%"),C(t,"viewBox","0 0 20 20"),C(t,"focusable","false"),C(t,"aria-hidden","true"),C(t,"class","svelte-qbd276")},m:function(r,i){ot(r,t,i),F(t,n)},p:It,i:It,o:It,d:function(r){r&&it(t)}}}var jH=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,null,kH,Sr,{},xH),i}return tt(n)}();function SH(e){Ae(e,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function CH(e){var t,n;return{c:function(){t=To("svg"),C(n=To("path"),"fill","currentColor"),C(n,"d",`M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124
|
|
l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z`),C(t,"width","100%"),C(t,"height","100%"),C(t,"viewBox","-2 -2 50 50"),C(t,"focusable","false"),C(t,"aria-hidden","true"),C(t,"role","presentation"),C(t,"class","svelte-whdbu1")},m:function(r,i){ot(r,t,i),F(t,n)},p:It,i:It,o:It,d:function(r){r&&it(t)}}}var Hh=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,null,CH,Sr,{},SH),i}return tt(n)}();function $H(e){Ae(e,"svelte-1p3nqvd",".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)}}")}function _H(e){var t,n;return{c:function(){t=To("svg"),C(n=To("circle"),"class","circle_path svelte-1p3nqvd"),C(n,"cx","50"),C(n,"cy","50"),C(n,"r","20"),C(n,"fill","none"),C(n,"stroke","currentColor"),C(n,"stroke-width","5"),C(n,"stroke-miterlimit","10"),C(t,"class","loading svelte-1p3nqvd"),C(t,"viewBox","25 25 50 50")},m:function(r,i){ot(r,t,i),F(t,n)},p:It,i:It,o:It,d:function(r){r&&it(t)}}}var OH=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,null,_H,Sr,{},$H),i}return tt(n)}();function MH(e){Ae(e,"svelte-apvs86",".svelte-select.svelte-apvs86.svelte-apvs86.svelte-apvs86{--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);--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-apvs86.svelte-apvs86.svelte-apvs86{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-apvs86.svelte-apvs86.svelte-apvs86:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86,.indicators.svelte-apvs86.svelte-apvs86.svelte-apvs86{display:flex;flex-shrink:0;align-items:center}.indicators.svelte-apvs86.svelte-apvs86.svelte-apvs86{position:var(--indicators-position);top:var(--indicators-top);right:var(--indicators-right);bottom:var(--indicators-bottom)}input.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86:not(.multi)>.value-container.svelte-apvs86>input.svelte-apvs86{width:100%;height:100%}input.svelte-apvs86.svelte-apvs86.svelte-apvs86::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-apvs86.svelte-apvs86.svelte-apvs86:focus{outline:none}.svelte-select.focused.svelte-apvs86.svelte-apvs86.svelte-apvs86{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-apvs86.svelte-apvs86.svelte-apvs86{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-apvs86 input.svelte-apvs86.svelte-apvs86::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86 .selected-item.svelte-apvs86.svelte-apvs86{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-apvs86.svelte-apvs86.svelte-apvs86:focus{outline:none}.hide-selected-item.svelte-apvs86.svelte-apvs86.svelte-apvs86{opacity:0}.icon.svelte-apvs86.svelte-apvs86.svelte-apvs86{display:flex;align-items:center;justify-content:center}.clear-select.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-apvs86 input.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-apvs86.svelte-apvs86.svelte-apvs86{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-apvs86.svelte-apvs86.svelte-apvs86{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-apvs86.svelte-apvs86.svelte-apvs86{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86{opacity:0;pointer-events:none}.list-group-title.svelte-apvs86.svelte-apvs86.svelte-apvs86{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)}.empty.svelte-apvs86.svelte-apvs86.svelte-apvs86{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-apvs86.svelte-apvs86.svelte-apvs86{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-apvs86.svelte-apvs86.svelte-apvs86{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-apvs86.svelte-apvs86.svelte-apvs86:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-apvs86.svelte-apvs86.svelte-apvs86{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-apvs86.svelte-apvs86.svelte-apvs86{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-apvs86.svelte-apvs86.svelte-apvs86:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-apvs86.svelte-apvs86.svelte-apvs86,.item.hover.item.not-selectable.svelte-apvs86.svelte-apvs86.svelte-apvs86,.item.active.item.not-selectable.svelte-apvs86.svelte-apvs86.svelte-apvs86,.item.not-selectable.svelte-apvs86.svelte-apvs86.svelte-apvs86:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-apvs86.svelte-apvs86.svelte-apvs86{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var EH=function(e){return{value:8&e[0]}},hO=function(e){return{value:e[3]}},AH=function(e){return{value:8&e[0]}},dO=function(e){return{value:e[3]}},PH=function(e){return{listOpen:64&e[0]}},vO=function(e){return{listOpen:e[6]}},TH=function(e){return{}},pO=function(e){return{}},RH=function(e){return{}},mO=function(e){return{}},NH=function(e){return{selection:8&e[0]}},gO=function(e){return{selection:e[3]}};function yO(e,t,n){var r=e.slice();return r[125]=t[n],r[127]=n,r}var IH=function(e){return{}},bO=function(e){return{}},DH=function(e){return{selection:8&e[0]}},wO=function(e){return{selection:e[125],index:e[127]}},LH=function(e){return{}},xO=function(e){return{}},BH=function(e){return{}},kO=function(e){return{}},zH=function(e){return{}},jO=function(e){return{}};function SO(e,t,n){var r=e.slice();return r[125]=t[n],r[127]=n,r}var FH=function(e){return{item:16777216&e[0]}},CO=function(e){return{item:e[125],index:e[127]}},VH=function(e){return{filteredItems:16777216&e[0]}},$O=function(e){return{filteredItems:e[24]}},WH=function(e){return{}},_O=function(e){return{}};function OO(e){var t,n,r,i,o,a,s,u,c=e[50]["list-prepend"]&&MO(e),l=[UH,HH,qH],f=[];function h(v,p){return v[50].list?0:v[24].length>0?1:v[19]?-1:2}~(r=h(e))&&(i=f[r]=l[r](e));var d=e[50]["list-append"]&&AO(e);return{c:function(){t=G("div"),c&&c.c(),n=vt(),i&&i.c(),o=vt(),d&&d.c(),C(t,"class","svelte-select-list svelte-apvs86"),At(t,"prefloat",e[28])},m:function(v,p){ot(v,t,p),c&&c.m(t,null),F(t,n),~r&&f[r].m(t,null),F(t,o),d&&d.m(t,null),e[90](t),a=!0,s||(u=[Nr(e[49].call(null,t)),Nt(t,"scroll",e[41]),Nt(t,"pointerup",Pa(xs(e[85])))],s=!0)},p:function(v,p){v[50]["list-prepend"]?c?(c.p(v,p),524288&p[1]&&T(c,1)):((c=MO(v)).c(),T(c,1),c.m(t,n)):c&&(Dt(),z(c,1,1,function(){c=null}),Lt());var m=r;(r=h(v))===m?~r&&f[r].p(v,p):(i&&(Dt(),z(f[m],1,1,function(){f[m]=null}),Lt()),~r?((i=f[r])?i.p(v,p):(i=f[r]=l[r](v)).c(),T(i,1),i.m(t,o)):i=null),v[50]["list-append"]?d?(d.p(v,p),524288&p[1]&&T(d,1)):((d=AO(v)).c(),T(d,1),d.m(t,null)):d&&(Dt(),z(d,1,1,function(){d=null}),Lt()),(!a||268435456&p[0])&&At(t,"prefloat",v[28])},i:function(v){a||(T(c),T(i),T(d),a=!0)},o:function(v){z(c),z(i),z(d),a=!1},d:function(v){v&&it(t),c&&c.d(),~r&&f[r].d(),d&&d.d(),e[90](null),s=!1,Mn(u)}}}function MO(e){var t,n=e[82]["list-prepend"],r=Zn(n,e,e[81],_O);return{c:function(){r&&r.c()},m:function(i,o){r&&r.m(i,o),t=!0},p:function(i,o){r&&r.p&&(!t||524288&o[2])&&tr(r,n,i,i[81],t?Xn(n,i[81],o,WH):er(i[81]),_O)},i:function(i){t||(T(r,i),t=!0)},o:function(i){z(r,i),t=!1},d:function(i){r&&r.d(i)}}}function qH(e){var t,n,r=e[82].empty,i=Zn(r,e,e[81],jO),o=i||{c:function(){(n=G("div")).textContent="No options",C(n,"class","empty svelte-apvs86")},m:function(a,s){ot(a,n,s)},p:It,d:function(a){a&&it(n)}};return{c:function(){o&&o.c()},m:function(a,s){o&&o.m(a,s),t=!0},p:function(a,s){i&&i.p&&(!t||524288&s[2])&&tr(i,r,a,a[81],t?Xn(r,a[81],s,zH):er(a[81]),jO)},i:function(a){t||(T(o,a),t=!0)},o:function(a){z(o,a),t=!1},d:function(a){o&&o.d(a)}}}function HH(e){for(var t,n,r=e[24],i=[],o=0;o<r.length;o+=1)i[o]=EO(SO(e,r,o));var a=function(s){return z(i[s],1,1,function(){i[s]=null})};return{c:function(){for(var s=0;s<i.length;s+=1)i[s].c();t=vn()},m:function(s,u){for(var c=0;c<i.length;c+=1)i[c]&&i[c].m(s,u);ot(s,t,u),n=!0},p:function(s,u){if(1627402376&u[0]|28672&u[1]|524288&u[2]){var c;for(r=s[24],c=0;c<r.length;c+=1){var l=SO(s,r,c);i[c]?(i[c].p(l,u),T(i[c],1)):(i[c]=EO(l),i[c].c(),T(i[c],1),i[c].m(t.parentNode,t))}for(Dt(),c=r.length;c<i.length;c+=1)a(c);Lt()}},i:function(s){if(!n){for(var u=0;u<r.length;u+=1)T(i[u]);n=!0}},o:function(s){i=i.filter(Boolean);for(var u=0;u<i.length;u+=1)z(i[u]);n=!1},d:function(s){ur(i,s),s&&it(t)}}}function UH(e){var t,n=e[82].list,r=Zn(n,e,e[81],$O);return{c:function(){r&&r.c()},m:function(i,o){r&&r.m(i,o),t=!0},p:function(i,o){r&&r.p&&(!t||16777216&o[0]|524288&o[2])&&tr(r,n,i,i[81],t?Xn(n,i[81],o,VH):er(i[81]),$O)},i:function(i){t||(T(r,i),t=!0)},o:function(i){z(r,i),t=!1},d:function(i){r&&r.d(i)}}}function EO(e){var t,n,r,i,o,a,s,u,c=e[82].item,l=Zn(c,e,e[81],CO),f=l||function(p){var m,g,y=((m=p[125])===null||m===void 0?void 0:m[p[12]])+"";return{c:function(){g=Jt(y)},m:function(b,w){ot(b,g,w)},p:function(b,w){var j;16781312&w[0]&&y!==(y=((j=b[125])===null||j===void 0?void 0:j[b[12]])+"")&&be(g,y)},d:function(b){b&&it(g)}}}(e);function h(){return e[87](e[127])}function d(){return e[88](e[127])}function v(){return e[89](e[125],e[127])}return{c:function(){var p;t=G("div"),n=G("div"),f&&f.c(),o=vt(),C(n,"class","item svelte-apvs86"),At(n,"list-group-title",e[125].groupHeader),At(n,"active",e[45](e[125],e[3],e[13])),At(n,"first",e[127]===0),At(n,"hover",e[7]===e[127]),At(n,"group-item",e[125].groupItem),At(n,"not-selectable",((p=e[125])===null||p===void 0?void 0:p.selectable)===!1),C(t,"class","list-item svelte-apvs86"),C(t,"tabindex","-1")},m:function(p,m){ot(p,t,m),F(t,n),f&&f.m(n,null),F(t,o),a=!0,s||(u=[Nr(r=e[46].call(null,n,{scroll:e[45](e[125],e[3],e[13]),listDom:e[30]})),Nr(i=e[47].call(null,n,{scroll:e[29]===e[127],listDom:e[30]})),Nt(t,"mouseover",h),Nt(t,"focus",d),Nt(t,"click",Pa(v)),Nt(t,"keydown",Pa(xs(e[86])))],s=!0)},p:function(p,m){var g;e=p,l?l.p&&(!a||16777216&m[0]|524288&m[2])&&tr(l,c,e,e[81],a?Xn(c,e[81],m,FH):er(e[81]),CO):f&&f.p&&(!a||16781312&m[0])&&f.p(e,a?m:[-1,-1,-1,-1,-1]),r&&Rr(r.update)&&1090527240&m[0]&&r.update.call(null,{scroll:e[45](e[125],e[3],e[13]),listDom:e[30]}),i&&Rr(i.update)&&1610612736&m[0]&&i.update.call(null,{scroll:e[29]===e[127],listDom:e[30]}),(!a||16777216&m[0])&&At(n,"list-group-title",e[125].groupHeader),(!a||16785416&m[0]|16384&m[1])&&At(n,"active",e[45](e[125],e[3],e[13])),(!a||128&m[0])&&At(n,"hover",e[7]===e[127]),(!a||16777216&m[0])&&At(n,"group-item",e[125].groupItem),(!a||16777216&m[0])&&At(n,"not-selectable",((g=e[125])===null||g===void 0?void 0:g.selectable)===!1)},i:function(p){a||(T(f,p),a=!0)},o:function(p){z(f,p),a=!1},d:function(p){p&&it(t),f&&f.d(p),s=!1,Mn(u)}}}function AO(e){var t,n=e[82]["list-append"],r=Zn(n,e,e[81],kO);return{c:function(){r&&r.c()},m:function(i,o){r&&r.m(i,o),t=!0},p:function(i,o){r&&r.p&&(!t||524288&o[2])&&tr(r,n,i,i[81],t?Xn(n,i[81],o,BH):er(i[81]),kO)},i:function(i){t||(T(r,i),t=!0)},o:function(i){z(r,i),t=!1},d:function(i){r&&r.d(i)}}}function PO(e){var t,n,r,i,o;return{c:function(){t=G("span"),n=Jt(e[32]),r=vt(),i=G("span"),o=Jt(e[31]),C(t,"id","aria-selection"),C(t,"class","svelte-apvs86"),C(i,"id","aria-context"),C(i,"class","svelte-apvs86")},m:function(a,s){ot(a,t,s),F(t,n),ot(a,r,s),ot(a,i,s),F(i,o)},p:function(a,s){2&s[1]&&be(n,a[32]),1&s[1]&&be(o,a[31])},d:function(a){a&&it(t),a&&it(r),a&&it(i)}}}function TO(e){var t,n,r,i,o=[KH,JH],a=[];function s(u,c){return u[9]?0:1}return t=s(e),n=a[t]=o[t](e),{c:function(){n.c(),r=vn()},m:function(u,c){a[t].m(u,c),ot(u,r,c),i=!0},p:function(u,c){var l=t;(t=s(u))===l?a[t].p(u,c):(Dt(),z(a[l],1,1,function(){a[l]=null}),Lt(),(n=a[t])?n.p(u,c):(n=a[t]=o[t](u)).c(),T(n,1),n.m(r.parentNode,r))},i:function(u){i||(T(n),i=!0)},o:function(u){z(n),i=!1},d:function(u){a[t].d(u),u&&it(r)}}}function JH(e){var t,n,r=e[82].selection,i=Zn(r,e,e[81],gO),o=i||function(a){var s,u=a[3][a[12]]+"";return{c:function(){s=Jt(u)},m:function(c,l){ot(c,s,l)},p:function(c,l){4104&l[0]&&u!==(u=c[3][c[12]]+"")&&be(s,u)},d:function(c){c&&it(s)}}}(e);return{c:function(){t=G("div"),o&&o.c(),C(t,"class","selected-item svelte-apvs86"),At(t,"hide-selected-item",e[35])},m:function(a,s){ot(a,t,s),o&&o.m(t,null),n=!0},p:function(a,s){i?i.p&&(!n||8&s[0]|524288&s[2])&&tr(i,r,a,a[81],n?Xn(r,a[81],s,NH):er(a[81]),gO):o&&o.p&&(!n||4104&s[0])&&o.p(a,n?s:[-1,-1,-1,-1,-1]),(!n||16&s[1])&&At(t,"hide-selected-item",a[35])},i:function(a){n||(T(o,a),n=!0)},o:function(a){z(o,a),n=!1},d:function(a){a&&it(t),o&&o.d(a)}}}function KH(e){for(var t,n,r=e[3],i=[],o=0;o<r.length;o+=1)i[o]=NO(yO(e,r,o));var a=function(s){return z(i[s],1,1,function(){i[s]=null})};return{c:function(){for(var s=0;s<i.length;s+=1)i[s].c();t=vn()},m:function(s,u){for(var c=0;c<i.length;c+=1)i[c]&&i[c].m(s,u);ot(s,t,u),n=!0},p:function(s,u){if(67116040&u[0]|32&u[1]|524288&u[2]){var c;for(r=s[3],c=0;c<r.length;c+=1){var l=yO(s,r,c);i[c]?(i[c].p(l,u),T(i[c],1)):(i[c]=NO(l),i[c].c(),T(i[c],1),i[c].m(t.parentNode,t))}for(Dt(),c=r.length;c<i.length;c+=1)a(c);Lt()}},i:function(s){if(!n){for(var u=0;u<r.length;u+=1)T(i[u]);n=!0}},o:function(s){i=i.filter(Boolean);for(var u=0;u<i.length;u+=1)z(i[u]);n=!1},d:function(s){ur(i,s),s&&it(t)}}}function RO(e){var t,n,r,i,o=e[82]["multi-clear-icon"],a=Zn(o,e,e[81],bO),s=a||function(c){var l,f;return l=new Hh({}),{c:function(){jt(l.$$.fragment)},m:function(h,d){xt(l,h,d),f=!0},i:function(h){f||(T(l.$$.fragment,h),f=!0)},o:function(h){z(l.$$.fragment,h),f=!1},d:function(h){kt(l,h)}}}();function u(){return e[91](e[127])}return{c:function(){t=G("div"),s&&s.c(),C(t,"class","multi-item-clear svelte-apvs86")},m:function(c,l){ot(c,t,l),s&&s.m(t,null),n=!0,r||(i=Nt(t,"pointerup",Pa(xs(u))),r=!0)},p:function(c,l){e=c,a&&a.p&&(!n||524288&l[2])&&tr(a,o,e,e[81],n?Xn(o,e[81],l,IH):er(e[81]),bO)},i:function(c){n||(T(s,c),n=!0)},o:function(c){z(s,c),n=!1},d:function(c){c&&it(t),s&&s.d(c),r=!1,i()}}}function NO(e){var t,n,r,i,o,a,s,u=e[82].selection,c=Zn(u,e,e[81],wO),l=c||function(d){var v,p=d[125][d[12]]+"";return{c:function(){v=Jt(p)},m:function(m,g){ot(m,v,g)},p:function(m,g){4104&g[0]&&p!==(p=m[125][m[12]]+"")&&be(v,p)},d:function(m){m&&it(v)}}}(e),f=!e[11]&&!e[10]&&Hh&&RO(e);function h(){return e[92](e[127])}return{c:function(){t=G("div"),n=G("span"),l&&l.c(),r=vt(),f&&f.c(),i=vt(),C(n,"class","multi-item-text svelte-apvs86"),C(t,"class","multi-item svelte-apvs86"),At(t,"active",e[26]===e[127]),At(t,"disabled",e[11])},m:function(d,v){ot(d,t,v),F(t,n),l&&l.m(n,null),F(t,r),f&&f.m(t,null),F(t,i),o=!0,a||(s=[Nt(t,"click",xs(h)),Nt(t,"keydown",Pa(xs(e[84])))],a=!0)},p:function(d,v){e=d,c?c.p&&(!o||8&v[0]|524288&v[2])&&tr(c,u,e,e[81],o?Xn(u,e[81],v,DH):er(e[81]),wO):l&&l.p&&(!o||4104&v[0])&&l.p(e,o?v:[-1,-1,-1,-1,-1]),e[11]||e[10]||!Hh?f&&(Dt(),z(f,1,1,function(){f=null}),Lt()):f?(f.p(e,v),3072&v[0]&&T(f,1)):((f=RO(e)).c(),T(f,1),f.m(t,i)),(!o||67108864&v[0])&&At(t,"active",e[26]===e[127]),(!o||2048&v[0])&&At(t,"disabled",e[11])},i:function(d){o||(T(l,d),T(f),o=!0)},o:function(d){z(l,d),z(f),o=!1},d:function(d){d&&it(t),l&&l.d(d),f&&f.d(),a=!1,Mn(s)}}}function IO(e){var t,n,r=e[82]["loading-icon"],i=Zn(r,e,e[81],mO),o=i||function(a){var s,u;return s=new OH({}),{c:function(){jt(s.$$.fragment)},m:function(c,l){xt(s,c,l),u=!0},i:function(c){u||(T(s.$$.fragment,c),u=!0)},o:function(c){z(s.$$.fragment,c),u=!1},d:function(c){kt(s,c)}}}();return{c:function(){t=G("div"),o&&o.c(),C(t,"class","icon loading svelte-apvs86"),C(t,"aria-hidden","true")},m:function(a,s){ot(a,t,s),o&&o.m(t,null),n=!0},p:function(a,s){i&&i.p&&(!n||524288&s[2])&&tr(i,r,a,a[81],n?Xn(r,a[81],s,RH):er(a[81]),mO)},i:function(a){n||(T(o,a),n=!0)},o:function(a){z(o,a),n=!1},d:function(a){a&&it(t),o&&o.d(a)}}}function DO(e){var t,n,r,i,o=e[82]["clear-icon"],a=Zn(o,e,e[81],pO),s=a||function(u){var c,l;return c=new Hh({}),{c:function(){jt(c.$$.fragment)},m:function(f,h){xt(c,f,h),l=!0},i:function(f){l||(T(c.$$.fragment,f),l=!0)},o:function(f){z(c.$$.fragment,f),l=!1},d:function(f){kt(c,f)}}}();return{c:function(){t=G("button"),s&&s.c(),C(t,"type","button"),C(t,"class","icon clear-select svelte-apvs86")},m:function(u,c){ot(u,t,c),s&&s.m(t,null),n=!0,r||(i=Nt(t,"click",e[22]),r=!0)},p:function(u,c){a&&a.p&&(!n||524288&c[2])&&tr(a,o,u,u[81],n?Xn(o,u[81],c,TH):er(u[81]),pO)},i:function(u){n||(T(s,u),n=!0)},o:function(u){z(s,u),n=!1},d:function(u){u&&it(t),s&&s.d(u),r=!1,i()}}}function LO(e){var t,n,r=e[82]["chevron-icon"],i=Zn(r,e,e[81],vO),o=i||function(a){var s,u;return s=new jH({}),{c:function(){jt(s.$$.fragment)},m:function(c,l){xt(s,c,l),u=!0},i:function(c){u||(T(s.$$.fragment,c),u=!0)},o:function(c){z(s.$$.fragment,c),u=!1},d:function(c){kt(s,c)}}}();return{c:function(){t=G("div"),o&&o.c(),C(t,"class","icon chevron svelte-apvs86"),C(t,"aria-hidden","true")},m:function(a,s){ot(a,t,s),o&&o.m(t,null),n=!0},p:function(a,s){i&&i.p&&(!n||64&s[0]|524288&s[2])&&tr(i,r,a,a[81],n?Xn(r,a[81],s,PH):er(a[81]),vO)},i:function(a){n||(T(o,a),n=!0)},o:function(a){z(o,a),n=!1},d:function(a){a&&it(t),o&&o.d(a)}}}function BO(e){var t,n,r=e[82].required,i=Zn(r,e,e[81],hO),o=i||{c:function(){C(n=G("select"),"class","required svelte-apvs86"),n.required=!0,C(n,"tabindex","-1"),C(n,"aria-hidden","true")},m:function(a,s){ot(a,n,s)},p:It,d:function(a){a&&it(n)}};return{c:function(){o&&o.c()},m:function(a,s){o&&o.m(a,s),t=!0},p:function(a,s){i&&i.p&&(!t||8&s[0]|524288&s[2])&&tr(i,r,a,a[81],t?Xn(r,a[81],s,EH):er(a[81]),hO)},i:function(a){t||(T(o,a),t=!0)},o:function(a){z(o,a),t=!1},d:function(a){o&&o.d(a)}}}function GH(e){for(var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j=e[6]&&OO(e),x=e[2]&&PO(e),R=e[82].prepend,M=Zn(R,e,e[81],xO),E=e[25]&&TO(e),N=[{readOnly:l=!e[17]},e[27],{placeholder:e[33]},{style:e[18]},{disabled:e[11]}],A={},L=0;L<N.length;L+=1)A=hi(A,N[L]);var W=e[5]&&IO(e),O=e[34]&&DO(e),I=e[20]&&LO(e),q=e[82]["input-hidden"],P=Zn(q,e,e[81],dO),_=P||function($){var D,B;return{c:function(){C(D=G("input"),"name",$[8]),C(D,"type","hidden"),D.value=B=$[3]?JSON.stringify($[3]):null,C(D,"class","svelte-apvs86")},m:function(k,H){ot(k,D,H)},p:function(k,H){256&H[0]&&C(D,"name",k[8]),8&H[0]&&B!==(B=k[3]?JSON.stringify(k[3]):null)&&(D.value=B)},d:function(k){k&&it(D)}}}(e),S=e[16]&&(!e[3]||e[3].length===0)&&BO(e);return{c:function(){t=G("div"),j&&j.c(),n=vt(),r=G("span"),x&&x.c(),i=vt(),o=G("div"),M&&M.c(),a=vt(),s=G("div"),E&&E.c(),u=vt(),c=G("input"),f=vt(),h=G("div"),W&&W.c(),d=vt(),O&&O.c(),v=vt(),I&&I.c(),p=vt(),_&&_.c(),m=vt(),S&&S.c(),C(r,"aria-live","polite"),C(r,"aria-atomic","false"),C(r,"aria-relevant","additions text"),C(r,"class","a11y-text svelte-apvs86"),C(o,"class","prepend svelte-apvs86"),Yj(c,A),At(c,"svelte-apvs86",!0),C(s,"class","value-container svelte-apvs86"),C(h,"class","indicators svelte-apvs86"),C(t,"class",g="svelte-select "+e[21]+" svelte-apvs86"),C(t,"style",e[14]),At(t,"multi",e[9]),At(t,"disabled",e[11]),At(t,"focused",e[2]),At(t,"list-open",e[6]),At(t,"show-chevron",e[20]),At(t,"error",e[15])},m:function($,D){ot($,t,D),j&&j.m(t,null),F(t,n),F(t,r),x&&x.m(r,null),F(t,i),F(t,o),M&&M.m(o,null),F(t,a),F(t,s),E&&E.m(s,null),F(s,u),F(s,c),c.autofocus&&c.focus(),e[93](c),Ta(c,e[4]),F(t,f),F(t,h),W&&W.m(h,null),F(h,d),O&&O.m(h,null),F(h,v),I&&I.m(h,null),F(t,p),_&&_.m(t,null),F(t,m),S&&S.m(t,null),e[95](t),y=!0,b||(w=[Nt(window,"click",e[42]),Nt(window,"keydown",e[37]),Nt(c,"keydown",e[37]),Nt(c,"blur",e[39]),Nt(c,"focus",e[38]),Nt(c,"input",e[94]),Nt(t,"pointerup",xs(e[40])),Nt(t,"mousedown",xs(e[83])),Nr(e[48].call(null,t))],b=!0)},p:function($,D){$[6]?j?(j.p($,D),64&D[0]&&T(j,1)):((j=OO($)).c(),T(j,1),j.m(t,n)):j&&(Dt(),z(j,1,1,function(){j=null}),Lt()),$[2]?x?x.p($,D):((x=PO($)).c(),x.m(r,null)):x&&(x.d(1),x=null),M&&M.p&&(!y||524288&D[2])&&tr(M,R,$,$[81],y?Xn(R,$[81],D,LH):er($[81]),xO),$[25]?E?(E.p($,D),33554432&D[0]&&T(E,1)):((E=TO($)).c(),T(E,1),E.m(s,u)):E&&(Dt(),z(E,1,1,function(){E=null}),Lt()),Yj(c,A=ha(N,[(!y||131072&D[0]&&l!==(l=!$[17]))&&{readOnly:l},134217728&D[0]&&$[27],(!y||4&D[1])&&{placeholder:$[33]},(!y||262144&D[0])&&{style:$[18]},(!y||2048&D[0])&&{disabled:$[11]}])),16&D[0]&&c.value!==$[4]&&Ta(c,$[4]),At(c,"svelte-apvs86",!0),$[5]?W?(W.p($,D),32&D[0]&&T(W,1)):((W=IO($)).c(),T(W,1),W.m(h,d)):W&&(Dt(),z(W,1,1,function(){W=null}),Lt()),$[34]?O?(O.p($,D),8&D[1]&&T(O,1)):((O=DO($)).c(),T(O,1),O.m(h,v)):O&&(Dt(),z(O,1,1,function(){O=null}),Lt()),$[20]?I?(I.p($,D),1048576&D[0]&&T(I,1)):((I=LO($)).c(),T(I,1),I.m(h,null)):I&&(Dt(),z(I,1,1,function(){I=null}),Lt()),P?P.p&&(!y||8&D[0]|524288&D[2])&&tr(P,q,$,$[81],y?Xn(q,$[81],D,AH):er($[81]),dO):_&&_.p&&(!y||264&D[0])&&_.p($,y?D:[-1,-1,-1,-1,-1]),!$[16]||$[3]&&$[3].length!==0?S&&(Dt(),z(S,1,1,function(){S=null}),Lt()):S?(S.p($,D),65544&D[0]&&T(S,1)):((S=BO($)).c(),T(S,1),S.m(t,null)),(!y||2097152&D[0]&&g!==(g="svelte-select "+$[21]+" svelte-apvs86"))&&C(t,"class",g),(!y||16384&D[0])&&C(t,"style",$[14]),(!y||2097664&D[0])&&At(t,"multi",$[9]),(!y||2099200&D[0])&&At(t,"disabled",$[11]),(!y||2097156&D[0])&&At(t,"focused",$[2]),(!y||2097216&D[0])&&At(t,"list-open",$[6]),(!y||3145728&D[0])&&At(t,"show-chevron",$[20]),(!y||2129920&D[0])&&At(t,"error",$[15])},i:function($){y||(T(j),T(M,$),T(E),T(W),T(O),T(I),T(_,$),T(S),y=!0)},o:function($){z(j),z(M,$),z(E),z(W),z(O),z(I),z(_,$),z(S),y=!1},d:function($){$&&it(t),j&&j.d(),x&&x.d(),M&&M.d($),E&&E.d(),e[93](null),W&&W.d(),O&&O.d(),I&&I.d(),_&&_.d($),S&&S.d(),e[95](null),b=!1,Mn(w)}}}function zO(e){return e.map(function(t,n){return{index:n,value:t,label:"".concat(t)}})}function QH(e,t,n){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b=t.$$slots,w=b===void 0?{}:b,j=t.$$scope,x=function(ht){var je={};for(var nn in ht)je[nn]=!0;return je}(w),R=e3(),M=t.justValue,E=M===void 0?null:M,N=t.filter,A=N===void 0?bH:N,L=t.getItems,W=L===void 0?wH:L,O=t.id,I=O===void 0?null:O,q=t.name,P=q===void 0?null:q,_=t.container,S=_===void 0?void 0:_,$=t.input,D=$===void 0?void 0:$,B=t.multiple,k=B!==void 0&&B,H=t.multiFullItemClearable,U=H!==void 0&&H,st=t.disabled,ut=st!==void 0&&st,gt=t.focused,St=gt!==void 0&>,Pt=t.value,pt=Pt===void 0?null:Pt,Bt=t.filterText,K=Bt===void 0?"":Bt,$t=t.placeholder,Kt=$t===void 0?"Please select":$t,Ct=t.placeholderAlwaysShow,V=Ct!==void 0&&Ct,Q=t.items,ft=Q===void 0?null:Q,wt=t.label,_t=wt===void 0?"label":wt,Ut=t.itemFilter,zt=Ut===void 0?function(ht,je,nn){return"".concat(ht).toLowerCase().includes(je.toLowerCase())}:Ut,$e=t.groupBy,qe=$e===void 0?void 0:$e,De=t.groupFilter,re=De===void 0?function(ht){return ht}:De,Ne=t.groupHeaderSelectable,Xe=Ne!==void 0&&Ne,Bn=t.itemId,ue=Bn===void 0?"value":Bn,_n=t.loadOptions,Qe=_n===void 0?void 0:_n,gn=t.containerStyles,ln=gn===void 0?"":gn,ir=t.hasError,or=ir!==void 0&&ir,ar=t.filterSelectedItems,zn=ar===void 0||ar,an=t.required,bt=an!==void 0&&an,ie=t.closeListOnChange,Le=ie===void 0||ie,yt=t.createGroupHeaderItem,Zt=yt===void 0?function(ht,je){return fi({value:ht},_t,ht)}:yt,Gt=t.searchable,fe=Gt===void 0||Gt,Nn=t.inputStyles,tn=Nn===void 0?"":Nn,Tr=t.clearable,Z=Tr===void 0||Tr,ct=t.loading,lt=ct!==void 0&&ct,rt=t.listOpen,Tt=rt!==void 0&&rt,te=t.debounce,ye=te===void 0?function(ht){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;clearTimeout(h),h=setTimeout(ht,je)}:te,en=t.debounceWait,ze=en===void 0?300:en,bn=t.hideEmptyState,On=bn!==void 0&&bn,Re=t.inputAttributes,dn=Re===void 0?{}:Re,nt=t.listAutoWidth,Et=nt===void 0||nt,Vt=t.showChevron,ne=Vt!==void 0&&Vt,oe=t.listOffset,Ie=oe===void 0?5:oe,Ye=t.hoverItemIndex,pe=Ye===void 0?0:Ye,me=t.floatingConfig,xe=me===void 0?{}:me,wn=t.class,xn=wn===void 0?"":wn;function kr(ht){var je=[],nn={};ht.forEach(function(Po){var jn=qe(Po);je.includes(jn)||(je.push(jn),nn[jn]=[],jn&&nn[jn].push(Object.assign(Zt(jn,Po),{id:jn,groupHeader:!0,selectable:Xe}))),nn[jn].push(Object.assign({groupItem:!!jn},Po))});var Mr=[];return re(je).forEach(function(Po){nn[Po]&&Mr.push.apply(Mr,Oe(nn[Po]))}),Mr}function Zi(){var ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,je=arguments.length>1?arguments[1]:void 0;n(7,pe=ht<0?0:ht),!je&&qe&&c[pe]&&!c[pe].selectable&&Vn(1)}function su(){var ht=!0;if(pt){var je=[],nn=[];pt.forEach(function(Mr){je.includes(Mr[ue])?ht=!1:(je.push(Mr[ue]),nn.push(Mr))}),ht||n(3,pt=nn)}return ht}function Ea(ht){var je=ht?ht[ue]:pt[ue];return ft.find(function(nn){return nn[ue]===je})}function ci(ht){return Pi.apply(this,arguments)}function Pi(){return Pi=Ee(Ft().mark(function ht(je){var nn;return Ft().wrap(function(Mr){for(;;)switch(Mr.prev=Mr.next){case 0:nn=pt[je],pt.length===1?n(3,pt=void 0):n(3,pt=pt.filter(function(Po){return Po!==nn})),R("clear",nn);case 3:case"end":return Mr.stop()}},ht)})),Pi.apply(this,arguments)}function Aa(ht){var je;St&&D===((je=document)===null||je===void 0?void 0:je.activeElement)||(ht&&R("focus",ht),D.focus(),n(2,St=!0))}function br(ht){return _o.apply(this,arguments)}function _o(){return _o=Ee(Ft().mark(function ht(je){return Ft().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(!_e){nn.next=2;break}return nn.abrupt("return");case 2:(Tt||St)&&(R("blur",je),Oo(),n(2,St=!1),n(26,d=void 0),D.blur());case 3:case"end":return nn.stop()}},ht)})),_o.apply(this,arguments)}function Oo(){n(4,K=""),n(6,Tt=!1)}y=Ee(Ft().mark(function ht(){return Ft().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:n(77,v=pt),n(78,p=K),n(79,m=k);case 3:case"end":return je.stop()}},ht)})),lu().$$.before_update.push(y),Ti(function(){Tt&&n(2,St=!0),St&&D&&D.focus()});var Jv=t.ariaValues,Y=Jv===void 0?function(ht){return"Option ".concat(ht,", selected.")}:Jv,mt=t.ariaListOpen,Rt=mt===void 0?function(ht,je){return"You are currently focused on option ".concat(ht,". There are ").concat(je," results available.")}:mt,Wt=t.ariaFocused,qt=Wt===void 0?function(){return"Select is focused, type to refine list, press down to open the menu."}:Wt,Yt,ve=null;function Me(){clearTimeout(Yt),Yt=setTimeout(function(){_e=!1},100)}xi(function(){var ht;(ht=ve)===null||ht===void 0||ht.remove()});var _e=!1;function Fn(ht){ht&&ht.selectable!==!1&&function(je){if(je){n(4,K="");var nn=Object.assign({},je);if(nn.groupHeader&&!nn.selectable)return;n(3,pt=k?pt?pt.concat([nn]):[nn]:n(3,pt=nn)),setTimeout(function(){Le&&Oo(),n(26,d=void 0),R("change",pt),R("select",je)})}}(ht)}function jr(ht){_e||n(7,pe=ht)}function sr(ht){var je=ht.item,nn=ht.i;if((je==null?void 0:je.selectable)!==!1)return pt&&!k&&pt[ue]===je[ue]?Oo():void(function(Mr){return Mr.groupHeader&&Mr.selectable||Mr.selectable||!Mr.hasOwnProperty("selectable")}(je)&&(n(7,pe=nn),Fn(je)))}function Vn(ht){if(c.filter(function(nn){return!Object.hasOwn(nn,"selectable")||nn.selectable===!0}).length===0)return n(7,pe=0);ht>0&&pe===c.length-1?n(7,pe=0):n(7,ht<0&&pe===0?pe=c.length-1:pe+=ht);var je=c[pe];je&&je.selectable===!1&&(ht!==1&&ht!==-1||Vn(ht))}var li=Mo,la=Mo;function Mo(ht){return{update:function(je){je.scroll&&(Me(),ht.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var kn={strategy:"absolute",placement:"bottom-start",middleware:[fH(Ie),lH(),dH()],autoUpdate:!1},wi=ke(yH(kn),3),Xi=wi[0],Eo=wi[1],Ao=wi[2],ws=!0;return e.$$set=function(ht){"justValue"in ht&&n(52,E=ht.justValue),"filter"in ht&&n(53,A=ht.filter),"getItems"in ht&&n(54,W=ht.getItems),"id"in ht&&n(55,I=ht.id),"name"in ht&&n(8,P=ht.name),"container"in ht&&n(0,S=ht.container),"input"in ht&&n(1,D=ht.input),"multiple"in ht&&n(9,k=ht.multiple),"multiFullItemClearable"in ht&&n(10,U=ht.multiFullItemClearable),"disabled"in ht&&n(11,ut=ht.disabled),"focused"in ht&&n(2,St=ht.focused),"value"in ht&&n(3,pt=ht.value),"filterText"in ht&&n(4,K=ht.filterText),"placeholder"in ht&&n(56,Kt=ht.placeholder),"placeholderAlwaysShow"in ht&&n(57,V=ht.placeholderAlwaysShow),"items"in ht&&n(51,ft=ht.items),"label"in ht&&n(12,_t=ht.label),"itemFilter"in ht&&n(58,zt=ht.itemFilter),"groupBy"in ht&&n(59,qe=ht.groupBy),"groupFilter"in ht&&n(60,re=ht.groupFilter),"groupHeaderSelectable"in ht&&n(61,Xe=ht.groupHeaderSelectable),"itemId"in ht&&n(13,ue=ht.itemId),"loadOptions"in ht&&n(62,Qe=ht.loadOptions),"containerStyles"in ht&&n(14,ln=ht.containerStyles),"hasError"in ht&&n(15,or=ht.hasError),"filterSelectedItems"in ht&&n(63,zn=ht.filterSelectedItems),"required"in ht&&n(16,bt=ht.required),"closeListOnChange"in ht&&n(64,Le=ht.closeListOnChange),"createGroupHeaderItem"in ht&&n(65,Zt=ht.createGroupHeaderItem),"searchable"in ht&&n(17,fe=ht.searchable),"inputStyles"in ht&&n(18,tn=ht.inputStyles),"clearable"in ht&&n(67,Z=ht.clearable),"loading"in ht&&n(5,lt=ht.loading),"listOpen"in ht&&n(6,Tt=ht.listOpen),"debounce"in ht&&n(68,ye=ht.debounce),"debounceWait"in ht&&n(69,ze=ht.debounceWait),"hideEmptyState"in ht&&n(19,On=ht.hideEmptyState),"inputAttributes"in ht&&n(70,dn=ht.inputAttributes),"listAutoWidth"in ht&&n(71,Et=ht.listAutoWidth),"showChevron"in ht&&n(20,ne=ht.showChevron),"listOffset"in ht&&n(72,Ie=ht.listOffset),"hoverItemIndex"in ht&&n(7,pe=ht.hoverItemIndex),"floatingConfig"in ht&&n(73,xe=ht.floatingConfig),"class"in ht&&n(21,xn=ht.class),"ariaValues"in ht&&n(74,Y=ht.ariaValues),"ariaListOpen"in ht&&n(75,Rt=ht.ariaListOpen),"ariaFocused"in ht&&n(76,qt=ht.ariaFocused),"$$scope"in ht&&n(81,j=ht.$$scope)},e.$$.update=function(){var ht,je,nn,Mr,Po;8&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&pt&&function(){if(typeof pt=="string"){var jn,Er=(ft||[]).find(function(to){return to[ue]===pt});n(3,pt=Er||(fi(jn={},ue,pt),fi(jn,"label",pt),jn))}else k&&Array.isArray(pt)&&pt.length>0&&n(3,pt=pt.map(function(to){return typeof to=="string"?{value:to,label:to}:to}))}(),131072&e.$$.dirty[0]|256&e.$$.dirty[2]&&(!dn&&fe||(n(27,g=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},dn)),I&&n(27,g.id=I,g),fe||n(27,g.readonly=!0,g))),512&e.$$.dirty[0]&&k&&pt&&(Array.isArray(pt)?n(3,pt=Oe(pt)):n(3,pt=[pt])),512&e.$$.dirty[0]|131072&e.$$.dirty[2]&&m&&!k&&pt&&n(3,pt=null),520&e.$$.dirty[0]&&k&&pt&&pt.length>1&&su(),8&e.$$.dirty[0]&&pt&&(k?JSON.stringify(pt)!==JSON.stringify(v)&&su()&&R("input",pt):v&&JSON.stringify(pt[ue])===JSON.stringify(v[ue])||R("input",pt)),520&e.$$.dirty[0]|32768&e.$$.dirty[2]&&!pt&&k&&v&&R("input",pt),6&e.$$.dirty[0]&&!St&&D&&Oo(),16&e.$$.dirty[0]|65536&e.$$.dirty[2]&&K!==p&&(Qe||K.length!==0)&&(Qe?ye(Ee(Ft().mark(function jn(){var Er;return Ft().wrap(function(to){for(;;)switch(to.prev=to.next){case 0:return n(5,lt=!0),to.next=3,W({dispatch:R,loadOptions:Qe,convertStringItemsToObjects:zO,filterText:K});case 3:(Er=to.sent)?(n(5,lt=Er.loading),n(6,Tt=Tt?Er.listOpen:K.length>0),n(2,St=Tt&&Er.focused),n(51,ft=qe?kr(Er.filteredItems):Er.filteredItems)):(n(5,lt=!1),n(2,St=!0),n(6,Tt=!0));case 5:case"end":return to.stop()}},jn)})),ze):(n(6,Tt=!0),k&&n(26,d=void 0))),12824&e.$$.dirty[0]|407896064&e.$$.dirty[1]|3&e.$$.dirty[2]&&n(24,c=A({loadOptions:Qe,filterText:K,items:ft,multiple:k,value:pt,itemId:ue,groupBy:qe,label:_t,filterSelectedItems:zn,itemFilter:zt,convertStringItemsToObjects:zO,filterGroupedItems:kr})),16777800&e.$$.dirty[0]&&!k&&Tt&&pt&&c&&(ht=c.findIndex(function(jn){return jn[ue]===pt[ue]}),Zi(ht,!0)),576&e.$$.dirty[0]&&Tt&&k&&n(7,pe=0),16&e.$$.dirty[0]&&K&&n(7,pe=0),128&e.$$.dirty[0]&&function(jn){R("hoverItem",jn)}(pe),520&e.$$.dirty[0]&&n(25,r=k?pt&&pt.length>0:pt),33554448&e.$$.dirty[0]&&n(35,i=r&&K.length>0),33556512&e.$$.dirty[0]|32&e.$$.dirty[2]&&n(34,o=r&&Z&&!ut&&!lt),520&e.$$.dirty[0]|100663296&e.$$.dirty[1]&&n(33,a=V&&k||k&&((je=pt)===null||je===void 0?void 0:je.length)===0?Kt:pt?"":Kt),520&e.$$.dirty[0]&&n(32,s=pt?(nn=void 0,nn=k&&pt.length>0?pt.map(function(jn){return jn[_t]}).join(", "):pt[_t],Y(nn)):""),16777412&e.$$.dirty[0]&&n(31,u=function(){if(!c||c.length===0)return"";var jn=c[pe];if(Tt&&jn){var Er=c?c.length:0;return Rt(jn[_t],Er)}return qt()}()),1048576&e.$$.dirty[1]&&function(jn){jn&&jn.length!==0&&!jn.some(function(Er){return ee(Er)!=="object"})&&pt&&(k?!pt.some(function(Er){return!Er||!Er[ue]}):pt[ue])&&(Array.isArray(pt)?n(3,pt=pt.map(function(Er){return Ea(Er)||Er})):n(3,pt=Ea()||pt))}(ft),8712&e.$$.dirty[0]&&n(52,E=k?pt?pt.map(function(jn){return jn[ue]}):null:pt&&pt[ue]),520&e.$$.dirty[0]|32768&e.$$.dirty[2]&&(k||!v||pt||R("input",pt)),16777800&e.$$.dirty[0]&&Tt&&c&&!k&&!pt&&Zi(),16777216&e.$$.dirty[0]&&function(jn){Tt&&R("filter",jn)}(c),1&e.$$.dirty[0]|2048&e.$$.dirty[2]&&S&&((Mr=xe)===null||Mr===void 0?void 0:Mr.autoUpdate)===void 0&&n(80,kn.autoUpdate=!0,kn),1&e.$$.dirty[0]|264192&e.$$.dirty[2]&&S&&xe&&Ao(Object.assign(kn,xe)),8388608&e.$$.dirty[0]&&n(30,l=!!ve),8388672&e.$$.dirty[0]&&function(jn,Er){if(!jn||!Er)return n(28,ws=!0);setTimeout(function(){n(28,ws=!1)},0)}(ve,Tt),8388673&e.$$.dirty[0]&&Tt&&S&&ve&&(Po=S.getBoundingClientRect().width,n(23,ve.style.width=Et?Po+"px":"auto",ve)),128&e.$$.dirty[0]&&n(29,f=pe),70&e.$$.dirty[0]&&D&&Tt&&!St&&Aa()},[S,D,St,pt,K,lt,Tt,pe,P,k,U,ut,_t,ue,ln,or,bt,fe,tn,On,ne,xn,function(){R("clear",pt),n(3,pt=void 0),Oo(),Aa()},ve,c,r,d,g,ws,f,l,u,s,a,o,i,ci,function(ht){if(St)switch(ht.stopPropagation(),ht.key){case"Escape":ht.preventDefault(),Oo();break;case"Enter":if(ht.preventDefault(),Tt){if(c.length===0)break;var je=c[pe];if(pt&&!k&&pt[ue]===je[ue]){Oo();break}Fn(c[pe])}break;case"ArrowDown":ht.preventDefault(),Tt?Vn(1):(n(6,Tt=!0),n(26,d=void 0));break;case"ArrowUp":ht.preventDefault(),Tt?Vn(-1):(n(6,Tt=!0),n(26,d=void 0));break;case"Tab":if(Tt&&St){if(c.length===0||pt&&pt[ue]===c[pe][ue])return Oo();ht.preventDefault(),Fn(c[pe]),Oo()}break;case"Backspace":if(!k||K.length>0)return;if(k&&pt&&pt.length>0){if(ci(d!==void 0?d:pt.length-1),d===0||d===void 0)break;n(26,d=pt.length>d?d-1:void 0)}break;case"ArrowLeft":if(!pt||!k||K.length>0)return;d===void 0?n(26,d=pt.length-1):pt.length>d&&d!==0&&n(26,d-=1);break;case"ArrowRight":if(!pt||!k||K.length>0||d===void 0)return;d===pt.length-1?n(26,d=void 0):d<pt.length-1&&n(26,d+=1)}},Aa,br,function(){ut||n(6,Tt=!Tt)},Me,function(ht){var je;Tt||St||!S||S.contains(ht.target)||(je=ve)!==null&&je!==void 0&&je.contains(ht.target)||br()},jr,sr,function(ht,je,nn){if(!k)return je&&je[nn]===ht[nn]},li,la,Xi,Eo,x,ft,E,A,W,I,Kt,V,zt,qe,re,Xe,Qe,zn,Le,Zt,function(){return c},Z,ye,ze,dn,Et,Ie,xe,Y,Rt,qt,v,p,m,kn,j,w,function(ht){bf.call(this,e,ht)},function(ht){bf.call(this,e,ht)},function(ht){bf.call(this,e,ht)},function(ht){bf.call(this,e,ht)},function(ht){return jr(ht)},function(ht){return jr(ht)},function(ht,je){return sr({item:ht,i:je})},function(ht){He[ht?"unshift":"push"](function(){n(23,ve=ht)})},function(ht){return ci(ht)},function(ht){return U?ci(ht):{}},function(ht){He[ht?"unshift":"push"](function(){n(1,D=ht)})},function(){K=this.value,n(4,K)},function(ht){He[ht?"unshift":"push"](function(){n(0,S=ht)})}]}var qs=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,QH,GH,Sr,{justValue:52,filter:53,getItems:54,id:55,name:8,container:0,input:1,multiple:9,multiFullItemClearable:10,disabled:11,focused:2,value:3,filterText:4,placeholder:56,placeholderAlwaysShow:57,items:51,label:12,itemFilter:58,groupBy:59,groupFilter:60,groupHeaderSelectable:61,itemId:13,loadOptions:62,containerStyles:14,hasError:15,filterSelectedItems:63,required:16,closeListOnChange:64,createGroupHeaderItem:65,getFilteredItems:66,searchable:17,inputStyles:18,clearable:67,loading:5,listOpen:6,debounce:68,debounceWait:69,hideEmptyState:19,inputAttributes:70,listAutoWidth:71,showChevron:20,listOffset:72,hoverItemIndex:7,floatingConfig:73,class:21,handleClear:22,ariaValues:74,ariaListOpen:75,ariaFocused:76},MH,[-1,-1,-1,-1,-1]),i}return tt(n,[{key:"getFilteredItems",get:function(){return this.$$.ctx[66]}},{key:"handleClear",get:function(){return this.$$.ctx[22]}}]),n}();function YH(e){Ae(e,"svelte-1kiph99","table.jse-transform-wizard.svelte-1kiph99.svelte-1kiph99{border-collapse:collapse;border-spacing:0;width:100%}table.jse-transform-wizard.svelte-1kiph99 input.svelte-1kiph99{font-family:inherit;font-size:inherit}table.jse-transform-wizard.svelte-1kiph99 tr th.svelte-1kiph99{font-weight:normal;text-align:left;width:60px}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99{width:100%;display:flex;flex-direction:row;margin-bottom:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select .multi-item{align-items:center}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select .value-container{gap:0 !important}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-filter-path{flex:4;margin-right:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-filter-relation{flex:1.5;margin-right:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-sort-path{flex:3;margin-right:calc(0.5 * var(--jse-padding))}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-sort-direction{flex:1}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select.jse-projection-paths{flex:1}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal.svelte-1kiph99 .svelte-select input{box-sizing:border-box}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal .jse-filter-value.svelte-1kiph99{flex:4;padding:4px 8px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);outline:none;background:var(--jse-input-background);color:inherit}table.jse-transform-wizard.svelte-1kiph99 tr td .jse-horizontal .jse-filter-value.svelte-1kiph99:focus{border:var(--jse-input-border-focus)}")}function ZH(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,W,O,I,q,P,_,S;function $(Pt){e[16](Pt)}var D={class:"jse-filter-path",showChevron:!0,items:e[7]};function B(Pt){e[17](Pt)}e[0]!==void 0&&(D.value=e[0]),s=new qs({props:D}),He.push(function(){return no(s,"value",$)});var k={class:"jse-filter-relation",showChevron:!0,items:e[8]};function H(Pt){e[19](Pt)}e[1]!==void 0&&(k.value=e[1]),l=new qs({props:k}),He.push(function(){return no(l,"value",B)});var U={class:"jse-sort-path",showChevron:!0,items:e[7]};function st(Pt){e[20](Pt)}e[3]!==void 0&&(U.value=e[3]),w=new qs({props:U}),He.push(function(){return no(w,"value",H)});var ut={class:"jse-sort-direction",showChevron:!0,items:e[9]};function gt(Pt){e[21](Pt)}e[4]!==void 0&&(ut.value=e[4]),R=new qs({props:ut}),He.push(function(){return no(R,"value",st)});var St={class:"jse-projection-paths",multiple:!0,showChevron:!0,items:e[6]};return e[5]!==void 0&&(St.value=e[5]),I=new qs({props:St}),He.push(function(){return no(I,"value",gt)}),{c:function(){t=G("table"),n=G("tr"),(r=G("th")).textContent="Filter",i=vt(),o=G("td"),a=G("div"),jt(s.$$.fragment),c=vt(),jt(l.$$.fragment),h=vt(),d=G("input"),v=vt(),p=G("tr"),(m=G("th")).textContent="Sort",g=vt(),y=G("td"),b=G("div"),jt(w.$$.fragment),x=vt(),jt(R.$$.fragment),E=vt(),N=G("tr"),(A=G("th")).textContent="Pick",L=vt(),W=G("td"),O=G("div"),jt(I.$$.fragment),C(r,"class","svelte-1kiph99"),C(d,"class","jse-filter-value svelte-1kiph99"),C(a,"class","jse-horizontal svelte-1kiph99"),C(m,"class","svelte-1kiph99"),C(b,"class","jse-horizontal svelte-1kiph99"),C(A,"class","svelte-1kiph99"),C(O,"class","jse-horizontal svelte-1kiph99"),C(t,"class","jse-transform-wizard svelte-1kiph99")},m:function(Pt,pt){ot(Pt,t,pt),F(t,n),F(n,r),F(n,i),F(n,o),F(o,a),xt(s,a,null),F(a,c),xt(l,a,null),F(a,h),F(a,d),Ta(d,e[2]),F(t,v),F(t,p),F(p,m),F(p,g),F(p,y),F(y,b),xt(w,b,null),F(b,x),xt(R,b,null),F(t,E),F(t,N),F(N,A),F(N,L),F(N,W),F(W,O),xt(I,O,null),P=!0,_||(S=Nt(d,"input",e[18]),_=!0)},p:function(Pt,pt){var Bt=ke(pt,1)[0],K={};128&Bt&&(K.items=Pt[7]),!u&&1&Bt&&(u=!0,K.value=Pt[0],eo(function(){return u=!1})),s.$set(K);var $t={};!f&&2&Bt&&(f=!0,$t.value=Pt[1],eo(function(){return f=!1})),l.$set($t),4&Bt&&d.value!==Pt[2]&&Ta(d,Pt[2]);var Kt={};128&Bt&&(Kt.items=Pt[7]),!j&&8&Bt&&(j=!0,Kt.value=Pt[3],eo(function(){return j=!1})),w.$set(Kt);var Ct={};!M&&16&Bt&&(M=!0,Ct.value=Pt[4],eo(function(){return M=!1})),R.$set(Ct);var V={};64&Bt&&(V.items=Pt[6]),!q&&32&Bt&&(q=!0,V.value=Pt[5],eo(function(){return q=!1})),I.$set(V)},i:function(Pt){P||(T(s.$$.fragment,Pt),T(l.$$.fragment,Pt),T(w.$$.fragment,Pt),T(R.$$.fragment,Pt),T(I.$$.fragment,Pt),P=!0)},o:function(Pt){z(s.$$.fragment,Pt),z(l.$$.fragment,Pt),z(w.$$.fragment,Pt),z(R.$$.fragment,Pt),z(I.$$.fragment,Pt),P=!1},d:function(Pt){Pt&&it(t),kt(s),kt(l),kt(w),kt(R),kt(I),_=!1,S()}}}function XH(e,t,n){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b=Dr("jsoneditor:TransformWizard"),w=t.json,j=t.queryOptions,x=j===void 0?{}:j,R=t.onChange,M=["==","!=","<","<=",">",">="].map(function(I){return{value:I,label:I}}),E=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],N=(r=x)!==null&&r!==void 0&&(i=r.filter)!==null&&i!==void 0&&i.path?hl(x.filter.path):null,A=(o=x)!==null&&o!==void 0&&(a=o.filter)!==null&&a!==void 0&&a.relation?M.find(function(I){var q;return I.value===((q=x.filter)===null||q===void 0?void 0:q.relation)}):null,L=((s=x)===null||s===void 0||(u=s.filter)===null||u===void 0?void 0:u.value)||"",W=(c=x)!==null&&c!==void 0&&(l=c.sort)!==null&&l!==void 0&&l.path?hl(x.sort.path):null,O=(f=x)!==null&&f!==void 0&&(h=f.sort)!==null&&h!==void 0&&h.direction?E.find(function(I){var q;return I.value===((q=x.sort)===null||q===void 0?void 0:q.direction)}):null;return e.$$set=function(I){"json"in I&&n(11,w=I.json),"queryOptions"in I&&n(10,x=I.queryOptions),"onChange"in I&&n(12,R=I.onChange)},e.$$.update=function(){var I,q,P,_,S,$,D,B,k,H,U,st,ut,gt,St,Pt,pt,Bt;2048&e.$$.dirty&&n(15,d=Array.isArray(w)),34816&e.$$.dirty&&n(14,v=d?kg(w):[]),34816&e.$$.dirty&&n(13,p=d?kg(w,!0):[]),16384&e.$$.dirty&&n(7,m=v.map(hl)),8192&e.$$.dirty&&n(6,g=p?p.map(hl):[]),1088&e.$$.dirty&&n(5,y=(I=x)!==null&&I!==void 0&&(q=I.projection)!==null&&q!==void 0&&q.paths&&g?x.projection.paths.map(function(K){return g.find(function($t){return rn($t.value,K)})}).filter(function(K){return!!K}):null),1&e.$$.dirty&&(_=((P=N)===null||P===void 0?void 0:P.value)||null,rn((S=x)===null||S===void 0||($=S.filter)===null||$===void 0?void 0:$.path,_)||(b("changeFilterPath",_),n(10,x=oo(x,["filter","path"],_,!0)),R(x))),2&e.$$.dirty&&(B=((D=A)===null||D===void 0?void 0:D.value)||null,rn((k=x)===null||k===void 0||(H=k.filter)===null||H===void 0?void 0:H.relation,B)||(b("changeFilterRelation",B),n(10,x=oo(x,["filter","relation"],B,!0)),R(x))),4&e.$$.dirty&&(U=L||null,rn((st=x)===null||st===void 0||(ut=st.filter)===null||ut===void 0?void 0:ut.value,U)||(b("changeFilterValue",U),n(10,x=oo(x,["filter","value"],U,!0)),R(x))),8&e.$$.dirty&&function(K){var $t,Kt;rn(($t=x)===null||$t===void 0||(Kt=$t.sort)===null||Kt===void 0?void 0:Kt.path,K)||(b("changeSortPath",K),n(10,x=oo(x,["sort","path"],K,!0)),R(x))}(((gt=W)===null||gt===void 0?void 0:gt.value)||null),16&e.$$.dirty&&(Pt=((St=O)===null||St===void 0?void 0:St.value)||null,rn((pt=x)===null||pt===void 0||(Bt=pt.sort)===null||Bt===void 0?void 0:Bt.direction,Pt)||(b("changeSortDirection",Pt),n(10,x=oo(x,["sort","direction"],Pt,!0)),R(x))),32&e.$$.dirty&&function(K){var $t,Kt;rn(($t=x)===null||$t===void 0||(Kt=$t.projection)===null||Kt===void 0?void 0:Kt.paths,K)||(b("changeProjectionPaths",K),n(10,x=oo(x,["projection","paths"],K,!0)),R(x))}(y?y.map(function(K){return K.value}):null)},[N,A,L,W,O,y,g,m,M,E,x,w,R,p,v,d,function(I){n(0,N=I)},function(I){n(1,A=I)},function(){L=this.value,n(2,L)},function(I){n(3,W=I)},function(I){n(4,O=I)},function(I){n(5,y=I),n(10,x),n(6,g),n(13,p),n(15,d),n(11,w)}]}var tU=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,XH,ZH,Be,{json:11,queryOptions:10,onChange:12},YH),i}return tt(n)}();function eU(e){Ae(e,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function FO(e,t,n){var r=e.slice();return r[5]=t[n],r}function nU(e){var t,n;return t=new on({props:{data:pl}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function rU(e){var t,n;return t=new on({props:{data:vl}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function VO(e){var t,n,r,i,o,a,s,u,c,l,f=e[5].name+"",h=[rU,nU],d=[];function v(m,g){return m[5].id===m[0]?0:1}function p(){return e[4](e[5])}return n=v(e),r=d[n]=h[n](e),{c:function(){t=G("button"),r.c(),i=vt(),o=Jt(f),a=vt(),C(t,"type","button"),C(t,"class","jse-query-language svelte-19cxesy"),C(t,"title",s="Select ".concat(e[5].name," as query language")),At(t,"selected",e[5].id===e[0])},m:function(m,g){ot(m,t,g),d[n].m(t,null),F(t,i),F(t,o),F(t,a),u=!0,c||(l=Nt(t,"click",p),c=!0)},p:function(m,g){var y=n;(n=v(e=m))===y?d[n].p(e,g):(Dt(),z(d[y],1,1,function(){d[y]=null}),Lt(),(r=d[n])?r.p(e,g):(r=d[n]=h[n](e)).c(),T(r,1),r.m(t,i)),(!u||2&g)&&f!==(f=e[5].name+"")&&be(o,f),(!u||2&g&&s!==(s="Select ".concat(e[5].name," as query language")))&&C(t,"title",s),(!u||3&g)&&At(t,"selected",e[5].id===e[0])},i:function(m){u||(T(r),u=!0)},o:function(m){z(r),u=!1},d:function(m){m&&it(t),d[n].d(),c=!1,l()}}}function iU(e){for(var t,n,r,i=e[1],o=[],a=0;a<i.length;a+=1)o[a]=VO(FO(e,i,a));var s=function(u){return z(o[u],1,1,function(){o[u]=null})};return{c:function(){t=G("div"),n=G("div");for(var u=0;u<o.length;u+=1)o[u].c();C(n,"class","jse-select-query-language-container svelte-19cxesy"),C(t,"class","jse-select-query-language svelte-19cxesy")},m:function(u,c){ot(u,t,c),F(t,n);for(var l=0;l<o.length;l+=1)o[l]&&o[l].m(n,null);r=!0},p:function(u,c){var l=ke(c,1)[0];if(7&l){var f;for(i=u[1],f=0;f<i.length;f+=1){var h=FO(u,i,f);o[f]?(o[f].p(h,l),T(o[f],1)):(o[f]=VO(h),o[f].c(),T(o[f],1),o[f].m(n,null))}for(Dt(),f=i.length;f<o.length;f+=1)s(f);Lt()}},i:function(u){if(!r){for(var c=0;c<i.length;c+=1)T(o[c]);r=!0}},o:function(u){o=o.filter(Boolean);for(var c=0;c<o.length;c+=1)z(o[c]);r=!1},d:function(u){u&&it(t),ur(o,u)}}}function oU(e,t,n){var r=t.queryLanguages,i=t.queryLanguageId,o=t.onChangeQueryLanguage;function a(s){n(0,i=s),o(s)}return e.$$set=function(s){"queryLanguages"in s&&n(1,r=s.queryLanguages),"queryLanguageId"in s&&n(0,i=s.queryLanguageId),"onChangeQueryLanguage"in s&&n(3,o=s.onChangeQueryLanguage)},[i,r,a,o,function(s){return a(s.id)}]}var aU=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,oU,iU,Sr,{queryLanguages:1,queryLanguageId:0,onChangeQueryLanguage:3},eU),i}return tt(n)}();function sU(e){Ae(e,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function WO(e){var t,n,r,i,o;return n=new on({props:{data:Zq}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-config svelte-d01h2s"),C(t,"title","Select a query language")},m:function(a,s){ot(a,t,s),xt(n,t,null),e[6](t),r=!0,i||(o=Nt(t,"click",e[3]),i=!0)},p:It,i:function(a){r||(T(n.$$.fragment,a),r=!0)},o:function(a){z(n.$$.fragment,a),r=!1},d:function(a){a&&it(t),kt(n),e[6](null),i=!1,o()}}}function uU(e){var t,n,r,i,o,a,s,u,c,l=e[0].length>1&&WO(e);return a=new on({props:{data:Zu}}),{c:function(){t=G("div"),(n=G("div")).textContent="Transform",r=vt(),l&&l.c(),i=vt(),o=G("button"),jt(a.$$.fragment),C(n,"class","jse-title svelte-d01h2s"),C(o,"type","button"),C(o,"class","jse-close svelte-d01h2s"),C(t,"class","jse-header svelte-d01h2s")},m:function(f,h){ot(f,t,h),F(t,n),F(t,r),l&&l.m(t,null),F(t,i),F(t,o),xt(a,o,null),s=!0,u||(c=Nt(o,"click",e[2]),u=!0)},p:function(f,h){var d=ke(h,1)[0];f[0].length>1?l?(l.p(f,d),1&d&&T(l,1)):((l=WO(f)).c(),T(l,1),l.m(t,i)):l&&(Dt(),z(l,1,1,function(){l=null}),Lt())},i:function(f){s||(T(l),T(a.$$.fragment,f),s=!0)},o:function(f){z(l),z(a.$$.fragment,f),s=!1},d:function(f){f&&it(t),l&&l.d(),kt(a),u=!1,c()}}}function cU(e,t,n){var r,i,o=t.queryLanguages,a=t.queryLanguageId,s=t.onChangeQueryLanguage,u=Ir("simple-modal").close,c=Ir("absolute-popup"),l=c.openAbsolutePopup,f=c.closeAbsolutePopup;return e.$$set=function(h){"queryLanguages"in h&&n(0,o=h.queryLanguages),"queryLanguageId"in h&&n(4,a=h.queryLanguageId),"onChangeQueryLanguage"in h&&n(5,s=h.onChangeQueryLanguage)},[o,r,u,function(){i=l(aU,{queryLanguages:o,queryLanguageId:a,onChangeQueryLanguage:function(h){f(i),s(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:r,closeOnOuterClick:!0})},a,s,function(h){He[h?"unshift":"push"](function(){n(1,r=h)})}]}var lU=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,cU,uU,Be,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},sU),i}return tt(n)}(),i0=Dr("jsoneditor:AutoScrollHandler"),fU=function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},qO=function(){var e,t,n,r,i,o,a,s,u,c,l,f,h;function d(m){return m.getBoundingClientRect().top-(e.getBoundingClientRect?e.getBoundingClientRect().top:0)+n}function v(m){e.scrollTo?e.scrollTo(e.scrollLeft,m):e.scrollTop=m}function p(m){c||(c=m),v(o(l=m-c,n,s,u)),h=!0,l<u?requestAnimationFrame(p):function(){v(n+s),t&&a&&(t.setAttribute("tabindex","-1"),t.focus()),typeof f=="function"&&f(),c=0,h=!1}()}return function(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(u=1e3,i=g.offset||0,f=g.callback,o=g.easing||fU,a=g.a11y||!1,ee(g.container)){case"object":e=g.container;break;case"string":e=document.querySelector(g.container);break;default:e=window.document.documentElement}switch(n=e.scrollTop,ee(m)){case"number":t=void 0,a=!1,r=n+m;break;case"object":r=d(t=m);break;case"string":t=document.querySelector(m),r=d(t)}switch(s=r-n+i,ee(g.duration)){case"number":u=g.duration;break;case"function":u=g.duration(s)}h?c=0:requestAnimationFrame(p)}},hU=1e3,Uh=Dr("jsoneditor:History");function HO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.maxItems||hU,n=[],r=0;function i(){return r<n.length}function o(){return r>0}function a(){return{canUndo:i(),canRedo:o(),length:n.length}}function s(){e.onChange&&e.onChange(a())}return{add:function(u){Uh("add",u),n=[u].concat(n.slice(r)).slice(0,t),r=0,s()},clear:function(){Uh("clear"),n=[],r=0,s()},getState:a,undo:function(){if(i()){var u=n[r];return r+=1,Uh("undo",u),s(),u}},redo:function(){if(o())return Uh("redo",n[r-=1]),s(),n[r]}}}function tc(e,t){var n=Date.now(),r=e();return t(Date.now()-n),r}var ec=Dr("validation");function UO(e,t,n,r){return ec("validateJSON"),t?t(n!==r?r.parse(n.stringify(e)):e):[]}function dU(e,t,n,r){if(ec("validateText"),e.length>nI)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:No.info}]};if(e.length===0)return null;try{var i=tc(function(){return n.parse(e)},function(u){return ec("validate: parsed json in ".concat(u," ms"))});if(!t)return null;var o=n===r?i:tc(function(){return r.parse(e)},function(u){return ec("validate: parsed json with the validationParser in ".concat(u," ms"))}),a=tc(function(){return t(o)},function(u){return ec("validate: validated json in ".concat(u," ms"))});return Ue(a)?null:{validationErrors:a}}catch(u){var s=tc(function(){return function(c,l){if(c.length>rI)return!1;try{return l.parse(Io(c)),!0}catch(f){return!1}}(e,n)},function(c){return ec("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:Du(e,u.message||u.toString()),isRepairable:s}}}var Jh=Dr("jsoneditor:FocusTracker");function o0(e){var t,n=e.onMount,r=e.onDestroy,i=e.getWindow,o=e.hasFocus,a=e.onFocus,s=e.onBlur,u=!1;function c(){var f=o();f&&(clearTimeout(t),u||(Jh("focus"),a(),u=f))}function l(){u&&(clearTimeout(t),t=setTimeout(function(){Jh("blur"),u=!1,s()}))}n(function(){Jh("mount FocusTracker");var f=i();f&&(f.addEventListener("focusin",c,!0),f.addEventListener("focusout",l,!0))}),r(function(){Jh("destroy FocusTracker");var f=i();f&&(f.removeEventListener("focusin",c,!0),f.removeEventListener("focusout",l,!0))})}function vU(e){Ae(e,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function JO(e,t,n){var r=e.slice();return r[9]=t[n],r}function KO(e){var t,n;return t=new on({props:{data:e[1]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};2&i&&(o.data=r[1]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function GO(e){var t,n;return t=new on({props:{data:e[9].icon}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};8&i&&(o.data=r[9].icon),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function QO(e){var t,n,r,i,o,a,s,u,c,l=e[9].text+"",f=e[9].icon&&GO(e);function h(){return e[7](e[9])}function d(){return e[8](e[9])}return{c:function(){t=G("button"),f&&f.c(),n=vt(),r=Jt(l),i=vt(),C(t,"type","button"),C(t,"class","jse-button jse-action jse-primary svelte-fqu1ku"),C(t,"title",o=e[9].title),t.disabled=a=e[9].disabled},m:function(v,p){ot(v,t,p),f&&f.m(t,null),F(t,n),F(t,r),F(t,i),s=!0,u||(c=[Nt(t,"click",h),Nt(t,"mousedown",d)],u=!0)},p:function(v,p){(e=v)[9].icon?f?(f.p(e,p),8&p&&T(f,1)):((f=GO(e)).c(),T(f,1),f.m(t,n)):f&&(Dt(),z(f,1,1,function(){f=null}),Lt()),(!s||8&p)&&l!==(l=e[9].text+"")&&be(r,l),(!s||8&p&&o!==(o=e[9].title))&&C(t,"title",o),(!s||8&p&&a!==(a=e[9].disabled))&&(t.disabled=a)},i:function(v){s||(T(f),s=!0)},o:function(v){z(f),s=!1},d:function(v){v&&it(t),f&&f.d(),u=!1,Mn(c)}}}function pU(e){for(var t,n,r,i,o,a,s,u,c,l,f,h=e[1]&&KO(e),d=e[3],v=[],p=0;p<d.length;p+=1)v[p]=QO(JO(e,d,p));var m=function(g){return z(v[g],1,1,function(){v[g]=null})};return{c:function(){t=G("div"),n=G("div"),r=G("div"),h&&h.c(),i=vt(),o=Jt(e[2]),a=vt(),s=G("div");for(var g=0;g<v.length;g+=1)v[g].c();C(r,"class","jse-text-centered"),C(n,"class","jse-text svelte-fqu1ku"),At(n,"jse-clickable",!!e[4]),C(s,"class","jse-actions svelte-fqu1ku"),C(t,"class",u="jse-message jse-"+e[0]+" svelte-fqu1ku")},m:function(g,y){ot(g,t,y),F(t,n),F(n,r),h&&h.m(r,null),F(r,i),F(r,o),F(t,a),F(t,s);for(var b=0;b<v.length;b+=1)v[b]&&v[b].m(s,null);c=!0,l||(f=Nt(n,"click",e[5]),l=!0)},p:function(g,y){var b=ke(y,1)[0];if(g[1]?h?(h.p(g,b),2&b&&T(h,1)):((h=KO(g)).c(),T(h,1),h.m(r,i)):h&&(Dt(),z(h,1,1,function(){h=null}),Lt()),(!c||4&b)&&be(o,g[2]),(!c||16&b)&&At(n,"jse-clickable",!!g[4]),8&b){var w;for(d=g[3],w=0;w<d.length;w+=1){var j=JO(g,d,w);v[w]?(v[w].p(j,b),T(v[w],1)):(v[w]=QO(j),v[w].c(),T(v[w],1),v[w].m(s,null))}for(Dt(),w=d.length;w<v.length;w+=1)m(w);Lt()}(!c||1&b&&u!==(u="jse-message jse-"+g[0]+" svelte-fqu1ku"))&&C(t,"class",u)},i:function(g){if(!c){T(h);for(var y=0;y<d.length;y+=1)T(v[y]);c=!0}},o:function(g){z(h),v=v.filter(Boolean);for(var y=0;y<v.length;y+=1)z(v[y]);c=!1},d:function(g){g&&it(t),h&&h.d(),ur(v,g),l=!1,f()}}}function mU(e,t,n){var r=t.type,i=r===void 0?"success":r,o=t.icon,a=o===void 0?void 0:o,s=t.message,u=s===void 0?void 0:s,c=t.actions,l=c===void 0?[]:c,f=t.onClick,h=f===void 0?void 0:f,d=t.onClose,v=d===void 0?void 0:d;return v&&xi(v),e.$$set=function(p){"type"in p&&n(0,i=p.type),"icon"in p&&n(1,a=p.icon),"message"in p&&n(2,u=p.message),"actions"in p&&n(3,l=p.actions),"onClick"in p&&n(4,h=p.onClick),"onClose"in p&&n(6,v=p.onClose)},[i,a,u,l,h,function(){h&&h()},v,function(p){p.onClick&&p.onClick()},function(p){p.onMouseDown&&p.onMouseDown()}]}var po=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,mU,pU,Be,{type:0,icon:1,message:2,actions:3,onClick:4,onClose:6},vU),i}return tt(n)}();function gU(e){Ae(e,"svelte-1oe8e8r",".jse-validation-errors-overview.svelte-1oe8e8r.svelte-1oe8e8r{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-message-warning-background);color:var(--jse-message-warning-color);overflow:auto;max-height:25%}.jse-validation-errors-overview.svelte-1oe8e8r table.svelte-1oe8e8r{border-collapse:collapse;width:100%}.jse-validation-errors-overview.svelte-1oe8e8r table tr.svelte-1oe8e8r{cursor:pointer}.jse-validation-errors-overview.svelte-1oe8e8r table tr.svelte-1oe8e8r:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.svelte-1oe8e8r{padding:4px var(--jse-padding);vertical-align:middle}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-icon.svelte-1oe8e8r{width:36px;box-sizing:border-box}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action.svelte-1oe8e8r{width:36px;box-sizing:border-box;padding:0}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action button.jse-validation-errors-collapse.svelte-1oe8e8r{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:36px;height:26px;cursor:pointer}.jse-validation-errors-overview.svelte-1oe8e8r table tr td.jse-validation-error-action button.jse-validation-errors-collapse.svelte-1oe8e8r:hover{background-color:rgba(255, 255, 255, 0.2)}.jse-validation-errors-overview.svelte-1oe8e8r table tr td div.jse-validation-errors-expand.svelte-1oe8e8r{display:inline-block;position:relative;top:3px}")}function YO(e,t,n){var r=e.slice();return r[7]=t[n],r[9]=n,r}function ZO(e){var t,n,r,i,o=[bU,yU],a=[];function s(u,c){return u[2]||u[3]===1?0:1}return n=s(e),r=a[n]=o[n](e),{c:function(){t=G("div"),r.c(),C(t,"class","jse-validation-errors-overview svelte-1oe8e8r")},m:function(u,c){ot(u,t,c),a[n].m(t,null),i=!0},p:function(u,c){var l=n;(n=s(u))===l?a[n].p(u,c):(Dt(),z(a[l],1,1,function(){a[l]=null}),Lt(),(r=a[n])?r.p(u,c):(r=a[n]=o[n](u)).c(),T(r,1),r.m(t,null))},i:function(u){i||(T(r),i=!0)},o:function(u){z(r),i=!1},d:function(u){u&&it(t),a[n].d()}}}function yU(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v;return o=new on({props:{data:Fs}}),f=new on({props:{data:q_}}),{c:function(){t=G("table"),n=G("tbody"),r=G("tr"),i=G("td"),jt(o.$$.fragment),a=vt(),s=G("td"),u=Jt(e[3]),c=Jt(` validation errors
|
|
`),l=G("div"),jt(f.$$.fragment),C(i,"class","jse-validation-error-icon svelte-1oe8e8r"),C(l,"class","jse-validation-errors-expand svelte-1oe8e8r"),C(s,"class","svelte-1oe8e8r"),C(r,"class","jse-validation-error svelte-1oe8e8r"),C(t,"class","svelte-1oe8e8r")},m:function(p,m){ot(p,t,m),F(t,n),F(n,r),F(r,i),xt(o,i,null),F(r,a),F(r,s),F(s,u),F(s,c),F(s,l),xt(f,l,null),h=!0,d||(v=Nt(r,"click",e[5]),d=!0)},p:function(p,m){(!h||8&m)&&be(u,p[3])},i:function(p){h||(T(o.$$.fragment,p),T(f.$$.fragment,p),h=!0)},o:function(p){z(o.$$.fragment,p),z(f.$$.fragment,p),h=!1},d:function(p){p&&it(t),kt(o),kt(f),d=!1,v()}}}function bU(e){for(var t,n,r,i,o=jh(e[0],vu),a=[],s=0;s<o.length;s+=1)a[s]=tM(YO(e,o,s));var u=function(l){return z(a[l],1,1,function(){a[l]=null})},c=e[3]>vu&&eM(e);return{c:function(){t=G("table"),n=G("tbody");for(var l=0;l<a.length;l+=1)a[l].c();r=vt(),c&&c.c(),C(t,"class","svelte-1oe8e8r")},m:function(l,f){ot(l,t,f),F(t,n);for(var h=0;h<a.length;h+=1)a[h]&&a[h].m(n,null);F(n,r),c&&c.m(n,null),i=!0},p:function(l,f){if(19&f){var h;for(o=jh(l[0],vu),h=0;h<o.length;h+=1){var d=YO(l,o,h);a[h]?(a[h].p(d,f),T(a[h],1)):(a[h]=tM(d),a[h].c(),T(a[h],1),a[h].m(n,r))}for(Dt(),h=o.length;h<a.length;h+=1)u(h);Lt()}l[3]>vu?c?c.p(l,f):((c=eM(l)).c(),c.m(n,null)):c&&(c.d(1),c=null)},i:function(l){if(!i){for(var f=0;f<o.length;f+=1)T(a[f]);i=!0}},o:function(l){a=a.filter(Boolean);for(var f=0;f<a.length;f+=1)z(a[f]);i=!1},d:function(l){l&&it(t),ur(a,l),c&&c.d()}}}function XO(e){var t,n,r,i,o;return n=new on({props:{data:Xq}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-validation-errors-collapse svelte-1oe8e8r"),C(t,"title","Collapse validation errors")},m:function(a,s){ot(a,t,s),xt(n,t,null),r=!0,i||(o=Nt(t,"click",Pa(e[4])),i=!0)},p:It,i:function(a){r||(T(n.$$.fragment,a),r=!0)},o:function(a){z(n.$$.fragment,a),r=!1},d:function(a){a&&it(t),kt(n),i=!1,o()}}}function tM(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p=pi(e[7].path)+"",m=e[7].message+"";r=new on({props:{data:Fs}});var g=e[9]===0&&e[0].length>1&&XO(e);function y(){return e[6](e[7])}return{c:function(){t=G("tr"),n=G("td"),jt(r.$$.fragment),i=vt(),o=G("td"),a=Jt(p),s=vt(),u=G("td"),c=Jt(m),l=vt(),f=G("td"),g&&g.c(),C(n,"class","jse-validation-error-icon svelte-1oe8e8r"),C(o,"class","svelte-1oe8e8r"),C(u,"class","svelte-1oe8e8r"),C(f,"class","jse-validation-error-action svelte-1oe8e8r"),C(t,"class","jse-validation-error svelte-1oe8e8r")},m:function(b,w){ot(b,t,w),F(t,n),xt(r,n,null),F(t,i),F(t,o),F(o,a),F(t,s),F(t,u),F(u,c),F(t,l),F(t,f),g&&g.m(f,null),h=!0,d||(v=Nt(t,"click",y),d=!0)},p:function(b,w){e=b,(!h||1&w)&&p!==(p=pi(e[7].path)+"")&&be(a,p),(!h||1&w)&&m!==(m=e[7].message+"")&&be(c,m),e[9]===0&&e[0].length>1?g?(g.p(e,w),1&w&&T(g,1)):((g=XO(e)).c(),T(g,1),g.m(f,null)):g&&(Dt(),z(g,1,1,function(){g=null}),Lt())},i:function(b){h||(T(r.$$.fragment,b),T(g),h=!0)},o:function(b){z(r.$$.fragment,b),z(g),h=!1},d:function(b){b&&it(t),kt(r),g&&g.d(),d=!1,v()}}}function eM(e){var t,n,r,i,o,a,s,u,c,l,f,h=e[3]-vu+"";return{c:function(){t=G("tr"),n=G("td"),r=vt(),i=G("td"),o=vt(),a=G("td"),s=Jt("(and "),u=Jt(h),c=Jt(" more errors)"),l=vt(),f=G("td"),C(n,"class","svelte-1oe8e8r"),C(i,"class","svelte-1oe8e8r"),C(a,"class","svelte-1oe8e8r"),C(f,"class","svelte-1oe8e8r"),C(t,"class","jse-validation-error svelte-1oe8e8r")},m:function(d,v){ot(d,t,v),F(t,n),F(t,r),F(t,i),F(t,o),F(t,a),F(a,s),F(a,u),F(a,c),F(t,l),F(t,f)},p:function(d,v){8&v&&h!==(h=d[3]-vu+"")&&be(u,h)},d:function(d){d&&it(t)}}}function wU(e){var t,n,r=!Ue(e[0]),i=r&&ZO(e);return{c:function(){i&&i.c(),t=vn()},m:function(o,a){i&&i.m(o,a),ot(o,t,a),n=!0},p:function(o,a){var s=ke(a,1)[0];1&s&&(r=!Ue(o[0])),r?i?(i.p(o,s),1&s&&T(i,1)):((i=ZO(o)).c(),T(i,1),i.m(t.parentNode,t)):i&&(Dt(),z(i,1,1,function(){i=null}),Lt())},i:function(o){n||(T(i),n=!0)},o:function(o){z(i),n=!1},d:function(o){i&&i.d(o),o&&it(t)}}}function xU(e,t,n){var r,i=t.validationErrors,o=t.selectError,a=!0;return e.$$set=function(s){"validationErrors"in s&&n(0,i=s.validationErrors),"selectError"in s&&n(1,o=s.selectError)},e.$$.update=function(){1&e.$$.dirty&&n(3,r=i.length)},[i,o,a,r,function(){n(2,a=!1)},function(){n(2,a=!0)},function(s){setTimeout(function(){return o(s)})}]}var a0=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,xU,wU,Be,{validationErrors:0,selectError:1},gU),i}return tt(n)}(),kU=typeof navigator!="undefined"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function jU(e){Ae(e,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function SU(e){var t,n,r,i,o,a,s,u,c;return a=new on({props:{data:Zu}}),{c:function(){t=G("div"),n=G("div"),r=Jt(e[0]),i=vt(),o=G("button"),jt(a.$$.fragment),C(n,"class","jse-title svelte-d01h2s"),C(o,"type","button"),C(o,"class","jse-close svelte-d01h2s"),C(t,"class","jse-header svelte-d01h2s")},m:function(l,f){ot(l,t,f),F(t,n),F(n,r),F(t,i),F(t,o),xt(a,o,null),s=!0,u||(c=Nt(o,"click",e[3]),u=!0)},p:function(l,f){var h=ke(f,1)[0];(!s||1&h)&&be(r,l[0])},i:function(l){s||(T(a.$$.fragment,l),s=!0)},o:function(l){z(a.$$.fragment,l),s=!1},d:function(l){l&&it(t),kt(a),u=!1,c()}}}function CU(e,t,n){var r=t.title,i=r===void 0?"Modal":r,o=t.onClose,a=o===void 0?void 0:o,s=Ir("simple-modal").close;return e.$$set=function(u){"title"in u&&n(0,i=u.title),"onClose"in u&&n(1,a=u.onClose)},[i,a,s,function(){a?a():s()}]}var s0=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,CU,SU,Be,{title:0,onClose:1},jU),i}return tt(n)}();function $U(e){Ae(e,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function _U(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M;return n=new s0({props:{title:"Copying and pasting"}}),{c:function(){t=G("div"),jt(n.$$.fragment),r=vt(),i=G("div"),(o=G("div")).textContent="These actions are unavailable via the menu. Please use:",a=vt(),s=G("div"),u=G("div"),(c=G("div")).textContent="".concat(e[1],"+C"),l=Jt(`
|
|
for copy`),f=vt(),h=G("div"),(d=G("div")).textContent="".concat(e[1],"+X"),v=Jt(`
|
|
for cut`),p=vt(),m=G("div"),(g=G("div")).textContent="".concat(e[1],"+V"),y=Jt(`
|
|
for paste`),b=vt(),w=G("div"),(j=G("button")).textContent="Close",C(c,"class","jse-key svelte-1olothd"),C(u,"class","jse-shortcut"),C(d,"class","jse-key svelte-1olothd"),C(h,"class","jse-shortcut"),C(g,"class","jse-key svelte-1olothd"),C(m,"class","jse-shortcut"),C(s,"class","jse-shortcuts svelte-1olothd"),C(j,"type","button"),C(j,"class","jse-primary svelte-1olothd"),C(w,"class","jse-actions svelte-1olothd"),C(i,"class","jse-modal-contents svelte-1olothd"),C(t,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(E,N){ot(E,t,N),xt(n,t,null),F(t,r),F(t,i),F(i,o),F(i,a),F(i,s),F(s,u),F(u,c),F(u,l),F(s,f),F(s,h),F(h,d),F(h,v),F(s,p),F(s,m),F(m,g),F(m,y),F(i,b),F(i,w),F(w,j),x=!0,R||(M=Nt(j,"click",e[0]),R=!0)},p:It,i:function(E){x||(T(n.$$.fragment,E),x=!0)},o:function(E){z(n.$$.fragment,E),x=!1},d:function(E){E&&it(t),kt(n),R=!1,M()}}}function OU(e){return[Ir("simple-modal").close,kU?"\u2318":"Ctrl"]}var nM=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,OU,_U,Be,{},$U),i}return tt(n)}();function rM(e){return!!e&&(e.type==="space"||e.space===!0)}function Kh(e){return!!e&&(e.type==="separator"||e.separator===!0)}function Cl(e){return!!e&&typeof e.onClick=="function"}function u0(e){return!!e&&e.type==="dropdown-button"&&Cl(e.main)&&Array.isArray(e.items)}function iM(e){return In(e)&&In(e.parseError)}function MU(e){return In(e)&&Array.isArray(e.validationErrors)}function EU(e){Ae(e,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var AU=function(e){return{}},oM=function(e){return{}};function aM(e,t,n){var r=e.slice();return r[3]=t[n],r}var PU=function(e){return{}},sM=function(e){return{}};function TU(e){var t,n=fM(e[3])+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=fM(r[3])+"")&&be(t,n)},i:It,o:It,d:function(r){r&&it(t)}}}function RU(e){var t,n,r,i,o,a,s,u,c=e[3].icon&&uM(e),l=e[3].text&&cM(e);return{c:function(){t=G("button"),c&&c.c(),n=vt(),l&&l.c(),C(t,"type","button"),C(t,"class",r="jse-button "+e[3].className+" svelte-497ud4"),C(t,"title",i=e[3].title),t.disabled=o=e[3].disabled||!1},m:function(f,h){ot(f,t,h),c&&c.m(t,null),F(t,n),l&&l.m(t,null),a=!0,s||(u=Nt(t,"click",function(){Rr(e[3].onClick)&&e[3].onClick.apply(this,arguments)}),s=!0)},p:function(f,h){(e=f)[3].icon?c?(c.p(e,h),1&h&&T(c,1)):((c=uM(e)).c(),T(c,1),c.m(t,n)):c&&(Dt(),z(c,1,1,function(){c=null}),Lt()),e[3].text?l?l.p(e,h):((l=cM(e)).c(),l.m(t,null)):l&&(l.d(1),l=null),(!a||1&h&&r!==(r="jse-button "+e[3].className+" svelte-497ud4"))&&C(t,"class",r),(!a||1&h&&i!==(i=e[3].title))&&C(t,"title",i),(!a||1&h&&o!==(o=e[3].disabled||!1))&&(t.disabled=o)},i:function(f){a||(T(c),a=!0)},o:function(f){z(c),a=!1},d:function(f){f&&it(t),c&&c.d(),l&&l.d(),s=!1,u()}}}function NU(e){var t;return{c:function(){C(t=G("div"),"class","jse-space svelte-497ud4")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function IU(e){var t;return{c:function(){C(t=G("div"),"class","jse-separator svelte-497ud4")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function uM(e){var t,n;return t=new on({props:{data:e[3].icon}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.data=r[3].icon),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function cM(e){var t,n=e[3].text+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=r[3].text+"")&&be(t,n)},d:function(r){r&&it(t)}}}function lM(e){var t,n,r,i,o,a,s,u=[IU,NU,RU,TU],c=[];function l(f,h){return 1&h&&(t=null),1&h&&(n=null),1&h&&(r=null),t==null&&(t=!!Kh(f[3])),t?0:(n==null&&(n=!!rM(f[3])),n?1:(r==null&&(r=!!Cl(f[3])),r?2:3))}return i=l(e,-1),o=c[i]=u[i](e),{c:function(){o.c(),a=vn()},m:function(f,h){c[i].m(f,h),ot(f,a,h),s=!0},p:function(f,h){var d=i;(i=l(f,h))===d?c[i].p(f,h):(Dt(),z(c[d],1,1,function(){c[d]=null}),Lt(),(o=c[i])?o.p(f,h):(o=c[i]=u[i](f)).c(),T(o,1),o.m(a.parentNode,a))},i:function(f){s||(T(o),s=!0)},o:function(f){z(o),s=!1},d:function(f){c[i].d(f),f&&it(a)}}}function DU(e){for(var t,n,r,i,o=e[2].left,a=Zn(o,e,e[1],sM),s=e[0],u=[],c=0;c<s.length;c+=1)u[c]=lM(aM(e,s,c));var l=function(d){return z(u[d],1,1,function(){u[d]=null})},f=e[2].right,h=Zn(f,e,e[1],oM);return{c:function(){t=G("div"),a&&a.c(),n=vt();for(var d=0;d<u.length;d+=1)u[d].c();r=vt(),h&&h.c(),C(t,"class","jse-menu svelte-497ud4")},m:function(d,v){ot(d,t,v),a&&a.m(t,null),F(t,n);for(var p=0;p<u.length;p+=1)u[p]&&u[p].m(t,null);F(t,r),h&&h.m(t,null),i=!0},p:function(d,v){var p=ke(v,1)[0];if(a&&a.p&&(!i||2&p)&&tr(a,o,d,d[1],i?Xn(o,d[1],p,PU):er(d[1]),sM),1&p){var m;for(s=d[0],m=0;m<s.length;m+=1){var g=aM(d,s,m);u[m]?(u[m].p(g,p),T(u[m],1)):(u[m]=lM(g),u[m].c(),T(u[m],1),u[m].m(t,r))}for(Dt(),m=s.length;m<u.length;m+=1)l(m);Lt()}h&&h.p&&(!i||2&p)&&tr(h,f,d,d[1],i?Xn(f,d[1],p,AU):er(d[1]),oM)},i:function(d){if(!i){T(a,d);for(var v=0;v<s.length;v+=1)T(u[v]);T(h,d),i=!0}},o:function(d){z(a,d),u=u.filter(Boolean);for(var v=0;v<u.length;v+=1)z(u[v]);z(h,d),i=!1},d:function(d){d&&it(t),a&&a.d(d),ur(u,d),h&&h.d(d)}}}function fM(e){return console.error("Unknown type of menu item",e),"???"}function LU(e,t,n){var r=t.$$slots,i=r===void 0?{}:r,o=t.$$scope,a=t.items,s=a===void 0?[]:a;return e.$$set=function(u){"items"in u&&n(0,s=u.items),"$$scope"in u&&n(1,o=u.$$scope)},[s,o,i]}var Gh=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,LU,DU,Be,{items:0},EU),i}return tt(n)}();function BU(e){Ae(e,"svelte-gz09vf",".jse-json-repair-component.svelte-gz09vf.svelte-gz09vf{flex:1;display:flex;flex-direction:column;background:var(--jse-background-color);color:var(--jse-text-color)}.jse-json-repair-component.svelte-gz09vf .jse-menu .jse-info.svelte-gz09vf{padding:0 var(--jse-padding)}.jse-json-repair-component.svelte-gz09vf .jse-json-text.svelte-gz09vf{flex:1;border:none;padding:2px;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-background-color);color:var(--jse-text-color);resize:none;outline:none}")}function zU(e){var t;return{c:function(){(t=G("div")).textContent="Repair invalid JSON, then click apply",C(t,"slot","left"),C(t,"class","jse-info svelte-gz09vf")},m:function(n,r){ot(n,t,r)},p:It,d:function(n){n&&it(t)}}}function FU(e){var t,n;return t=new po({props:{type:"success",message:"JSON is valid now and can be parsed.",actions:e[6]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};64&i&&(o.actions=r[6]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function VU(e){var t,n;return t=new po({props:{type:"error",icon:Fs,message:"Cannot parse JSON: ".concat(e[2].message),actions:e[7]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};4&i&&(o.message="Cannot parse JSON: ".concat(r[2].message)),128&i&&(o.actions=r[7]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function WU(e){var t,n,r,i,o,a,s,u,c,l;n=new Gh({props:{items:e[5],$$slots:{left:[zU]},$$scope:{ctx:e}}});var f=[VU,FU],h=[];function d(v,p){return v[2]?0:1}return i=d(e),o=h[i]=f[i](e),{c:function(){t=G("div"),jt(n.$$.fragment),r=vt(),o.c(),a=vt(),(s=G("textarea")).value=e[0],s.readOnly=e[1],C(s,"class","jse-json-text svelte-gz09vf"),C(s,"autocomplete","off"),C(s,"autocapitalize","off"),C(s,"spellcheck","false"),C(t,"class","jse-json-repair-component svelte-gz09vf")},m:function(v,p){ot(v,t,p),xt(n,t,null),F(t,r),h[i].m(t,null),F(t,a),F(t,s),e[17](s),e[18](t),u=!0,c||(l=Nt(s,"input",e[8]),c=!0)},p:function(v,p){var m=ke(p,1)[0],g={};32&m&&(g.items=v[5]),33554432&m&&(g.$$scope={dirty:m,ctx:v}),n.$set(g);var y=i;(i=d(v))===y?h[i].p(v,m):(Dt(),z(h[y],1,1,function(){h[y]=null}),Lt(),(o=h[i])?o.p(v,m):(o=h[i]=f[i](v)).c(),T(o,1),o.m(t,a)),(!u||1&m)&&(s.value=v[0]),(!u||2&m)&&(s.readOnly=v[1])},i:function(v){u||(T(n.$$.fragment,v),T(o),u=!0)},o:function(v){z(n.$$.fragment,v),z(o),u=!1},d:function(v){v&&it(t),kt(n),h[i].d(),e[17](null),e[18](null),c=!1,l()}}}function qU(e,t,n){var r,i,o,a,s,u,c,l,f,h=t.text,d=h===void 0?"":h,v=t.readOnly,p=v!==void 0&&v,m=t.onParse,g=t.onRepair,y=t.onChange,b=y===void 0?null:y,w=t.onApply,j=t.onCancel,x=Dr("jsoneditor:JSONRepair");function R(){w(d)}return e.$$set=function(M){"text"in M&&n(0,d=M.text),"readOnly"in M&&n(1,p=M.readOnly),"onParse"in M&&n(9,m=M.onParse),"onRepair"in M&&n(10,g=M.onRepair),"onChange"in M&&n(11,b=M.onChange),"onApply"in M&&n(12,w=M.onApply),"onCancel"in M&&n(13,j=M.onCancel)},e.$$.update=function(){1&e.$$.dirty&&n(2,r=function(M){try{return m(M),null}catch(E){return Du(M,E.message)}}(d)),1&e.$$.dirty&&n(16,i=function(M){try{return g(M),!0}catch(E){return!1}}(d)),4&e.$$.dirty&&x("error",r),8192&e.$$.dirty&&n(5,f=[{type:"space"},{type:"button",icon:Zu,title:"Cancel repair",className:"jse-cancel",onClick:j}]),114688&e.$$.dirty&&n(7,s=i?[o,a]:[o]),2&e.$$.dirty&&n(6,u=[{icon:xl,text:"Apply",title:"Apply fixed JSON",disabled:p,onClick:R}])},n(14,o={icon:tH,text:"Show me",title:"Scroll to the error location",onClick:function(){l&&r&&r.position!=null&&(l.setSelectionRange(r.position,r.position),setTimeout(function(){l.focus()}))}}),n(15,a={icon:Ih,text:"Auto repair",title:"Automatically repair JSON",onClick:function(){try{n(0,d=g(d)),b&&b(d)}catch(M){}}}),[d,p,r,c,l,f,u,s,function(M){x("handleChange");var E=M.target.value;d!==E&&(n(0,d=E),b&&b(d))},m,g,b,w,j,o,a,i,function(M){He[M?"unshift":"push"](function(){n(4,l=M)})},function(M){He[M?"unshift":"push"](function(){n(3,c=M)})}]}var HU=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,qU,WU,Be,{text:0,readOnly:1,onParse:9,onRepair:10,onChange:11,onApply:12,onCancel:13},BU),i}return tt(n)}(),nc=[];function hM(e){if(e.key==="Escape"){var t=le(nc);t&&t()}}function Qh(e,t){return Ue(nc)&&window.addEventListener("keydown",hM),nc.push(t),{destroy:function(){nc=nc.filter(function(n){return n!==t}),Ue(nc)&&window.removeEventListener("keydown",hM)}}}function UU(e){Ae(e,"svelte-1ffm3pm",".jse-modal.jse-repair.svelte-1ffm3pm{flex:1;display:flex;flex-direction:column;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-background-color);color:var(--jse-text-color)}")}function JU(e){var t,n,r,i,o,a;function s(c){e[7](c)}var u={onParse:e[1],onRepair:e[2],onApply:e[4],onCancel:e[5]};return e[0]!==void 0&&(u.text=e[0]),n=new HU({props:u}),He.push(function(){return no(n,"text",s)}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-modal jse-repair svelte-1ffm3pm")},m:function(c,l){ot(c,t,l),xt(n,t,null),i=!0,o||(a=Nr(Qh.call(null,t,e[3])),o=!0)},p:function(c,l){var f=ke(l,1)[0],h={};2&f&&(h.onParse=c[1]),4&f&&(h.onRepair=c[2]),!r&&1&f&&(r=!0,h.text=c[0],eo(function(){return r=!1})),n.$set(h)},i:function(c){i||(T(n.$$.fragment,c),i=!0)},o:function(c){z(n.$$.fragment,c),i=!1},d:function(c){c&&it(t),kt(n),o=!1,a()}}}function KU(e,t,n){var r=t.text,i=t.onParse,o=t.onRepair,a=t.onApply,s=Ir("simple-modal").close;return e.$$set=function(u){"text"in u&&n(0,r=u.text),"onParse"in u&&n(1,i=u.onParse),"onRepair"in u&&n(2,o=u.onRepair),"onApply"in u&&n(6,a=u.onApply)},[r,i,o,s,function(u){s(),a(u)},function(){s()},a,function(u){n(0,r=u)}]}var dM=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,KU,JU,Be,{text:0,onParse:1,onRepair:2,onApply:6},UU),i}return tt(n)}();function GU(e){Ae(e,"svelte-1u2b6j8","button.jse-context-menu-button.svelte-1u2b6j8{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;flex:1;white-space:nowrap;padding:var(--jse-padding);color:inherit}button.jse-context-menu-button.svelte-1u2b6j8:hover{background:var(--jse-context-menu-background-highlight)}button.jse-context-menu-button.svelte-1u2b6j8:focus{background:var(--jse-context-menu-background-highlight);z-index:1}button.jse-context-menu-button.svelte-1u2b6j8:disabled{color:var(--jse-context-menu-color-disabled);background:unset}button.jse-context-menu-button.left.svelte-1u2b6j8{text-align:left}button.jse-context-menu-button.svelte-1u2b6j8 svg{width:16px}")}function vM(e){var t,n;return t=new on({props:{data:e[0].icon}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.data=r[0].icon),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function pM(e){var t,n=e[0].text+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=r[0].text+"")&&be(t,n)},d:function(r){r&&it(t)}}}function QU(e){var t,n,r,i,o,a,s,u,c=e[0].icon&&vM(e),l=e[0].text&&pM(e);return{c:function(){t=G("button"),c&&c.c(),n=vt(),l&&l.c(),C(t,"type","button"),C(t,"class",r=Wn(Ko("jse-context-menu-button",e[1],e[0].className))+" svelte-1u2b6j8"),C(t,"title",i=e[0].title),t.disabled=o=e[0].disabled||!1},m:function(f,h){ot(f,t,h),c&&c.m(t,null),F(t,n),l&&l.m(t,null),a=!0,s||(u=Nt(t,"click",function(){Rr(e[0].onClick)&&e[0].onClick.apply(this,arguments)}),s=!0)},p:function(f,h){var d=ke(h,1)[0];(e=f)[0].icon?c?(c.p(e,d),1&d&&T(c,1)):((c=vM(e)).c(),T(c,1),c.m(t,n)):c&&(Dt(),z(c,1,1,function(){c=null}),Lt()),e[0].text?l?l.p(e,d):((l=pM(e)).c(),l.m(t,null)):l&&(l.d(1),l=null),(!a||3&d&&r!==(r=Wn(Ko("jse-context-menu-button",e[1],e[0].className))+" svelte-1u2b6j8"))&&C(t,"class",r),(!a||1&d&&i!==(i=e[0].title))&&C(t,"title",i),(!a||1&d&&o!==(o=e[0].disabled||!1))&&(t.disabled=o)},i:function(f){a||(T(c),a=!0)},o:function(f){z(c),a=!1},d:function(f){f&&it(t),c&&c.d(),l&&l.d(),s=!1,u()}}}function YU(e,t,n){var r=t.item,i=t.className,o=i===void 0?void 0:i;return e.$$set=function(a){"item"in a&&n(0,r=a.item),"className"in a&&n(1,o=a.className)},[r,o]}var c0=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,YU,QU,Sr,{item:0,className:1},GU),i}return tt(n)}();function ZU(e){Ae(e,"svelte-12ophpi",".jse-dropdown-button.svelte-12ophpi.svelte-12ophpi{flex:1;line-height:normal;border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;position:relative;padding:0;display:flex}.jse-dropdown-button.svelte-12ophpi ul.svelte-12ophpi{margin:0;padding:0}.jse-dropdown-button.svelte-12ophpi ul li.svelte-12ophpi{margin:0;padding:0;list-style-type:none}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:2em;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);border-radius:0}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.jse-visible.svelte-12ophpi{background:var(--jse-context-menu-background)}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi:hover{background:var(--jse-context-menu-background-highlight)}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi:focus{z-index:1}.jse-dropdown-button.svelte-12ophpi button.jse-open-dropdown.svelte-12ophpi:disabled{color:var(--jse-context-menu-color-disabled);background:unset}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items.svelte-12ophpi{display:none;position:absolute;top:100%;left:0;z-index:1;background:var(--jse-context-menu-background);color:var(--jse-context-menu-color);box-shadow:var(--jse-controls-box-shadow)}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items.jse-visible.svelte-12ophpi{display:block}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items button.svelte-12ophpi{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;width:100%;text-align:left;padding:var(--jse-padding);margin:0}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items button.svelte-12ophpi:hover{background:var(--jse-context-menu-background-highlight)}.jse-dropdown-button.svelte-12ophpi .jse-dropdown-items button.svelte-12ophpi:disabled{color:var(--jse-context-menu-color-disabled);background:unset}")}function mM(e,t,n){var r=e.slice();return r[11]=t[n],r}var XU=function(e){return{}},gM=function(e){return{}};function yM(e){var t,n;return t=new on({props:{data:e[11].icon}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.data=r[11].icon),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function bM(e){var t,n,r,i,o,a,s,u,c,l,f,h=e[11].text+"",d=e[11].icon&&yM(e);function v(){return e[9](e[11])}return{c:function(){t=G("li"),n=G("button"),d&&d.c(),r=vt(),i=Jt(h),u=vt(),C(n,"type","button"),C(n,"title",o=e[11].title),n.disabled=a=e[11].disabled,C(n,"class",s=Wn(e[11].className)+" svelte-12ophpi"),C(t,"class","svelte-12ophpi")},m:function(p,m){ot(p,t,m),F(t,n),d&&d.m(n,null),F(n,r),F(n,i),F(t,u),c=!0,l||(f=Nt(n,"click",v),l=!0)},p:function(p,m){(e=p)[11].icon?d?(d.p(e,m),1&m&&T(d,1)):((d=yM(e)).c(),T(d,1),d.m(n,r)):d&&(Dt(),z(d,1,1,function(){d=null}),Lt()),(!c||1&m)&&h!==(h=e[11].text+"")&&be(i,h),(!c||1&m&&o!==(o=e[11].title))&&C(n,"title",o),(!c||1&m&&a!==(a=e[11].disabled))&&(n.disabled=a),(!c||1&m&&s!==(s=Wn(e[11].className)+" svelte-12ophpi"))&&C(n,"class",s)},i:function(p){c||(T(d),c=!0)},o:function(p){z(d),c=!1},d:function(p){p&&it(t),d&&d.d(),l=!1,f()}}}function tJ(e){var t,n,r,i,o,a,s,u,c,l,f=e[8].defaultItem,h=Zn(f,e,e[7],gM);i=new on({props:{data:qi}});for(var d=e[0],v=[],p=0;p<d.length;p+=1)v[p]=bM(mM(e,d,p));var m=function(g){return z(v[g],1,1,function(){v[g]=null})};return{c:function(){t=G("div"),h&&h.c(),n=vt(),r=G("button"),jt(i.$$.fragment),o=vt(),a=G("div"),s=G("ul");for(var g=0;g<v.length;g+=1)v[g].c();C(r,"type","button"),C(r,"class","jse-open-dropdown svelte-12ophpi"),C(r,"data-type","jse-open-dropdown"),r.disabled=e[4],At(r,"jse-visible",e[3]),C(s,"class","svelte-12ophpi"),C(a,"class","jse-dropdown-items svelte-12ophpi"),Ra(a,"width",e[2]),At(a,"jse-visible",e[3]),C(t,"class","jse-dropdown-button svelte-12ophpi"),C(t,"title",e[1])},m:function(g,y){ot(g,t,y),h&&h.m(t,null),F(t,n),F(t,r),xt(i,r,null),F(t,o),F(t,a),F(a,s);for(var b=0;b<v.length;b+=1)v[b]&&v[b].m(s,null);u=!0,c||(l=[Nt(r,"click",e[5]),Nt(t,"click",e[6])],c=!0)},p:function(g,y){var b=ke(y,1)[0];if(h&&h.p&&(!u||128&b)&&tr(h,f,g,g[7],u?Xn(f,g[7],b,XU):er(g[7]),gM),(!u||16&b)&&(r.disabled=g[4]),(!u||8&b)&&At(r,"jse-visible",g[3]),1&b){var w;for(d=g[0],w=0;w<d.length;w+=1){var j=mM(g,d,w);v[w]?(v[w].p(j,b),T(v[w],1)):(v[w]=bM(j),v[w].c(),T(v[w],1),v[w].m(s,null))}for(Dt(),w=d.length;w<v.length;w+=1)m(w);Lt()}(!u||4&b)&&Ra(a,"width",g[2]),(!u||8&b)&&At(a,"jse-visible",g[3]),(!u||2&b)&&C(t,"title",g[1])},i:function(g){if(!u){T(h,g),T(i.$$.fragment,g);for(var y=0;y<d.length;y+=1)T(v[y]);u=!0}},o:function(g){z(h,g),z(i.$$.fragment,g),v=v.filter(Boolean);for(var y=0;y<v.length;y+=1)z(v[y]);u=!1},d:function(g){g&&it(t),h&&h.d(g),kt(i),ur(v,g),c=!1,Mn(l)}}}function eJ(e,t,n){var r,i=t.$$slots,o=i===void 0?{}:i,a=t.$$scope,s=t.items,u=s===void 0?[]:s,c=t.title,l=c===void 0?void 0:c,f=t.width,h=f===void 0?"120px":f,d=!1;function v(){n(3,d=!1)}function p(m){Ha(m)==="Escape"&&(m.preventDefault(),n(3,d=!1))}return Ti(function(){document.addEventListener("click",v),document.addEventListener("keydown",p)}),xi(function(){document.removeEventListener("click",v),document.removeEventListener("keydown",p)}),e.$$set=function(m){"items"in m&&n(0,u=m.items),"title"in m&&n(1,l=m.title),"width"in m&&n(2,h=m.width),"$$scope"in m&&n(7,a=m.$$scope)},e.$$.update=function(){1&e.$$.dirty&&n(4,r=u.every(function(m){return m.disabled===!0}))},[u,l,h,d,r,function(){var m=d;setTimeout(function(){return n(3,d=!m)})},v,a,o,function(m){return m.onClick()}]}var nJ=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,eJ,tJ,Be,{items:0,title:1,width:2},ZU),i}return tt(n)}();function rJ(e){Ae(e,"svelte-1u2b6j8","button.jse-context-menu-button.svelte-1u2b6j8{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;flex:1;white-space:nowrap;padding:var(--jse-padding);color:inherit}button.jse-context-menu-button.svelte-1u2b6j8:hover{background:var(--jse-context-menu-background-highlight)}button.jse-context-menu-button.svelte-1u2b6j8:focus{background:var(--jse-context-menu-background-highlight);z-index:1}button.jse-context-menu-button.svelte-1u2b6j8:disabled{color:var(--jse-context-menu-color-disabled);background:unset}button.jse-context-menu-button.left.svelte-1u2b6j8{text-align:left}button.jse-context-menu-button.svelte-1u2b6j8 svg{width:16px}")}function wM(e){var t,n;return t=new on({props:{data:e[0].main.icon}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.data=r[0].main.icon),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function iJ(e){var t,n,r,i,o,a,s,u,c,l=e[0].main.text+"",f=e[0].main.icon&&wM(e);return{c:function(){t=G("button"),f&&f.c(),n=vt(),r=Jt(l),C(t,"class",i=Wn(Ko("jse-context-menu-button",e[1],e[0].main.className))+" svelte-1u2b6j8"),C(t,"type","button"),C(t,"slot","defaultItem"),C(t,"title",o=e[0].main.title),t.disabled=a=e[0].main.disabled||!1},m:function(h,d){ot(h,t,d),f&&f.m(t,null),F(t,n),F(t,r),s=!0,u||(c=Nt(t,"click",function(){Rr(e[0].main.onClick)&&e[0].main.onClick.apply(this,arguments)}),u=!0)},p:function(h,d){(e=h)[0].main.icon?f?(f.p(e,d),1&d&&T(f,1)):((f=wM(e)).c(),T(f,1),f.m(t,n)):f&&(Dt(),z(f,1,1,function(){f=null}),Lt()),(!s||1&d)&&l!==(l=e[0].main.text+"")&&be(r,l),(!s||3&d&&i!==(i=Wn(Ko("jse-context-menu-button",e[1],e[0].main.className))+" svelte-1u2b6j8"))&&C(t,"class",i),(!s||1&d&&o!==(o=e[0].main.title))&&C(t,"title",o),(!s||1&d&&a!==(a=e[0].main.disabled||!1))&&(t.disabled=a)},i:function(h){s||(T(f),s=!0)},o:function(h){z(f),s=!1},d:function(h){h&&it(t),f&&f.d(),u=!1,c()}}}function oJ(e){var t,n;return t=new nJ({props:{width:e[0].width,items:e[0].items,$$slots:{defaultItem:[iJ]},$$scope:{ctx:e}}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o=ke(i,1)[0],a={};1&o&&(a.width=r[0].width),1&o&&(a.items=r[0].items),7&o&&(a.$$scope={dirty:o,ctx:r}),t.$set(a)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function aJ(e,t,n){var r=t.item,i=t.className,o=i===void 0?void 0:i;return e.$$set=function(a){"item"in a&&n(0,r=a.item),"className"in a&&n(1,o=a.className)},[r,o]}var l0=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,aJ,oJ,Sr,{item:0,className:1},rJ),i}return tt(n)}();function sJ(e){Ae(e,"svelte-1nininf",".jse-contextmenu.svelte-1nininf.svelte-1nininf{box-shadow:var(--jse-controls-box-shadow);font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-context-menu-background);color:var(--jse-context-menu-color)}.jse-contextmenu.svelte-1nininf .jse-row.svelte-1nininf{display:flex;flex-direction:row;align-items:flex-start;justify-content:stretch}.jse-contextmenu.svelte-1nininf .jse-row div.jse-label.svelte-1nininf{flex:1;white-space:nowrap;padding:var(--jse-padding);color:var(--jse-context-menu-color-disabled);line-height:normal}.jse-contextmenu.svelte-1nininf .jse-row div.jse-tip.svelte-1nininf{flex:1;background:var(--jse-context-menu-tip-background);color:var(--jse-context-menu-tip-color);margin:calc(0.5 * var(--jse-padding));padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);font-size:80%;line-height:1.3em;display:flex;flex-direction:row;align-items:start;gap:var(--jse-padding);border-radius:3px}.jse-contextmenu.svelte-1nininf .jse-row div.jse-tip div.jse-tip-icon.svelte-1nininf{padding-top:calc(0.5 * var(--jse-padding))}.jse-contextmenu.svelte-1nininf .jse-column.svelte-1nininf{flex:1;display:flex;flex-direction:column;align-items:stretch}.jse-contextmenu.svelte-1nininf .jse-column.svelte-1nininf:not(:last-child){border-right:1px solid var(--jse-context-menu-separator-color)}.jse-contextmenu.svelte-1nininf .jse-separator.svelte-1nininf{width:100%;height:1px;background:var(--jse-context-menu-separator-color)}")}function xM(e,t,n){var r=e.slice();return r[6]=t[n],r}function kM(e,t,n){var r=e.slice();return r[9]=t[n],r}function jM(e,t,n){var r=e.slice();return r[12]=t[n],r}function uJ(e){var t,n=rc(e[6])+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=rc(r[6])+"")&&be(t,n)},i:It,o:It,d:function(r){r&&it(t)}}}function cJ(e){var t;return{c:function(){C(t=G("div"),"class","jse-separator svelte-1nininf")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function lJ(e){for(var t,n,r=e[6].items,i=[],o=0;o<r.length;o+=1)i[o]=CM(kM(e,r,o));var a=function(s){return z(i[s],1,1,function(){i[s]=null})};return{c:function(){t=G("div");for(var s=0;s<i.length;s+=1)i[s].c();C(t,"class","jse-row svelte-1nininf")},m:function(s,u){ot(s,t,u);for(var c=0;c<i.length;c+=1)i[c]&&i[c].m(t,null);n=!0},p:function(s,u){if(1&u){var c;for(r=s[6].items,c=0;c<r.length;c+=1){var l=kM(s,r,c);i[c]?(i[c].p(l,u),T(i[c],1)):(i[c]=CM(l),i[c].c(),T(i[c],1),i[c].m(t,null))}for(Dt(),c=r.length;c<i.length;c+=1)a(c);Lt()}},i:function(s){if(!n){for(var u=0;u<r.length;u+=1)T(i[u]);n=!0}},o:function(s){i=i.filter(Boolean);for(var u=0;u<i.length;u+=1)z(i[u]);n=!1},d:function(s){s&&it(t),ur(i,s)}}}function fJ(e){var t,n;return t=new l0({props:{item:e[6]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.item=r[6]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function hJ(e){var t,n;return t=new c0({props:{item:e[6]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.item=r[6]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function dJ(e){var t,n=rc(e[9])+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=rc(r[9])+"")&&be(t,n)},i:It,o:It,d:function(r){r&&it(t)}}}function vJ(e){var t;return{c:function(){C(t=G("div"),"class","jse-separator svelte-1nininf")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function pJ(e){for(var t,n,r=e[9].items,i=[],o=0;o<r.length;o+=1)i[o]=SM(jM(e,r,o));var a=function(s){return z(i[s],1,1,function(){i[s]=null})};return{c:function(){t=G("div");for(var s=0;s<i.length;s+=1)i[s].c();C(t,"class","jse-column svelte-1nininf")},m:function(s,u){ot(s,t,u);for(var c=0;c<i.length;c+=1)i[c]&&i[c].m(t,null);n=!0},p:function(s,u){if(1&u){var c;for(r=s[9].items,c=0;c<r.length;c+=1){var l=jM(s,r,c);i[c]?(i[c].p(l,u),T(i[c],1)):(i[c]=SM(l),i[c].c(),T(i[c],1),i[c].m(t,null))}for(Dt(),c=r.length;c<i.length;c+=1)a(c);Lt()}},i:function(s){if(!n){for(var u=0;u<r.length;u+=1)T(i[u]);n=!0}},o:function(s){i=i.filter(Boolean);for(var u=0;u<i.length;u+=1)z(i[u]);n=!1},d:function(s){s&&it(t),ur(i,s)}}}function mJ(e){var t,n;return t=new l0({props:{item:e[9]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.item=r[9]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function gJ(e){var t,n;return t=new c0({props:{item:e[9]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.item=r[9]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function yJ(e){var t,n=rc(e[12])+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){1&i&&n!==(n=rc(r[12])+"")&&be(t,n)},i:It,o:It,d:function(r){r&&it(t)}}}function bJ(e){var t,n,r=e[12].text+"";return{c:function(){t=G("div"),n=Jt(r),C(t,"class","jse-label svelte-1nininf")},m:function(i,o){ot(i,t,o),F(t,n)},p:function(i,o){1&o&&r!==(r=i[12].text+"")&&be(n,r)},i:It,o:It,d:function(i){i&&it(t)}}}function wJ(e){var t;return{c:function(){C(t=G("div"),"class","jse-separator svelte-1nininf")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function xJ(e){var t,n;return t=new l0({props:{className:"left",item:e[12]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.item=r[12]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function kJ(e){var t,n;return t=new c0({props:{className:"left",item:e[12]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i&&(o.item=r[12]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function SM(e){var t,n,r,i,o,a,s,u,c=[kJ,xJ,wJ,bJ,yJ],l=[];function f(h,d){return 1&d&&(t=null),1&d&&(n=null),1&d&&(r=null),1&d&&(i=null),t==null&&(t=!!Cl(h[12])),t?0:(n==null&&(n=!!u0(h[12])),n?1:(r==null&&(r=!!Kh(h[12])),r?2:(i==null&&(v=h[12],i=!(!v||v.type!=="label"||typeof v.text!="string")),i?3:4)));var v}return o=f(e,-1),a=l[o]=c[o](e),{c:function(){a.c(),s=vn()},m:function(h,d){l[o].m(h,d),ot(h,s,d),u=!0},p:function(h,d){var v=o;(o=f(h,d))===v?l[o].p(h,d):(Dt(),z(l[v],1,1,function(){l[v]=null}),Lt(),(a=l[o])?a.p(h,d):(a=l[o]=c[o](h)).c(),T(a,1),a.m(s.parentNode,s))},i:function(h){u||(T(a),u=!0)},o:function(h){z(a),u=!1},d:function(h){l[o].d(h),h&&it(s)}}}function CM(e){var t,n,r,i,o,a,s,u,c=[gJ,mJ,pJ,vJ,dJ],l=[];function f(h,d){return 1&d&&(t=null),1&d&&(n=null),1&d&&(r=null),1&d&&(i=null),t==null&&(t=!!Cl(h[9])),t?0:(n==null&&(n=!!u0(h[9])),n?1:(r==null&&(v=h[9],r=!(!v||v.type!=="column"||!Array.isArray(v.items))),r?2:(i==null&&(i=!!Kh(h[9])),i?3:4)));var v}return o=f(e,-1),a=l[o]=c[o](e),{c:function(){a.c(),s=vn()},m:function(h,d){l[o].m(h,d),ot(h,s,d),u=!0},p:function(h,d){var v=o;(o=f(h,d))===v?l[o].p(h,d):(Dt(),z(l[v],1,1,function(){l[v]=null}),Lt(),(a=l[o])?a.p(h,d):(a=l[o]=c[o](h)).c(),T(a,1),a.m(s.parentNode,s))},i:function(h){u||(T(a),u=!0)},o:function(h){z(a),u=!1},d:function(h){l[o].d(h),h&&it(s)}}}function $M(e){var t,n,r,i,o,a,s,u,c=[hJ,fJ,lJ,cJ,uJ],l=[];function f(h,d){return 1&d&&(t=null),1&d&&(n=null),1&d&&(r=null),1&d&&(i=null),t==null&&(t=!!Cl(h[6])),t?0:(n==null&&(n=!!u0(h[6])),n?1:(r==null&&(v=h[6],r=!(!v||v.type!=="row"||!Array.isArray(v.items))),r?2:(i==null&&(i=!!Kh(h[6])),i?3:4)));var v}return o=f(e,-1),a=l[o]=c[o](e),{c:function(){a.c(),s=vn()},m:function(h,d){l[o].m(h,d),ot(h,s,d),u=!0},p:function(h,d){var v=o;(o=f(h,d))===v?l[o].p(h,d):(Dt(),z(l[v],1,1,function(){l[v]=null}),Lt(),(a=l[o])?a.p(h,d):(a=l[o]=c[o](h)).c(),T(a,1),a.m(s.parentNode,s))},i:function(h){u||(T(a),u=!0)},o:function(h){z(a),u=!1},d:function(h){l[o].d(h),h&&it(s)}}}function _M(e){var t,n,r,i,o,a,s,u;return i=new on({props:{data:WW}}),{c:function(){t=G("div"),n=G("div"),r=G("div"),jt(i.$$.fragment),o=vt(),a=G("div"),s=Jt(e[1]),C(r,"class","jse-tip-icon svelte-1nininf"),C(a,"class","jse-tip-text"),C(n,"class","jse-tip svelte-1nininf"),C(t,"class","jse-row svelte-1nininf")},m:function(c,l){ot(c,t,l),F(t,n),F(n,r),xt(i,r,null),F(n,o),F(n,a),F(a,s),u=!0},p:function(c,l){(!u||2&l)&&be(s,c[1])},i:function(c){u||(T(i.$$.fragment,c),u=!0)},o:function(c){z(i.$$.fragment,c),u=!1},d:function(c){c&&it(t),kt(i)}}}function jJ(e){for(var t,n,r,i,o,a=e[0],s=[],u=0;u<a.length;u+=1)s[u]=$M(xM(e,a,u));var c=function(f){return z(s[f],1,1,function(){s[f]=null})},l=e[1]&&_M(e);return{c:function(){t=G("div");for(var f=0;f<s.length;f+=1)s[f].c();n=vt(),l&&l.c(),C(t,"class","jse-contextmenu svelte-1nininf")},m:function(f,h){ot(f,t,h);for(var d=0;d<s.length;d+=1)s[d]&&s[d].m(t,null);F(t,n),l&&l.m(t,null),e[4](t),r=!0,i||(o=Nt(t,"keydown",e[3]),i=!0)},p:function(f,h){var d=ke(h,1)[0];if(1&d){var v;for(a=f[0],v=0;v<a.length;v+=1){var p=xM(f,a,v);s[v]?(s[v].p(p,d),T(s[v],1)):(s[v]=$M(p),s[v].c(),T(s[v],1),s[v].m(t,n))}for(Dt(),v=a.length;v<s.length;v+=1)c(v);Lt()}f[1]?l?(l.p(f,d),2&d&&T(l,1)):((l=_M(f)).c(),T(l,1),l.m(t,null)):l&&(Dt(),z(l,1,1,function(){l=null}),Lt())},i:function(f){if(!r){for(var h=0;h<a.length;h+=1)T(s[h]);T(l),r=!0}},o:function(f){s=s.filter(Boolean);for(var h=0;h<s.length;h+=1)z(s[h]);z(l),r=!1},d:function(f){f&&it(t),ur(s,f),l&&l.d(),e[4](null),i=!1,o()}}}function rc(e){return console.error("Unknown type of context menu item",e),"???"}function SJ(e,t,n){var r,i=t.items,o=t.tip;Ti(function(){setTimeout(function(){var s=Oe(r.querySelectorAll("button")).find(function(u){return!u.disabled});s&&s.focus()})});var a={ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right"};return e.$$set=function(s){"items"in s&&n(0,i=s.items),"tip"in s&&n(1,o=s.tip)},[i,o,r,function(s){var u=Ha(s),c=a[u];if(typeof c=="string"){s.preventDefault();var l=AW({allElements:Array.from(r.querySelectorAll("button:not([disabled])")),currentElement:s.target,direction:c,hasPrio:function(f){return f.getAttribute("data-type")!=="jse-open-dropdown"}});l&&l.focus()}},function(s){He[s?"unshift":"push"](function(){n(2,r=s)})}]}var OM=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,SJ,jJ,Be,{items:0,tip:1},sJ),i}return tt(n)}();function CJ(e){var t,n;return t=new OM({props:{items:e[1],tip:e[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};2&i[0]&&(o.items=r[1]),1&i[0]&&(o.tip=r[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function $J(e,t,n){var r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R=t.json,M=t.documentState,E=t.parser,N=t.showTip,A=t.onCloseContextMenu,L=t.onEditKey,W=t.onEditValue,O=t.onToggleEnforceString,I=t.onCut,q=t.onCopy,P=t.onPaste,_=t.onRemove,S=t.onDuplicate,$=t.onExtract,D=t.onInsertBefore,B=t.onInsert,k=t.onConvert,H=t.onInsertAfter,U=t.onSort,st=t.onTransform;function ut(){A(),L()}function gt(){A(),W()}function St(){A(),O()}function Pt(){A(),I(!0)}function pt(){A(),I(!1)}function Bt(){A(),q(!0)}function K(){A(),q(!1)}function $t(){A(),P()}function Kt(){A(),_()}function Ct(){A(),S()}function V(){A(),$()}function Q(zt){A(),c?k(zt):B(zt)}function ft(){A(),U()}function wt(){A(),st()}function _t(){A(),D()}function Ut(){A(),H()}return e.$$set=function(zt){"json"in zt&&n(2,R=zt.json),"documentState"in zt&&n(3,M=zt.documentState),"parser"in zt&&n(4,E=zt.parser),"showTip"in zt&&n(0,N=zt.showTip),"onCloseContextMenu"in zt&&n(5,A=zt.onCloseContextMenu),"onEditKey"in zt&&n(6,L=zt.onEditKey),"onEditValue"in zt&&n(7,W=zt.onEditValue),"onToggleEnforceString"in zt&&n(8,O=zt.onToggleEnforceString),"onCut"in zt&&n(9,I=zt.onCut),"onCopy"in zt&&n(10,q=zt.onCopy),"onPaste"in zt&&n(11,P=zt.onPaste),"onRemove"in zt&&n(12,_=zt.onRemove),"onDuplicate"in zt&&n(13,S=zt.onDuplicate),"onExtract"in zt&&n(14,$=zt.onExtract),"onInsertBefore"in zt&&n(15,D=zt.onInsertBefore),"onInsert"in zt&&n(16,B=zt.onInsert),"onConvert"in zt&&n(17,k=zt.onConvert),"onInsertAfter"in zt&&n(18,H=zt.onInsertAfter),"onSort"in zt&&n(19,U=zt.onSort),"onTransform"in zt&&n(20,st=zt.onTransform)},e.$$.update=function(){8&e.$$.dirty[0]&&n(37,r=M.selection),4&e.$$.dirty[0]&&n(39,i=R!==void 0),64&e.$$.dirty[1]&&n(31,o=r!=null),65&e.$$.dirty[1]&&n(21,a=o&&Ue(r.focusPath)),4&e.$$.dirty[0]|65&e.$$.dirty[1]&&n(38,s=o?se(R,r.focusPath):void 0),128&e.$$.dirty[1]&&n(35,u=Array.isArray(s)?"Edit array":In(s)?"Edit object":"Edit value"),320&e.$$.dirty[1]&&n(22,c=i&&(yn(r)||yr(r)||Ge(r))),6291456&e.$$.dirty[0]|256&e.$$.dirty[1]&&n(30,l=i&&c&&!a),2097152&e.$$.dirty[0]|320&e.$$.dirty[1]&&n(29,f=i&&r!=null&&(yn(r)||Ge(r))&&!a),2097156&e.$$.dirty[0]|320&e.$$.dirty[1]&&n(36,h=i&&r!=null&&yl(r)&&!a&&!Array.isArray(se(R,Ze(r.focusPath)))),320&e.$$.dirty[1]&&n(34,d=i&&r!=null&&yl(r)),136&e.$$.dirty[1]&&n(32,v=d&&!Jn(s)),4194304&e.$$.dirty[0]&&n(25,p=c),33554432&e.$$.dirty[0]&&n(24,m=p?"Convert to:":"Insert:"),33554432&e.$$.dirty[0]|1&e.$$.dirty[1]&&n(28,g=!p&&o),33554432&e.$$.dirty[0]|193&e.$$.dirty[1]&&n(27,y=p?Bs(r)&&!In(s):o),33554432&e.$$.dirty[0]|193&e.$$.dirty[1]&&n(26,b=p?Bs(r)&&!Array.isArray(s):o),33554432&e.$$.dirty[0]|193&e.$$.dirty[1]&&n(23,w=p?Bs(r)&&Jn(s):o),24&e.$$.dirty[0]|192&e.$$.dirty[1]&&n(33,j=r!=null&&ja(s,M.enforceStringMap,Qt(r.focusPath),E)),2145386496&e.$$.dirty[0]|63&e.$$.dirty[1]&&n(1,x=[{type:"row",items:[{type:"button",onClick:ut,icon:Qu,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:gt,icon:Qu,text:u,title:"Edit the value (Double-click on the value)",disabled:!d},width:"11em",items:[{type:"button",icon:Qu,text:u,title:"Edit the value (Double-click on the value)",onClick:gt,disabled:!d},{type:"button",icon:j?vl:pl,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:St,disabled:!v}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:Pt,icon:Gu,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:Gu,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:Pt,disabled:!c},{type:"button",icon:Gu,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:pt,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:Bt,icon:Ya,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:Ya,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:Bt,disabled:!c},{type:"button",icon:Ya,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:K,disabled:!c}]},{type:"button",onClick:$t,icon:V_,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:Ct,icon:G_,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!l},{type:"button",onClick:V,icon:Yq,text:"Extract",title:"Extract selected contents",disabled:!f},{type:"button",onClick:ft,icon:Lh,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:wt,icon:Nh,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Kt,icon:Ug,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:m},{type:"button",onClick:function(){return Q("structure")},icon:p?Dh:Yu,text:"Structure",title:m+" structure",disabled:!g},{type:"button",onClick:function(){return Q("object")},icon:p?Dh:Yu,text:"Object",title:m+" structure",disabled:!y},{type:"button",onClick:function(){return Q("array")},icon:p?Dh:Yu,text:"Array",title:m+" array",disabled:!b},{type:"button",onClick:function(){return Q("value")},icon:p?Dh:Yu,text:"Value",title:m+" value",disabled:!w}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:_t,icon:Gq,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||a},{type:"button",onClick:Ut,icon:Uq,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||a}]}])},[N,x,R,M,E,A,L,W,O,I,q,P,_,S,$,D,B,k,H,U,st,a,c,w,m,p,b,y,g,f,l,o,v,j,d,u,h,r,s,i]}var _J=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,$J,CJ,Be,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),i}return tt(n)}();function OJ(e){Ae(e,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 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.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function MM(e,t,n){var r=e.slice();return r[13]=t[n],r}function EM(e){var t,n,r,i,o,a,s,u,c=e[13].start+"",l=e[13].end+"";function f(){return e[12](e[13])}return{c:function(){t=G("button"),n=Jt("show "),r=Jt(c),i=Jt("-"),o=Jt(l),a=vt(),C(t,"type","button"),C(t,"class","jse-expand-items svelte-1kai5ns")},m:function(h,d){ot(h,t,d),F(t,n),F(t,r),F(t,i),F(t,o),F(t,a),s||(u=Nt(t,"click",f),s=!0)},p:function(h,d){e=h,16&d&&c!==(c=e[13].start+"")&&be(r,c),16&d&&l!==(l=e[13].end+"")&&be(o,l)},d:function(h){h&&it(t),s=!1,u()}}}function MJ(e){for(var t,n,r,i,o,a,s,u,c,l,f,h=e[4],d=[],v=0;v<h.length;v+=1)d[v]=EM(MM(e,h,v));return{c:function(){t=G("div"),n=G("div"),r=G("div"),i=Jt("Items "),o=Jt(e[3]),a=Jt("-"),s=Jt(e[2]),u=vt();for(var p=0;p<d.length;p+=1)d[p].c();C(r,"class","jse-text svelte-1kai5ns"),C(t,"class","jse-collapsed-items svelte-1kai5ns"),C(t,"style",c=AM(e[0].length+2)),At(t,"jse-selected",e[5])},m:function(p,m){ot(p,t,m),F(t,n),F(n,r),F(r,i),F(r,o),F(r,a),F(r,s),F(n,u);for(var g=0;g<d.length;g+=1)d[g]&&d[g].m(n,null);l||(f=Nt(t,"mousemove",EJ),l=!0)},p:function(p,m){var g=ke(m,1)[0];if(8&g&&be(o,p[3]),4&g&&be(s,p[2]),19&g){var y;for(h=p[4],y=0;y<h.length;y+=1){var b=MM(p,h,y);d[y]?d[y].p(b,g):(d[y]=EM(b),d[y].c(),d[y].m(n,null))}for(;y<d.length;y+=1)d[y].d(1);d.length=h.length}1&g&&c!==(c=AM(p[0].length+2))&&C(t,"style",c),32&g&&At(t,"jse-selected",p[5])},i:It,o:It,d:function(p){p&&it(t),ur(d,p),l=!1,f()}}}function AM(e){return"margin-left: calc(".concat(e," * var(--jse-indent-size))")}function EJ(e){e.stopPropagation()}function AJ(e,t,n){var r,i,o,a,s,u=t.visibleSections,c=t.sectionIndex,l=t.total,f=t.path,h=t.pointer,d=t.selection,v=t.onExpandSection;return e.$$set=function(p){"visibleSections"in p&&n(6,u=p.visibleSections),"sectionIndex"in p&&n(7,c=p.sectionIndex),"total"in p&&n(8,l=p.total),"path"in p&&n(0,f=p.path),"pointer"in p&&n(9,h=p.pointer),"selection"in p&&n(10,d=p.selection),"onExpandSection"in p&&n(1,v=p.onExpandSection)},e.$$.update=function(){192&e.$$.dirty&&n(11,r=u[c]),2048&e.$$.dirty&&n(3,i=r.end),448&e.$$.dirty&&n(2,o=u[c+1]?u[c+1].start:l),1544&e.$$.dirty&&n(5,a=!!yn(d)&&d.pointersMap[wp(h,i)]===!0),12&e.$$.dirty&&n(4,s=function(p,m){var g={start:p,end:Math.min(Pg(p),m)},y=Math.max(Mh((p+m)/2),p),b={start:y,end:Math.min(Pg(y),m)},w=Mh(m),j=w===m?w-Fc:w,x={start:Math.max(j,p),end:m},R=[g],M=b.start>=g.end&&b.end<=x.start;return M&&R.push(b),x.start>=(M?b.end:g.end)&&R.push(x),R}(i,o))},[f,v,o,i,s,a,u,c,l,h,d,r,function(p){return v(f,p)}]}var PJ=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,AJ,MJ,Be,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},OJ),i}return tt(n)}();function TJ(e){Ae(e,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function RJ(e){var t,n,r,i,o;return n=new on({props:{data:qi}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-context-menu-pointer svelte-1yzl4st"),C(t,"title",up),At(t,"jse-selected",e[0])},m:function(a,s){ot(a,t,s),xt(n,t,null),r=!0,i||(o=Nt(t,"click",e[1]),i=!0)},p:function(a,s){var u=ke(s,1)[0];(!r||1&u)&&At(t,"jse-selected",a[0])},i:function(a){r||(T(n.$$.fragment,a),r=!0)},o:function(a){z(n.$$.fragment,a),r=!1},d:function(a){a&&it(t),kt(n),i=!1,o()}}}function NJ(e,t,n){var r=t.selected,i=t.onContextMenu;return e.$$set=function(o){"selected"in o&&n(0,r=o.selected),"onContextMenu"in o&&n(2,i=o.onContextMenu)},[r,function(o){for(var a=o.target;a&&a.nodeName!=="BUTTON";)a=a.parentNode;a&&i({anchor:a,left:0,top:0,width:pa,height:va,offsetTop:2,offsetLeft:0,showTip:!0})},i]}var ts=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,NJ,RJ,Be,{selected:0,onContextMenu:2},TJ),i}return tt(n)}();function IJ(e){Ae(e,"svelte-24a1b2",'.jse-key.svelte-24a1b2{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);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function DJ(e){var t,n,r,i,o,a,s,u=[zJ,BJ],c=[];function l(f,h){return f[1]?0:1}return n=l(e),r=c[n]=u[n](e),{c:function(){t=G("div"),r.c(),C(t,"data-type","selectable-key"),C(t,"class",i=Wn(e[6](e[0]))+" svelte-24a1b2")},m:function(f,h){ot(f,t,h),c[n].m(t,null),o=!0,a||(s=Nt(t,"dblclick",e[5]),a=!0)},p:function(f,h){var d=n;(n=l(f))===d?c[n].p(f,h):(Dt(),z(c[d],1,1,function(){c[d]=null}),Lt(),(r=c[n])?r.p(f,h):(r=c[n]=u[n](f)).c(),T(r,1),r.m(t,null)),(!o||1&h&&i!==(i=Wn(f[6](f[0]))+" svelte-24a1b2"))&&C(t,"class",i)},i:function(f){o||(T(r),o=!0)},o:function(f){z(r),o=!1},d:function(f){f&&it(t),c[n].d(),a=!1,s()}}}function LJ(e){var t,n;return t=new O_({props:{value:e[2].normalization.escapeValue(e[0]),shortText:!0,onChange:e[7],onCancel:e[8],onFind:e[2].onFind}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};5&i&&(o.value=r[2].normalization.escapeValue(r[0])),4&i&&(o.onFind=r[2].onFind),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function BJ(e){var t,n=Ds(e[2].normalization.escapeValue(e[0]))+"";return{c:function(){t=Jt(n)},m:function(r,i){ot(r,t,i)},p:function(r,i){5&i&&n!==(n=Ds(r[2].normalization.escapeValue(r[0]))+"")&&be(t,n)},i:It,o:It,d:function(r){r&&it(t)}}}function zJ(e){var t,n;return t=new F_({props:{text:e[2].normalization.escapeValue(e[0]),searchResultItems:e[1]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};5&i&&(o.text=r[2].normalization.escapeValue(r[0])),2&i&&(o.searchResultItems=r[1]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function PM(e){var t,n;return t=new ts({props:{selected:!0,onContextMenu:e[2].onContextMenu}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};4&i&&(o.onContextMenu=r[2].onContextMenu),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function FJ(e){var t,n,r,i,o,a=[LJ,DJ],s=[];function u(l,f){return l[4]?0:1}t=u(e),n=s[t]=a[t](e);var c=!e[2].readOnly&&e[3]&&!e[4]&&PM(e);return{c:function(){n.c(),r=vt(),c&&c.c(),i=vn()},m:function(l,f){s[t].m(l,f),ot(l,r,f),c&&c.m(l,f),ot(l,i,f),o=!0},p:function(l,f){var h=ke(f,1)[0],d=t;(t=u(l))===d?s[t].p(l,h):(Dt(),z(s[d],1,1,function(){s[d]=null}),Lt(),(n=s[t])?n.p(l,h):(n=s[t]=a[t](l)).c(),T(n,1),n.m(r.parentNode,r)),l[2].readOnly||!l[3]||l[4]?c&&(Dt(),z(c,1,1,function(){c=null}),Lt()):c?(c.p(l,h),28&h&&T(c,1)):((c=PM(l)).c(),T(c,1),c.m(i.parentNode,i))},i:function(l){o||(T(n),T(c),o=!0)},o:function(l){z(n),z(c),o=!1},d:function(l){s[t].d(l),l&&it(r),c&&c.d(l),l&&it(i)}}}function VJ(e,t,n){var r,i,o=t.path,a=t.pointer,s=t.key,u=t.selection,c=t.searchResultItems,l=t.onUpdateKey,f=t.context;return e.$$set=function(h){"path"in h&&n(9,o=h.path),"pointer"in h&&n(10,a=h.pointer),"key"in h&&n(0,s=h.key),"selection"in h&&n(11,u=h.selection),"searchResultItems"in h&&n(1,c=h.searchResultItems),"onUpdateKey"in h&&n(12,l=h.onUpdateKey),"context"in h&&n(2,f=h.context)},e.$$.update=function(){3072&e.$$.dirty&&n(3,r=u?u.pointersMap[a]===!0&&yr(u):void 0),2056&e.$$.dirty&&n(4,i=r&&Ka(u))},[s,c,f,r,i,function(h){i||f.readOnly||(h.preventDefault(),f.onSelect(Wi(o,!0)))},function(h){return Ko("jse-key",{"jse-empty":h===""})},function(h,d){var v=l(s,f.normalization.unescapeValue(h)),p=Ze(o).concat(v);f.onSelect(d===hp?un(p,!1):Wi(p,!1)),d!==fp&&f.focus()},function(){f.onSelect(Wi(o,!1)),f.focus()},o,a,u,l]}var WJ=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,VJ,FJ,Be,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},IJ),i}return tt(n)}();function TM(e,t,n){var r=e.slice();return r[8]=t[n],r}function RM(e){var t,n,r,i=[e[8].props],o=e[8].component;function a(s){for(var u={},c=0;c<i.length;c+=1)u=hi(u,i[c]);return{props:u}}return o&&(t=Ro(o,a())),{c:function(){t&&jt(t.$$.fragment),n=vn()},m:function(s,u){t&&xt(t,s,u),ot(s,n,u),r=!0},p:function(s,u){var c=1&u?ha(i,[zc(s[8].props)]):{};if(1&u&&o!==(o=s[8].component)){if(t){Dt();var l=t;z(l.$$.fragment,1,0,function(){kt(l,1)}),Lt()}o?(jt((t=Ro(o,a())).$$.fragment),T(t.$$.fragment,1),xt(t,n.parentNode,n)):t=null}else o&&t.$set(c)},i:function(s){r||(t&&T(t.$$.fragment,s),r=!0)},o:function(s){t&&z(t.$$.fragment,s),r=!1},d:function(s){s&&it(n),t&&kt(t,s)}}}function qJ(e){for(var t,n,r=e[0],i=[],o=0;o<r.length;o+=1)i[o]=RM(TM(e,r,o));var a=function(s){return z(i[s],1,1,function(){i[s]=null})};return{c:function(){for(var s=0;s<i.length;s+=1)i[s].c();t=vn()},m:function(s,u){for(var c=0;c<i.length;c+=1)i[c]&&i[c].m(s,u);ot(s,t,u),n=!0},p:function(s,u){var c=ke(u,1)[0];if(1&c){var l;for(r=s[0],l=0;l<r.length;l+=1){var f=TM(s,r,l);i[l]?(i[l].p(f,c),T(i[l],1)):(i[l]=RM(f),i[l].c(),T(i[l],1),i[l].m(t.parentNode,t))}for(Dt(),l=r.length;l<i.length;l+=1)a(l);Lt()}},i:function(s){if(!n){for(var u=0;u<r.length;u+=1)T(i[u]);n=!0}},o:function(s){i=i.filter(Boolean);for(var u=0;u<i.length;u+=1)z(i[u]);n=!1},d:function(s){ur(i,s),s&&it(t)}}}function HJ(e,t,n){var r,i,o=t.path,a=t.value,s=t.context,u=t.enforceString,c=t.selection,l=t.searchResultItems;return e.$$set=function(f){"path"in f&&n(1,o=f.path),"value"in f&&n(2,a=f.value),"context"in f&&n(3,s=f.context),"enforceString"in f&&n(4,u=f.enforceString),"selection"in f&&n(5,c=f.selection),"searchResultItems"in f&&n(6,l=f.searchResultItems)},e.$$.update=function(){40&e.$$.dirty&&n(7,r=!s.readOnly&&Ge(c)&&Ka(c)),254&e.$$.dirty&&n(0,i=s.onRenderValue({path:o,value:a,readOnly:s.readOnly,enforceString:u,isEditing:r,parser:s.parser,normalization:s.normalization,selection:c,searchResultItems:l,onPatch:s.onPatch,onPasteJson:s.onPasteJson,onSelect:s.onSelect,onFind:s.onFind,findNextInside:s.findNextInside,focus:s.focus}))},[i,o,a,s,u,c,l,r]}var UJ=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,HJ,qJ,Be,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),i}return tt(n)}(),JJ=UJ,Pr={selecting:!1,selectionAnchor:null,selectionAnchorType:null,selectionFocus:null,dragging:!1};function f0(e){var t=e.json,n=e.documentState,r=e.deltaY,i=e.items;if(!n.selection)return{operations:void 0,updatedSelection:void 0,offset:0};var o=n.selection,a=r<0?function(l){for(var f=l.items,h=l.selection,d=l.deltaY,v=Wu(h),p=f.findIndex(function(j){return rn(j.path,v)}),m=function(){var j;return(j=f[g-1])===null||j===void 0?void 0:j.height},g=p,y=0;m()!==void 0&&Math.abs(d)>y+m()/2;)y+=m(),g-=1;var b=f[g].path,w=g-p;return g!==p&&f[g]!==void 0?{beforePath:b,offset:w}:void 0}({json:t,selection:o,deltaY:r,items:i}):function(l){for(var f,h=l.json,d=l.items,v=l.selection,p=l.deltaY,m=Ph(v),g=d.findIndex(function(A){return rn(A.path,m)}),y=0,b=g,w=function(){var A;return(A=d[b+1])===null||A===void 0?void 0:A.height};w()!==void 0&&Math.abs(p)>y+w()/2;)y+=w(),b+=1;var j=Ze(m),x=se(h,j),R=Array.isArray(x),M=R?b:b+1,E=(f=d[M])===null||f===void 0?void 0:f.path,N=b-g;return E?{beforePath:E,offset:N}:{append:!0,offset:N}}({json:t,selection:o,deltaY:r,items:i});if(!a||a.offset===0)return{operations:void 0,updatedSelection:void 0,offset:0};var s=function(l,f,h){if(!f)return[];var d="beforePath"in h?h.beforePath:void 0,v="append"in h?h.append:void 0,p=Ze(f.focusPath),m=se(l,p);if(!(v||d&&Uu(d,p)&&d.length>p.length))return[];var g=Wu(f),y=Ph(f),b=le(g),w=le(y),j=d?d[p.length]:void 0;if(!nr(m)){if(An(m)){var x=Cr(b),R=Cr(w),M=j!==void 0?Cr(j):m.length;return mg(R-x+1,M<x?function(W){return{op:"move",from:Qt(p.concat(String(x+W))),path:Qt(p.concat(String(M+W)))}}:function(){return{op:"move",from:Qt(p.concat(String(x))),path:Qt(p.concat(String(M)))}})}throw new Error("Cannot create move operations: parent must be an Object or Array")}var E=Object.keys(m),N=E.indexOf(b),A=E.indexOf(w),L=v?E.length:j!==void 0?E.indexOf(j):-1;return N!==-1&&A!==-1&&L!==-1?L>N?[].concat(Oe(E.slice(N,A+1)),Oe(E.slice(L,E.length))).map(function(W){return zs(p,W)}):[].concat(Oe(E.slice(L,N)),Oe(E.slice(A+1,E.length))).map(function(W){return zs(p,W)}):[]}(t,o,a),u=se(t,Ze(Wu(o)));if(Array.isArray(u)){var c=function(l){var f,h,d=l.items,v=l.json,p=l.selection,m=l.offset,g=Wu(p),y=Ph(p),b=d.findIndex(function(R){return rn(R.path,g)}),w=d.findIndex(function(R){return rn(R.path,y)}),j=(f=d[b+m])===null||f===void 0?void 0:f.path,x=(h=d[w+m])===null||h===void 0?void 0:h.path;return wr(v,j,x)}({items:i,json:t,selection:o,offset:a.offset});return{operations:s,updatedSelection:c,offset:a.offset}}return{operations:s,updatedSelection:void 0,offset:a.offset}}function Yo(e,t){return function(n,r){if(n){for(var i={},o=0,a=Object.keys(n);o<a.length;o++){var s=a[o];r(s,n[s])&&(i[s]=n[s])}return Object.keys(i).length>0?i:void 0}}(e,function(n){return mu(n,t)})}function KJ(e){Ae(e,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function GJ(e){var t,n,r,i,o,a;return n=new on({props:{data:Fs}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-validation-error svelte-pz3g1j")},m:function(s,u){ot(s,t,u),xt(n,t,null),i=!0,o||(a=[Nt(t,"click",function(){Rr(e[0])&&e[0].apply(this,arguments)}),Nr(r=Hg.call(null,t,dt({text:e[1]},e[2])))],o=!0)},p:function(s,u){var c=ke(u,1)[0];e=s,r&&Rr(r.update)&&2&c&&r.update.call(null,dt({text:e[1]},e[2]))},i:function(s){i||(T(n.$$.fragment,s),i=!0)},o:function(s){z(n.$$.fragment,s),i=!1},d:function(s){s&&it(t),kt(n),o=!1,Mn(a)}}}function QJ(e,t,n){var r,i=Ir("absolute-popup"),o=t.validationError,a=t.onExpand;return e.$$set=function(s){"validationError"in s&&n(3,o=s.validationError),"onExpand"in s&&n(0,a=s.onExpand)},e.$$.update=function(){8&e.$$.dirty&&n(1,r=o.isChildError?"Contains invalid data":o.message)},[a,r,i,o]}var ic=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,QJ,GJ,Sr,{validationError:3,onExpand:0},KJ),i}return tt(n)}();function YJ(e){Ae(e,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var ZJ=function(e){return{}},NM=function(e){return{}};function IM(e,t,n){var r=e.slice();return r[53]=t[n],r}var XJ=function(e){return{}},DM=function(e){return{}};function LM(e,t,n){var r=e.slice();return r[47]=t[n],r[49]=n,r}function BM(e,t,n){var r=e.slice();return r[50]=t[n],r}var tK=function(e){return{}},zM=function(e){return{}};function eK(e){var t,n,r,i,o,a,s,u,c,l=!e[8].readOnly&&e[16]&&e[7]&&(Ge(e[7])||yn(e[7]))&&!e[7].edit&&rn(e[7].focusPath,e[1]),f=e[34].identifier,h=Zn(f,e,e[35],NM),d=!e[17]&&FM();o=new JJ({props:{path:e[1],value:e[0],enforceString:e[13],selection:e[16]?e[7]:void 0,searchResultItems:L_(e[6],e[9]),context:e[8]}});var v=l&&VM(e),p=e[15]&&WM(e),m=!e[17]&&qM(e);return{c:function(){t=G("div"),n=G("div"),h&&h.c(),r=vt(),d&&d.c(),i=vt(),jt(o.$$.fragment),a=vt(),v&&v.c(),s=vt(),p&&p.c(),u=vt(),m&&m.c(),C(n,"class","jse-contents svelte-1wlxti1"),C(t,"class","jse-contents-outer svelte-1wlxti1"),C(t,"style",e[18])},m:function(g,y){ot(g,t,y),F(t,n),h&&h.m(n,null),F(n,r),d&&d.m(n,null),F(n,i),xt(o,n,null),F(n,a),v&&v.m(n,null),F(t,s),p&&p.m(t,null),F(t,u),m&&m.m(t,null),c=!0},p:function(g,y){h&&h.p&&(!c||16&y[1])&&tr(h,f,g,g[35],c?Xn(f,g[35],y,ZJ):er(g[35]),NM),g[17]?d&&(d.d(1),d=null):d||((d=FM()).c(),d.m(n,i));var b={};2&y[0]&&(b.path=g[1]),1&y[0]&&(b.value=g[0]),8192&y[0]&&(b.enforceString=g[13]),65664&y[0]&&(b.selection=g[16]?g[7]:void 0),576&y[0]&&(b.searchResultItems=L_(g[6],g[9])),256&y[0]&&(b.context=g[8]),o.$set(b),65922&y[0]&&(l=!g[8].readOnly&&g[16]&&g[7]&&(Ge(g[7])||yn(g[7]))&&!g[7].edit&&rn(g[7].focusPath,g[1])),l?v?(v.p(g,y),65922&y[0]&&T(v,1)):((v=VM(g)).c(),T(v,1),v.m(n,null)):v&&(Dt(),z(v,1,1,function(){v=null}),Lt()),g[15]?p?(p.p(g,y),32768&y[0]&&T(p,1)):((p=WM(g)).c(),T(p,1),p.m(t,u)):p&&(Dt(),z(p,1,1,function(){p=null}),Lt()),g[17]?m&&(m.d(1),m=null):m?m.p(g,y):((m=qM(g)).c(),m.m(t,null)),(!c||262144&y[0])&&C(t,"style",g[18])},i:function(g){c||(T(h,g),T(o.$$.fragment,g),T(v),T(p),c=!0)},o:function(g){z(h,g),z(o.$$.fragment,g),z(v),z(p),c=!1},d:function(g){g&&it(t),h&&h.d(g),d&&d.d(),kt(o),v&&v.d(),p&&p.d(),m&&m.d()}}}function nK(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b=!e[8].readOnly&&e[16]&&e[7]&&(Ge(e[7])||yn(e[7]))&&!e[7].edit&&rn(e[7].focusPath,e[1]),w=[oK,iK],j=[];function x(S,$){return S[12]?0:1}i=x(e),o=j[i]=w[i](e);var R=e[34].identifier,M=Zn(R,e,e[35],DM),E=!e[17]&&HM();function N(S,$){return S[12]?sK:aK}var A=N(e),L=A(e),W=b&&UM(e),O=e[15]&&(!e[12]||!e[15].isChildError)&&JM(e);function I(S,$){return S[12]?cK:S[17]?void 0:uK}var q=I(e),P=q&&q(e),_=e[12]&&KM(e);return{c:function(){t=G("div"),n=G("div"),r=G("button"),o.c(),a=vt(),M&&M.c(),s=vt(),E&&E.c(),u=vt(),c=G("div"),l=G("div"),L.c(),f=vt(),W&&W.c(),h=vt(),O&&O.c(),d=vt(),P&&P.c(),v=vt(),_&&_.c(),p=vn(),C(r,"type","button"),C(r,"class","jse-expand svelte-1wlxti1"),C(r,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),C(l,"class","jse-meta-inner svelte-1wlxti1"),C(c,"class","jse-meta svelte-1wlxti1"),C(c,"data-type","selectable-value"),C(n,"class","jse-header svelte-1wlxti1"),C(t,"class","jse-header-outer svelte-1wlxti1"),C(t,"style",e[18])},m:function(S,$){ot(S,t,$),F(t,n),F(n,r),j[i].m(r,null),F(n,a),M&&M.m(n,null),F(n,s),E&&E.m(n,null),F(n,u),F(n,c),F(c,l),L.m(l,null),F(n,f),W&&W.m(n,null),F(t,h),O&&O.m(t,null),F(t,d),P&&P.m(t,null),ot(S,v,$),_&&_.m(S,$),ot(S,p,$),m=!0,g||(y=Nt(r,"click",e[21]),g=!0)},p:function(S,$){var D=i;(i=x(S))===D?j[i].p(S,$):(Dt(),z(j[D],1,1,function(){j[D]=null}),Lt(),(o=j[i])?o.p(S,$):(o=j[i]=w[i](S)).c(),T(o,1),o.m(r,null)),M&&M.p&&(!m||16&$[1])&&tr(M,R,S,S[35],m?Xn(R,S[35],$,XJ):er(S[35]),DM),S[17]?E&&(E.d(1),E=null):E||((E=HM()).c(),E.m(n,u)),A===(A=N(S))&&L?L.p(S,$):(L.d(1),(L=A(S))&&(L.c(),L.m(l,null))),65922&$[0]&&(b=!S[8].readOnly&&S[16]&&S[7]&&(Ge(S[7])||yn(S[7]))&&!S[7].edit&&rn(S[7].focusPath,S[1])),b?W?(W.p(S,$),65922&$[0]&&T(W,1)):((W=UM(S)).c(),T(W,1),W.m(n,null)):W&&(Dt(),z(W,1,1,function(){W=null}),Lt()),!S[15]||S[12]&&S[15].isChildError?O&&(Dt(),z(O,1,1,function(){O=null}),Lt()):O?(O.p(S,$),36864&$[0]&&T(O,1)):((O=JM(S)).c(),T(O,1),O.m(t,d)),q===(q=I(S))&&P?P.p(S,$):(P&&P.d(1),(P=q&&q(S))&&(P.c(),P.m(t,null))),(!m||262144&$[0])&&C(t,"style",S[18]),S[12]?_?(_.p(S,$),4096&$[0]&&T(_,1)):((_=KM(S)).c(),T(_,1),_.m(p.parentNode,p)):_&&(Dt(),z(_,1,1,function(){_=null}),Lt())},i:function(S){m||(T(o),T(M,S),T(W),T(O),T(_),m=!0)},o:function(S){z(o),z(M,S),z(W),z(O),z(_),m=!1},d:function(S){S&&it(t),j[i].d(),M&&M.d(S),E&&E.d(),L.d(),W&&W.d(),O&&O.d(),P&&P.d(),S&&it(v),_&&_.d(S),S&&it(p),g=!1,y()}}}function rK(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b=!e[8].readOnly&&e[16]&&e[7]&&(Ge(e[7])||yn(e[7]))&&!e[7].edit&&rn(e[7].focusPath,e[1]),w=[hK,fK],j=[];function x(S,$){return S[12]?0:1}i=x(e),o=j[i]=w[i](e);var R=e[34].identifier,M=Zn(R,e,e[35],zM),E=!e[17]&&ZM();function N(S,$){return S[12]?vK:dK}var A=N(e),L=A(e),W=b&&XM(e),O=e[15]&&(!e[12]||!e[15].isChildError)&&tE(e);function I(S,$){return S[12]?mK:pK}var q=I(e),P=q(e),_=e[12]&&eE(e);return{c:function(){t=G("div"),n=G("div"),r=G("button"),o.c(),a=vt(),M&&M.c(),s=vt(),E&&E.c(),u=vt(),c=G("div"),l=G("div"),L.c(),f=vt(),W&&W.c(),h=vt(),O&&O.c(),d=vt(),P.c(),v=vt(),_&&_.c(),p=vn(),C(r,"type","button"),C(r,"class","jse-expand svelte-1wlxti1"),C(r,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),C(l,"class","jse-meta-inner svelte-1wlxti1"),C(l,"data-type","selectable-value"),C(c,"class","jse-meta svelte-1wlxti1"),C(n,"class","jse-header svelte-1wlxti1"),C(t,"class","jse-header-outer svelte-1wlxti1"),C(t,"style",e[18])},m:function(S,$){ot(S,t,$),F(t,n),F(n,r),j[i].m(r,null),F(n,a),M&&M.m(n,null),F(n,s),E&&E.m(n,null),F(n,u),F(n,c),F(c,l),L.m(l,null),F(n,f),W&&W.m(n,null),F(t,h),O&&O.m(t,null),F(t,d),P.m(t,null),ot(S,v,$),_&&_.m(S,$),ot(S,p,$),m=!0,g||(y=Nt(r,"click",e[21]),g=!0)},p:function(S,$){var D=i;(i=x(S))===D?j[i].p(S,$):(Dt(),z(j[D],1,1,function(){j[D]=null}),Lt(),(o=j[i])?o.p(S,$):(o=j[i]=w[i](S)).c(),T(o,1),o.m(r,null)),M&&M.p&&(!m||16&$[1])&&tr(M,R,S,S[35],m?Xn(R,S[35],$,tK):er(S[35]),zM),S[17]?E&&(E.d(1),E=null):E||((E=ZM()).c(),E.m(n,u)),A===(A=N(S))&&L?L.p(S,$):(L.d(1),(L=A(S))&&(L.c(),L.m(l,null))),65922&$[0]&&(b=!S[8].readOnly&&S[16]&&S[7]&&(Ge(S[7])||yn(S[7]))&&!S[7].edit&&rn(S[7].focusPath,S[1])),b?W?(W.p(S,$),65922&$[0]&&T(W,1)):((W=XM(S)).c(),T(W,1),W.m(n,null)):W&&(Dt(),z(W,1,1,function(){W=null}),Lt()),!S[15]||S[12]&&S[15].isChildError?O&&(Dt(),z(O,1,1,function(){O=null}),Lt()):O?(O.p(S,$),36864&$[0]&&T(O,1)):((O=tE(S)).c(),T(O,1),O.m(t,d)),q===(q=I(S))&&P?P.p(S,$):(P.d(1),(P=q(S))&&(P.c(),P.m(t,null))),(!m||262144&$[0])&&C(t,"style",S[18]),S[12]?_?(_.p(S,$),4096&$[0]&&T(_,1)):((_=eE(S)).c(),T(_,1),_.m(p.parentNode,p)):_&&(Dt(),z(_,1,1,function(){_=null}),Lt())},i:function(S){m||(T(o),T(M,S),T(W),T(O),T(_),m=!0)},o:function(S){z(o),z(M,S),z(W),z(O),z(_),m=!1},d:function(S){S&&it(t),j[i].d(),M&&M.d(S),E&&E.d(),L.d(),W&&W.d(),O&&O.d(),P.d(),S&&it(v),_&&_.d(S),S&&it(p),g=!1,y()}}}function FM(e){var t;return{c:function(){(t=G("div")).textContent=":",C(t,"class","jse-separator svelte-1wlxti1")},m:function(n,r){ot(n,t,r)},d:function(n){n&&it(t)}}}function VM(e){var t,n,r;return n=new ts({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(i,o){ot(i,t,o),xt(n,t,null),r=!0},p:function(i,o){var a={};256&o[0]&&(a.onContextMenu=i[8].onContextMenu),n.$set(a)},i:function(i){r||(T(n.$$.fragment,i),r=!0)},o:function(i){z(n.$$.fragment,i),r=!1},d:function(i){i&&it(t),kt(n)}}}function WM(e){var t,n;return t=new ic({props:{validationError:e[15],onExpand:e[22]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};32768&i[0]&&(o.validationError=r[15]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function qM(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),C(t,"data-type","insert-selection-area-after")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[30]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function iK(e){var t,n;return t=new on({props:{data:Ga}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function oK(e){var t,n;return t=new on({props:{data:qi}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function HM(e){var t;return{c:function(){(t=G("div")).textContent=":",C(t,"class","jse-separator svelte-1wlxti1")},m:function(n,r){ot(n,t,r)},d:function(n){n&&it(t)}}}function aK(e){var t,n,r,i,o,a,s,u,c,l,f=Object.keys(e[0]).length+"",h=Object.keys(e[0]).length===1?"prop":"props";return{c:function(){(t=G("div")).textContent="{",n=vt(),r=G("button"),i=Jt(f),o=vt(),a=Jt(h),s=vt(),(u=G("div")).textContent="}",C(t,"class","jse-bracket svelte-1wlxti1"),C(r,"type","button"),C(r,"class","jse-tag svelte-1wlxti1"),C(u,"class","jse-bracket svelte-1wlxti1")},m:function(d,v){ot(d,t,v),ot(d,n,v),ot(d,r,v),F(r,i),F(r,o),F(r,a),ot(d,s,v),ot(d,u,v),c||(l=Nt(r,"click",e[22]),c=!0)},p:function(d,v){1&v[0]&&f!==(f=Object.keys(d[0]).length+"")&&be(i,f),1&v[0]&&h!==(h=Object.keys(d[0]).length===1?"prop":"props")&&be(a,h)},d:function(d){d&&it(t),d&&it(n),d&&it(r),d&&it(s),d&&it(u),c=!1,l()}}}function sK(e){var t;return{c:function(){(t=G("div")).textContent="{",C(t,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(n,r){ot(n,t,r)},p:It,d:function(n){n&&it(t)}}}function UM(e){var t,n,r;return n=new ts({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(i,o){ot(i,t,o),xt(n,t,null),r=!0},p:function(i,o){var a={};256&o[0]&&(a.onContextMenu=i[8].onContextMenu),n.$set(a)},i:function(i){r||(T(n.$$.fragment,i),r=!0)},o:function(i){z(n.$$.fragment,i),r=!1},d:function(i){i&&it(t),kt(n)}}}function JM(e){var t,n;return t=new ic({props:{validationError:e[15],onExpand:e[22]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};32768&i[0]&&(o.validationError=r[15]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function uK(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),C(t,"data-type","insert-selection-area-after")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[30]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function cK(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),C(t,"data-type","insert-selection-area-inside")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[29]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function KM(e){for(var t,n,r,i,o,a,s,u=!e[8].readOnly&&(e[10]===da||e[16]&&_r(e[7])),c=u&&GM(e),l=e[19](e[1],e[0],e[2],e[3],e[4],e[5],e[6],e[7],e[11]),f=[],h=0;h<l.length;h+=1)f[h]=QM(IM(e,l,h));var d=function(p){return z(f[p],1,1,function(){f[p]=null})},v=!e[17]&&YM(e);return{c:function(){t=G("div"),c&&c.c(),n=vt();for(var p=0;p<f.length;p+=1)f[p].c();r=vt(),i=G("div"),(o=G("div")).innerHTML='<div class="jse-bracket svelte-1wlxti1">}</div>',a=vt(),v&&v.c(),C(t,"class","jse-props svelte-1wlxti1"),C(o,"data-type","selectable-value"),C(o,"class","jse-footer svelte-1wlxti1"),C(i,"class","jse-footer-outer svelte-1wlxti1"),C(i,"style",e[18])},m:function(p,m){ot(p,t,m),c&&c.m(t,null),F(t,n);for(var g=0;g<f.length;g+=1)f[g]&&f[g].m(t,null);ot(p,r,m),ot(p,i,m),F(i,o),F(i,a),v&&v.m(i,null),s=!0},p:function(p,m){if(66944&m[0]&&(u=!p[8].readOnly&&(p[10]===da||p[16]&&_r(p[7]))),u?c?(c.p(p,m),66944&m[0]&&T(c,1)):((c=GM(p)).c(),T(c,1),c.m(t,n)):c&&(Dt(),z(c,1,1,function(){c=null}),Lt()),76024319&m[0]){var g;for(l=p[19](p[1],p[0],p[2],p[3],p[4],p[5],p[6],p[7],p[11]),g=0;g<l.length;g+=1){var y=IM(p,l,g);f[g]?(f[g].p(y,m),T(f[g],1)):(f[g]=QM(y),f[g].c(),T(f[g],1),f[g].m(t,null))}for(Dt(),g=l.length;g<f.length;g+=1)d(g);Lt()}p[17]?v&&(v.d(1),v=null):v?v.p(p,m):((v=YM(p)).c(),v.m(i,null)),(!s||262144&m[0])&&C(i,"style",p[18])},i:function(p){if(!s){T(c);for(var m=0;m<l.length;m+=1)T(f[m]);s=!0}},o:function(p){z(c),f=f.filter(Boolean);for(var m=0;m<f.length;m+=1)z(f[m]);s=!1},d:function(p){p&&it(t),c&&c.d(),ur(f,p),p&&it(r),p&&it(i),v&&v.d()}}}function GM(e){var t,n,r,i;return n=new ts({props:{selected:e[16]&&_r(e[7]),onContextMenu:e[31]}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-insert-area jse-inside svelte-1wlxti1"),C(t,"data-type","insert-selection-area-inside"),C(t,"style",r=$l(e[1].length+1)),C(t,"title",sp),At(t,"jse-hovered",e[10]===da),At(t,"jse-selected",e[16]&&_r(e[7]))},m:function(o,a){ot(o,t,a),xt(n,t,null),i=!0},p:function(o,a){var s={};65664&a[0]&&(s.selected=o[16]&&_r(o[7])),n.$set(s),(!i||2&a[0]&&r!==(r=$l(o[1].length+1)))&&C(t,"style",r),(!i||1024&a[0])&&At(t,"jse-hovered",o[10]===da),(!i||65664&a[0])&&At(t,"jse-selected",o[16]&&_r(o[7]))},i:function(o){i||(T(n.$$.fragment,o),i=!0)},o:function(o){z(n.$$.fragment,o),i=!1},d:function(o){o&&it(t),kt(n)}}}function lK(e){var t,n,r,i;return n=new WJ({props:{path:e[53].path,pointer:e[53].pointer,key:e[53].key,selection:e[53].selection,searchResultItems:e[53].keySearchResultItemsMap,context:e[8],onUpdateKey:e[23]}}),{c:function(){t=G("div"),jt(n.$$.fragment),r=vt(),C(t,"slot","identifier"),C(t,"class","jse-identifier svelte-1wlxti1")},m:function(o,a){ot(o,t,a),xt(n,t,null),F(t,r),i=!0},p:function(o,a){var s={};2303&a[0]&&(s.path=o[53].path),2303&a[0]&&(s.pointer=o[53].pointer),2303&a[0]&&(s.key=o[53].key),2303&a[0]&&(s.selection=o[53].selection),2303&a[0]&&(s.searchResultItems=o[53].keySearchResultItemsMap),256&a[0]&&(s.context=o[8]),n.$set(s)},i:function(o){i||(T(n.$$.fragment,o),i=!0)},o:function(o){z(n.$$.fragment,o),i=!1},d:function(o){o&&it(t),kt(n)}}}function QM(e){var t,n;return t=new h0({props:{value:e[53].value,path:e[53].path,expandedMap:e[53].expandedMap,enforceStringMap:e[53].enforceStringMap,visibleSectionsMap:e[53].visibleSectionsMap,validationErrorsMap:e[53].validationErrorsMap,searchResultItemsMap:e[53].valueSearchResultItemsMap,selection:e[53].selection,context:e[8],onDragSelectionStart:e[26],$$slots:{identifier:[lK]},$$scope:{ctx:e}}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};2303&i[0]&&(o.value=r[53].value),2303&i[0]&&(o.path=r[53].path),2303&i[0]&&(o.expandedMap=r[53].expandedMap),2303&i[0]&&(o.enforceStringMap=r[53].enforceStringMap),2303&i[0]&&(o.visibleSectionsMap=r[53].visibleSectionsMap),2303&i[0]&&(o.validationErrorsMap=r[53].validationErrorsMap),2303&i[0]&&(o.searchResultItemsMap=r[53].valueSearchResultItemsMap),2303&i[0]&&(o.selection=r[53].selection),256&i[0]&&(o.context=r[8]),2559&i[0]|16&i[1]&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function YM(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),C(t,"data-type","insert-selection-area-after")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[30]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function fK(e){var t,n;return t=new on({props:{data:Ga}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function hK(e){var t,n;return t=new on({props:{data:qi}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function ZM(e){var t;return{c:function(){(t=G("div")).textContent=":",C(t,"class","jse-separator svelte-1wlxti1")},m:function(n,r){ot(n,t,r)},d:function(n){n&&it(t)}}}function dK(e){var t,n,r,i,o,a,s,u,c,l,f=e[0].length+"",h=e[0].length===1?"item":"items";return{c:function(){(t=G("div")).textContent="[",n=vt(),r=G("button"),i=Jt(f),o=vt(),a=Jt(h),s=vt(),(u=G("div")).textContent="]",C(t,"class","jse-bracket svelte-1wlxti1"),C(r,"type","button"),C(r,"class","jse-tag svelte-1wlxti1"),C(u,"class","jse-bracket svelte-1wlxti1")},m:function(d,v){ot(d,t,v),ot(d,n,v),ot(d,r,v),F(r,i),F(r,o),F(r,a),ot(d,s,v),ot(d,u,v),c||(l=Nt(r,"click",e[22]),c=!0)},p:function(d,v){1&v[0]&&f!==(f=d[0].length+"")&&be(i,f),1&v[0]&&h!==(h=d[0].length===1?"item":"items")&&be(a,h)},d:function(d){d&&it(t),d&&it(n),d&&it(r),d&&it(s),d&&it(u),c=!1,l()}}}function vK(e){var t,n,r,i,o,a,s,u=e[0].length+"",c=e[0].length===1?"item":"items";return{c:function(){(t=G("div")).textContent="[",n=vt(),r=G("span"),i=Jt(u),o=vt(),a=Jt(c),s=Jt(`
|
|
\xA0`),C(t,"class","jse-bracket svelte-1wlxti1"),C(r,"class","jse-tag jse-expanded svelte-1wlxti1")},m:function(l,f){ot(l,t,f),ot(l,n,f),ot(l,r,f),F(r,i),F(r,o),F(r,a),ot(l,s,f)},p:function(l,f){1&f[0]&&u!==(u=l[0].length+"")&&be(i,u),1&f[0]&&c!==(c=l[0].length===1?"item":"items")&&be(a,c)},d:function(l){l&&it(t),l&&it(n),l&&it(r),l&&it(s)}}}function XM(e){var t,n,r;return n=new ts({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(i,o){ot(i,t,o),xt(n,t,null),r=!0},p:function(i,o){var a={};256&o[0]&&(a.onContextMenu=i[8].onContextMenu),n.$set(a)},i:function(i){r||(T(n.$$.fragment,i),r=!0)},o:function(i){z(n.$$.fragment,i),r=!1},d:function(i){i&&it(t),kt(n)}}}function tE(e){var t,n;return t=new ic({props:{validationError:e[15],onExpand:e[22]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};32768&i[0]&&(o.validationError=r[15]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function pK(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),C(t,"data-type","insert-selection-area-after")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[30]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function mK(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),C(t,"data-type","insert-selection-area-inside")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[29]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function eE(e){for(var t,n,r,i,o,a,s,u=!e[8].readOnly&&(e[10]===da||e[16]&&_r(e[7])),c=[],l=new Map,f=u&&nE(e),h=e[14]||js,d=function(y){return y[49]},v=0;v<h.length;v+=1){var p=LM(e,h,v),m=d(p);l.set(m,c[v]=oE(m,p))}var g=!e[17]&&aE(e);return{c:function(){t=G("div"),f&&f.c(),n=vt();for(var y=0;y<c.length;y+=1)c[y].c();r=vt(),i=G("div"),(o=G("div")).innerHTML='<span class="jse-bracket svelte-1wlxti1">]</span>',a=vt(),g&&g.c(),C(t,"class","jse-items svelte-1wlxti1"),C(o,"data-type","selectable-value"),C(o,"class","jse-footer svelte-1wlxti1"),C(i,"class","jse-footer-outer svelte-1wlxti1"),C(i,"style",e[18])},m:function(y,b){ot(y,t,b),f&&f.m(t,null),F(t,n);for(var w=0;w<c.length;w+=1)c[w]&&c[w].m(t,null);ot(y,r,b),ot(y,i,b),F(i,o),F(i,a),g&&g.m(i,null),s=!0},p:function(y,b){66944&b[0]&&(u=!y[8].readOnly&&(y[10]===da||y[16]&&_r(y[7]))),u?f?(f.p(y,b),66944&b[0]&&T(f,1)):((f=nE(y)).c(),T(f,1),f.m(t,n)):f&&(Dt(),z(f,1,1,function(){f=null}),Lt()),68176895&b[0]&&(h=y[14]||js,Dt(),c=jf(c,b,d,1,y,h,l,t,op,oE,null,LM),Lt()),y[17]?g&&(g.d(1),g=null):g?g.p(y,b):((g=aE(y)).c(),g.m(i,null)),(!s||262144&b[0])&&C(i,"style",y[18])},i:function(y){if(!s){T(f);for(var b=0;b<h.length;b+=1)T(c[b]);s=!0}},o:function(y){z(f);for(var b=0;b<c.length;b+=1)z(c[b]);s=!1},d:function(y){y&&it(t),f&&f.d();for(var b=0;b<c.length;b+=1)c[b].d();y&&it(r),y&&it(i),g&&g.d()}}}function nE(e){var t,n,r,i;return n=new ts({props:{selected:e[16]&&_r(e[7]),onContextMenu:e[31]}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-insert-area jse-inside svelte-1wlxti1"),C(t,"data-type","insert-selection-area-inside"),C(t,"style",r=$l(e[1].length+1)),C(t,"title",sp),At(t,"jse-hovered",e[10]===da),At(t,"jse-selected",e[16]&&_r(e[7]))},m:function(o,a){ot(o,t,a),xt(n,t,null),i=!0},p:function(o,a){var s={};65664&a[0]&&(s.selected=o[16]&&_r(o[7])),n.$set(s),(!i||2&a[0]&&r!==(r=$l(o[1].length+1)))&&C(t,"style",r),(!i||1024&a[0])&&At(t,"jse-hovered",o[10]===da),(!i||65664&a[0])&&At(t,"jse-selected",o[16]&&_r(o[7]))},i:function(o){i||(T(n.$$.fragment,o),i=!0)},o:function(o){z(n.$$.fragment,o),i=!1},d:function(o){o&&it(t),kt(n)}}}function gK(e){var t,n,r,i=e[50].index+"";return{c:function(){t=G("div"),n=G("div"),r=Jt(i),C(n,"class","jse-index svelte-1wlxti1"),C(t,"slot","identifier"),C(t,"class","jse-identifier svelte-1wlxti1")},m:function(o,a){ot(o,t,a),F(t,n),F(n,r)},p:function(o,a){18687&a[0]&&i!==(i=o[50].index+"")&&be(r,i)},d:function(o){o&&it(t)}}}function rE(e,t){var n,r,i;return r=new h0({props:{value:t[50].value,path:t[50].path,expandedMap:t[50].expandedMap,enforceStringMap:t[50].enforceStringMap,visibleSectionsMap:t[50].visibleSectionsMap,validationErrorsMap:t[50].validationErrorsMap,searchResultItemsMap:t[50].searchResultItemsMap,selection:t[50].selection,context:t[8],onDragSelectionStart:t[26],$$slots:{identifier:[gK]},$$scope:{ctx:t}}}),{key:e,first:null,c:function(){n=vn(),jt(r.$$.fragment),this.first=n},m:function(o,a){ot(o,n,a),xt(r,o,a),i=!0},p:function(o,a){t=o;var s={};18687&a[0]&&(s.value=t[50].value),18687&a[0]&&(s.path=t[50].path),18687&a[0]&&(s.expandedMap=t[50].expandedMap),18687&a[0]&&(s.enforceStringMap=t[50].enforceStringMap),18687&a[0]&&(s.visibleSectionsMap=t[50].visibleSectionsMap),18687&a[0]&&(s.validationErrorsMap=t[50].validationErrorsMap),18687&a[0]&&(s.searchResultItemsMap=t[50].searchResultItemsMap),18687&a[0]&&(s.selection=t[50].selection),256&a[0]&&(s.context=t[8]),18687&a[0]|16&a[1]&&(s.$$scope={dirty:a,ctx:t}),r.$set(s)},i:function(o){i||(T(r.$$.fragment,o),i=!0)},o:function(o){z(r.$$.fragment,o),i=!1},d:function(o){o&&it(n),kt(r,o)}}}function iE(e){var t,n;return t=new PJ({props:{visibleSections:e[14]||js,sectionIndex:e[49],total:e[0].length,path:e[1],pointer:e[9],onExpandSection:e[8].onExpandSection,selection:e[7]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};16384&i[0]&&(o.visibleSections=r[14]||js),16384&i[0]&&(o.sectionIndex=r[49]),1&i[0]&&(o.total=r[0].length),2&i[0]&&(o.path=r[1]),512&i[0]&&(o.pointer=r[9]),256&i[0]&&(o.onExpandSection=r[8].onExpandSection),128&i[0]&&(o.selection=r[7]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function oE(e,t){for(var n,r,i,o,a=[],s=new Map,u=t[20](t[1],t[0],t[47],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),c=function(v){return v[50].index},l=0;l<u.length;l+=1){var f=BM(t,u,l),h=c(f);s.set(h,a[l]=rE(h,f))}var d=t[47].end<t[0].length&&iE(t);return{key:e,first:null,c:function(){n=vn();for(var v=0;v<a.length;v+=1)a[v].c();r=vt(),d&&d.c(),i=vn(),this.first=n},m:function(v,p){ot(v,n,p);for(var m=0;m<a.length;m+=1)a[m]&&a[m].m(v,p);ot(v,r,p),d&&d.m(v,p),ot(v,i,p),o=!0},p:function(v,p){t=v,68176383&p[0]&&(u=t[20](t[1],t[0],t[47],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),Dt(),a=jf(a,p,c,1,t,u,s,r.parentNode,op,rE,r,BM),Lt()),t[47].end<t[0].length?d?(d.p(t,p),16385&p[0]&&T(d,1)):((d=iE(t)).c(),T(d,1),d.m(i.parentNode,i)):d&&(Dt(),z(d,1,1,function(){d=null}),Lt())},i:function(v){if(!o){for(var p=0;p<u.length;p+=1)T(a[p]);T(d),o=!0}},o:function(v){for(var p=0;p<a.length;p+=1)z(a[p]);z(d),o=!1},d:function(v){v&&it(n);for(var p=0;p<a.length;p+=1)a[p].d(v);v&&it(r),d&&d.d(v),v&&it(i)}}}function aE(e){var t,n,r;return{c:function(){C(t=G("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),C(t,"data-type","insert-selection-area-after")},m:function(i,o){ot(i,t,o),n||(r=Nt(t,"click",e[30]),n=!0)},p:It,d:function(i){i&&it(t),n=!1,r()}}}function sE(e){var t,n,r;return n=new ts({props:{selected:e[16]&&fo(e[7]),onContextMenu:e[32]}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-insert-area jse-after svelte-1wlxti1"),C(t,"data-type","insert-selection-area-after"),C(t,"style",e[18]),C(t,"title",sp),At(t,"jse-hovered",e[10]===Vc),At(t,"jse-selected",e[16]&&fo(e[7]))},m:function(i,o){ot(i,t,o),xt(n,t,null),r=!0},p:function(i,o){var a={};65664&o[0]&&(a.selected=i[16]&&fo(i[7])),n.$set(a),(!r||262144&o[0])&&C(t,"style",i[18]),(!r||1024&o[0])&&At(t,"jse-hovered",i[10]===Vc),(!r||65664&o[0])&&At(t,"jse-selected",i[16]&&fo(i[7]))},i:function(i){r||(T(n.$$.fragment,i),r=!0)},o:function(i){z(n.$$.fragment,i),r=!1},d:function(i){i&&it(t),kt(n)}}}function yK(e){var t,n,r,i,o,a,s,u,c,l,f,h=!e[8].readOnly&&(e[10]===Vc||e[16]&&fo(e[7])),d=[rK,nK,eK],v=[];function p(g,y){return 1&y[0]&&(n=null),1&y[0]&&(r=null),n==null&&(n=!!Array.isArray(g[0])),n?0:(r==null&&(r=!!In(g[0])),r?1:2)}i=p(e,[-1,-1]),o=v[i]=d[i](e);var m=h&&sE(e);return{c:function(){t=G("div"),o.c(),a=vt(),m&&m.c(),C(t,"class",s=Wn(Ko("jse-json-node",{"jse-expanded":e[12]},e[8].onClassName(e[1],e[0])))+" svelte-1wlxti1"),C(t,"data-path",u=zu(e[1])),At(t,"jse-root",e[17]),At(t,"jse-selected",e[16]&&yn(e[7])),At(t,"jse-selected-key",e[16]&&yr(e[7])),At(t,"jse-selected-value",e[16]&&Ge(e[7])),At(t,"jse-readonly",e[8].readOnly),At(t,"jse-hovered",e[10]===cp)},m:function(g,y){ot(g,t,y),v[i].m(t,null),F(t,a),m&&m.m(t,null),c=!0,l||(f=[Nt(t,"mousedown",e[24]),Nt(t,"mousemove",e[25]),Nt(t,"mouseover",e[27]),Nt(t,"mouseout",e[28]),Nt(t,"focus",void 0),Nt(t,"blur",void 0)],l=!0)},p:function(g,y){var b=i;(i=p(g,y))===b?v[i].p(g,y):(Dt(),z(v[b],1,1,function(){v[b]=null}),Lt(),(o=v[i])?o.p(g,y):(o=v[i]=d[i](g)).c(),T(o,1),o.m(t,a)),66944&y[0]&&(h=!g[8].readOnly&&(g[10]===Vc||g[16]&&fo(g[7]))),h?m?(m.p(g,y),66944&y[0]&&T(m,1)):((m=sE(g)).c(),T(m,1),m.m(t,null)):m&&(Dt(),z(m,1,1,function(){m=null}),Lt()),(!c||4355&y[0]&&s!==(s=Wn(Ko("jse-json-node",{"jse-expanded":g[12]},g[8].onClassName(g[1],g[0])))+" svelte-1wlxti1"))&&C(t,"class",s),(!c||2&y[0]&&u!==(u=zu(g[1])))&&C(t,"data-path",u),(!c||135427&y[0])&&At(t,"jse-root",g[17]),(!c||70019&y[0])&&At(t,"jse-selected",g[16]&&yn(g[7])),(!c||70019&y[0])&&At(t,"jse-selected-key",g[16]&&yr(g[7])),(!c||70019&y[0])&&At(t,"jse-selected-value",g[16]&&Ge(g[7])),(!c||4355&y[0])&&At(t,"jse-readonly",g[8].readOnly),(!c||5379&y[0])&&At(t,"jse-hovered",g[10]===cp)},i:function(g){c||(T(o),T(m),c=!0)},o:function(g){z(o),z(m),c=!1},d:function(g){g&&it(t),v[i].d(),m&&m.d(),l=!1,Mn(f)}}}function $l(e){return"margin-left: calc(".concat(e," * var(--jse-indent-size))")}function bK(e,t,n){var r,i,o,a,s,u,c,l,f=t.$$slots,h=f===void 0?{}:f,d=t.$$scope,v=t.value,p=t.path,m=t.expandedMap,g=t.enforceStringMap,y=t.visibleSectionsMap,b=t.validationErrorsMap,w=t.searchResultItemsMap,j=t.selection,x=t.context,R=t.onDragSelectionStart,M=Dr("jsoneditor:JSONNode"),E=void 0,N=void 0,A=void 0,L=Su(function(S){return S},pi);function W(S){x.onDrag(S)}function O(S){Pr.selecting&&(Pr.selecting=!1,S.stopPropagation()),x.onDragEnd(),document.removeEventListener("mousemove",W,!0),document.removeEventListener("mouseup",O)}function I(){var S,$;return((S=x.findElement([]))===null||S===void 0||($=S.getBoundingClientRect())===null||$===void 0?void 0:$.top)||0}function q(S,$){var D=I()-S.initialContentTop;return $.clientY-S.initialClientY-D}function P(S){if(A){var $=x.getJson(),D=x.getDocumentState(),B=q(A,S),k=f0({json:$,documentState:D,deltaY:B,items:A.items}).offset;k!==A.offset&&(M("drag selection",k,B),n(11,A=dt(dt({},A),{},{offset:k,didMoveItems:!0})))}}function _(S){if(A){var $=x.getJson(),D=f0({json:$,documentState:x.getDocumentState(),deltaY:q(A,S),items:A.items}),B=D.operations,k=D.updatedSelection;if(B)x.onPatch(B,function(st,ut){return{state:dt(dt({},ut),{},{selection:k||j})}});else if(S.target===A.initialTarget&&!A.didMoveItems){var H=Og(S.target),U=G6(S.target);U&&x.onSelect($_($,H,U))}n(11,A=void 0),Pr.dragging=!1,document.removeEventListener("mousemove",P,!0),document.removeEventListener("mouseup",_)}}return e.$$set=function(S){"value"in S&&n(0,v=S.value),"path"in S&&n(1,p=S.path),"expandedMap"in S&&n(2,m=S.expandedMap),"enforceStringMap"in S&&n(3,g=S.enforceStringMap),"visibleSectionsMap"in S&&n(4,y=S.visibleSectionsMap),"validationErrorsMap"in S&&n(5,b=S.validationErrorsMap),"searchResultItemsMap"in S&&n(6,w=S.searchResultItemsMap),"selection"in S&&n(7,j=S.selection),"context"in S&&n(8,x=S.context),"onDragSelectionStart"in S&&n(33,R=S.onDragSelectionStart),"$$scope"in S&&n(35,d=S.$$scope)},e.$$.update=function(){2&e.$$.dirty[0]&&n(9,o=Qt(p)),516&e.$$.dirty[0]&&n(12,a=!!m&&m[o]===!0),777&e.$$.dirty[0]&&n(13,s=ja(v,g,o,x.parser)),528&e.$$.dirty[0]&&n(14,u=y?y[o]:void 0),544&e.$$.dirty[0]&&n(15,c=b?b[o]:void 0),640&e.$$.dirty[0]&&n(16,l=!!j&&j.pointersMap[o]===!0),2&e.$$.dirty[0]&&n(17,r=p.length===0),2&e.$$.dirty[0]&&n(18,i=$l(p.length))},[v,p,m,g,y,b,w,j,x,o,E,A,a,s,u,c,l,r,i,function(S,$,D,B,k,H,U,st,ut){var gt=Object.keys($).map(function(St){var Pt=wp(o,St);return{key:St,value:$[St],path:L(S.concat(St)),pointer:Pt,expandedMap:Yo(D,Pt),enforceStringMap:Yo(B,Pt),visibleSectionsMap:Yo(k,Pt),validationErrorsMap:Yo(H,Pt),keySearchResultItemsMap:Sq(U,Pt),valueSearchResultItemsMap:Yo(U,Pt),selection:__(st,Pt)}});return ut&&ut.offset!==0&&(gt=P6(gt,ut.selectionStartIndex,ut.selectionItemsCount,ut.offset)),gt},function(S,$,D,B,k,H,U,st,ut,gt){for(var St=D.start,Pt=Math.min(D.end,$.length),pt=[],Bt=St;Bt<Pt;Bt++){var K=wp(o,Bt);pt.push({index:Bt,value:$[Bt],path:L(S.concat(String(Bt))),pointer:K,expandedMap:Yo(B,K),enforceStringMap:Yo(k,K),visibleSectionsMap:Yo(H,K),validationErrorsMap:Yo(U,K),searchResultItemsMap:Yo(st,K),selection:__(ut,K)})}if(gt&>.offset!==0){var $t=pt.map(function(Ct){return Ct.index});pt=P6(pt,gt.selectionStartIndex,gt.selectionItemsCount,gt.offset);for(var Kt=0;Kt<pt.length;Kt++)pt[Kt].index=$t[Kt]}return pt},function(S){S.stopPropagation();var $=S.ctrlKey;x.onExpand(p,!a,$)},function(S){S.stopPropagation(),x.onExpand(p,!0)},function(S,$){var D=wl(p,Object.keys(v),S,$);return x.onPatch(D),le(ao(D[0].path))},function(S){if(!(function(U){return U.nodeName==="DIV"&&U.contentEditable==="true"}(S.target)||S.which===1&&U6(S.target,"BUTTON"))){S.stopPropagation(),S.preventDefault(),x.focus(),document.addEventListener("mousemove",W,!0),document.addEventListener("mouseup",O);var $=Og(S.target),D=x.getJson(),B=x.getDocumentState();if(j&&b_(j,p,$))S.button===0&&R(S);else if(Pr.selecting=!0,Pr.selectionAnchor=p,Pr.selectionAnchorType=$,Pr.selectionFocus=p,S.shiftKey){var k=x.getDocumentState().selection;k&&x.onSelect(wr(D,k.anchorPath,p))}else if($===En.multi)if(r&&S.target.hasAttribute("data-path")){var H=le(g_(v,B));x.onSelect(Fg(H))}else x.onSelect(wr(D,p,p));else x.onSelect($_(D,$,p))}},function(S){if(Pr.selecting){S.preventDefault(),S.stopPropagation(),Pr.selectionFocus==null&&window.getSelection&&window.getSelection().empty();var $=Og(S.target);if(!rn(p,Pr.selectionFocus)||$!==Pr.selectionAnchorType){Pr.selectionFocus=p,Pr.selectionAnchorType=$;var D=x.getJson();x.onSelect(wr(D,Pr.selectionAnchor||Pr.selectionFocus,Pr.selectionFocus))}}},function(S){if(!x.readOnly&&j){var $=Ze(j.focusPath);if(rn(p,$)){var D=function(U,st){var ut=[];function gt(Ct){var V=p.concat(Ct),Q=x.findElement(V);Q!=null&&ut.push({path:V,height:Q.clientHeight})}if(Array.isArray(v)){var St=Wu(U),Pt=Ph(U),pt=le(St),Bt=le(Pt),K=st.find(function(Ct){return pt>=Ct.start&&Bt<=Ct.end});if(!K)return null;var $t=K.start,Kt=K.end;M6($t,Math.min(v.length,Kt),function(Ct){return gt(String(Ct))})}else Object.keys(v).forEach(gt);return ut}(j,u||js);if(M("dragSelectionStart",{selection:j,items:D}),D){var B=Wu(j),k=D.findIndex(function(U){return rn(U.path,B)}),H=f0({json:x.getJson(),documentState:x.getDocumentState(),deltaY:0,items:D}).offset;n(11,A={initialTarget:S.target,initialClientY:S.clientY,initialContentTop:I(),selectionStartIndex:k,selectionItemsCount:C_(j).length,items:D,offset:H,didMoveItems:!1}),Pr.dragging=!0,document.addEventListener("mousemove",P,!0),document.addEventListener("mouseup",_)}else M("Cannot drag the current selection (probably spread over multiple sections)")}else R(S)}},function(S){Pr.selecting||Pr.dragging||(S.stopPropagation(),Ls(S.target,"data-type","selectable-value")?n(10,E=cp):Ls(S.target,"data-type","insert-selection-area-inside")?n(10,E=da):Ls(S.target,"data-type","insert-selection-area-after")&&n(10,E=Vc),clearTimeout(N))},function(S){S.stopPropagation(),N=setTimeout(function(){return n(10,E=void 0)})},function(S){S.shiftKey||(S.stopPropagation(),S.preventDefault(),x.onSelect(Ja(p)))},function(S){S.shiftKey||(S.stopPropagation(),S.preventDefault(),x.onSelect(Sa(p)))},function(S){x.onSelect(Ja(p)),x.onContextMenu(S)},function(S){x.onSelect(Sa(p)),x.onContextMenu(S)},R,h,d]}var h0=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,bK,yK,Be,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},YJ,[-1,-1]),i}return tt(n)}(),wK=h0,xK={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"]},kK={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"]},d0={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"]},jK={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"]};function SK(e){var t,n;return t=new Gh({props:{items:e[0]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&ke(i,1)[0]&&(o.items=r[0]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function CK(e,t,n){var r,i,o,a,s,u,c,l=t.json,f=t.selection,h=t.readOnly,d=t.showSearch,v=d!==void 0&&d,p=t.historyState,m=t.onExpandAll,g=t.onCollapseAll,y=t.onUndo,b=t.onRedo,w=t.onSort,j=t.onTransform,x=t.onContextMenu,R=t.onCopy,M=t.onRenderMenu;function E(){n(1,v=!v)}return e.$$set=function(N){"json"in N&&n(2,l=N.json),"selection"in N&&n(3,f=N.selection),"readOnly"in N&&n(4,h=N.readOnly),"showSearch"in N&&n(1,v=N.showSearch),"historyState"in N&&n(5,p=N.historyState),"onExpandAll"in N&&n(6,m=N.onExpandAll),"onCollapseAll"in N&&n(7,g=N.onCollapseAll),"onUndo"in N&&n(8,y=N.onUndo),"onRedo"in N&&n(9,b=N.onRedo),"onSort"in N&&n(10,w=N.onSort),"onTransform"in N&&n(11,j=N.onTransform),"onContextMenu"in N&&n(12,x=N.onContextMenu),"onCopy"in N&&n(13,R=N.onCopy),"onRenderMenu"in N&&n(14,M=N.onRenderMenu)},e.$$.update=function(){4&e.$$.dirty&&n(20,r=l!==void 0),e.$$.dirty,1048584&e.$$.dirty&&n(19,i=r&&(yn(f)||yr(f)||Ge(f))),68&e.$$.dirty&&n(15,a={type:"button",icon:xK,title:"Expand all",className:"jse-expand-all",onClick:m,disabled:!Jn(l)}),132&e.$$.dirty&&n(16,s={type:"button",icon:kK,title:"Collapse all",className:"jse-collapse-all",onClick:g,disabled:!Jn(l)}),4&e.$$.dirty&&n(17,u={type:"button",icon:Gg,title:"Search (Ctrl+F)",className:"jse-search",onClick:E,disabled:l===void 0}),769844&e.$$.dirty&&n(18,c=h?[a,s,{type:"separator"},{type:"button",icon:Ya,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:R,disabled:!i},{type:"separator"},u,{type:"space"}]:[a,s,{type:"separator"},{type:"button",icon:Lh,title:"Sort",className:"jse-sort",onClick:w,disabled:h||l===void 0},{type:"button",icon:Nh,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:j,disabled:h||l===void 0},u,{type:"button",icon:U_,title:up,className:"jse-contextmenu",onClick:x},{type:"separator"},{type:"button",icon:Kg,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!p.canUndo},{type:"button",icon:Jg,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!p.canRedo},{type:"space"}]),278528&e.$$.dirty&&n(0,o=M(c)||c)},[o,v,l,f,h,p,m,g,y,b,w,j,x,R,M,a,s,u,c,i,r]}var $K=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,CK,SK,Be,{json:2,selection:3,readOnly:4,showSearch:1,historyState:5,onExpandAll:6,onCollapseAll:7,onUndo:8,onRedo:9,onSort:10,onTransform:11,onContextMenu:12,onCopy:13,onRenderMenu:14}),i}return tt(n)}();function _K(e){Ae(e,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25CF";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function uE(e){var t;return{c:function(){(t=G("ul")).innerHTML=`<li class="svelte-1q2qkk2">Click inside the editor</li>
|
|
<li class="svelte-1q2qkk2">Paste clipboard data using <span class="jse-bold svelte-1q2qkk2">Ctrl+V</span></li>
|
|
<li class="svelte-1q2qkk2">Create a new object by typing <span class="jse-bold svelte-1q2qkk2">{</span></li>
|
|
<li class="svelte-1q2qkk2">Create a new array by typing <span class="jse-bold svelte-1q2qkk2">[</span></li>`,C(t,"class","svelte-1q2qkk2")},m:function(n,r){ot(n,t,r)},d:function(n){n&&it(t)}}}function OK(e){var t,n,r,i,o,a,s,u=!e[0]&&uE();return{c:function(){t=G("div"),n=G("div"),r=vt(),i=G("div"),o=Jt(`Empty document
|
|
`),u&&u.c(),a=vt(),s=G("div"),C(n,"class","jse-space jse-before svelte-1q2qkk2"),C(i,"class","jse-contents svelte-1q2qkk2"),C(s,"class","jse-space jse-after svelte-1q2qkk2"),C(t,"class","jse-welcome svelte-1q2qkk2")},m:function(c,l){ot(c,t,l),F(t,n),F(t,r),F(t,i),F(i,o),u&&u.m(i,null),F(t,a),F(t,s)},p:function(c,l){ke(l,1)[0],c[0]?u&&(u.d(1),u=null):u||((u=uE()).c(),u.m(i,null))},i:It,o:It,d:function(c){c&&it(t),u&&u.d()}}}function MK(e,t,n){var r=t.readOnly;return e.$$set=function(i){"readOnly"in i&&n(0,r=i.readOnly)},[r]}var EK=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,MK,OK,Be,{readOnly:0},_K),i}return tt(n)}(),cE={exports:{}},lE=function(e,t){var n,r,i=1,o=0,a=0,s=String.alphabet;function u(c,l,f){if(f){for(n=l;(f=u(c,n))<76&&f>65;)++n;return+c.slice(l-1,n)}return(f=s&&s.indexOf(c.charAt(l)))>-1?f+76:(f=c.charCodeAt(l)||0)<45||f>127?f:f<46?65:f<48?f-1:f<58?f+18:f<65?f-11:f<91?f+11:f<97?f-37:f<123?f+5:f-63}if((e+="")!=(t+="")){for(;i;)if(r=u(e,o++),i=u(t,a++),r<76&&i<76&&r>66&&i>66&&(r=u(e,o,o),i=u(t,a,o=n),a=n),r!=i)return r<i?-1:1}return 0};try{cE.exports=lE}catch(e){String.naturalCompare=lE}var AK=jp(cE.exports);function v0(e,t){var n=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return AK(n,r)}function fE(e){var t=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;if(An(se(e,t))){if(n===void 0)throw new Error("Cannot sort: no property selected by which to sort the array");return function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,u=function(l,f){return function(h,d){var v=se(h,l),p=se(d,l);return v===void 0?f:p===void 0?-f:typeof v!="string"&&typeof p!="string"?v>p?f:v<p?-f:0:f*v0(v,p)}}(a,s),c=se(i,o);return[{op:"replace",path:Qt(o),value:c.slice(0).sort(u)}]}(e,t,n,r)}if(In(e))return function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=se(i,o),u=Object.keys(s),c=u.slice();c.sort(function(v,p){return a*v0(v,p)});for(var l=[],f=0;f<c.length;f++){var h=c[f],d=Qt(o.concat(h));l.push({op:"move",from:d,path:d})}return l}(e,t,r);throw new Error("Cannot sort: no array or object")}function PK(e){Ae(e,"svelte-6hb2gf",".jse-navigation-bar-dropdown.svelte-6hb2gf.svelte-6hb2gf{position:absolute;top:100%;left:0;z-index:3;background:var(--jse-navigation-bar-background);color:var(--jse-navigation-bar-dropdown-color);box-shadow:var(--jse-controls-box-shadow);display:flex;flex-direction:column;max-height:300px;overflow:auto;min-width:80px}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);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)) 36px}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf:focus,.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.svelte-6hb2gf:hover{background:var(--jse-navigation-bar-background-highlight)}.jse-navigation-bar-dropdown.svelte-6hb2gf button.jse-navigation-bar-dropdown-item.jse-selected.svelte-6hb2gf{background:var(--jse-navigation-bar-dropdown-color);color:var(--jse-navigation-bar-background)}")}function hE(e,t,n){var r=e.slice();return r[4]=t[n],r}function dE(e,t){var n,r,i,o,a,s=Uo(t[4].toString(),pE)+"";function u(){return t[3](t[4])}return{key:e,first:null,c:function(){n=G("button"),r=Jt(s),C(n,"type","button"),C(n,"class","jse-navigation-bar-dropdown-item svelte-6hb2gf"),C(n,"title",i=t[4].toString()),At(n,"jse-selected",t[4]===t[1]),this.first=n},m:function(c,l){ot(c,n,l),F(n,r),o||(a=Nt(n,"click",Pa(u)),o=!0)},p:function(c,l){t=c,1&l&&s!==(s=Uo(t[4].toString(),pE)+"")&&be(r,s),1&l&&i!==(i=t[4].toString())&&C(n,"title",i),3&l&&At(n,"jse-selected",t[4]===t[1])},d:function(c){c&&it(n),o=!1,a()}}}function vE(e){var t,n;return{c:function(){t=G("button"),n=Jt("..."),C(t,"type","button"),C(t,"class","jse-navigation-bar-dropdown-item svelte-6hb2gf"),C(t,"title","Limited to "+_l+" items")},m:function(r,i){ot(r,t,i),F(t,n)},p:It,d:function(r){r&&it(t)}}}function TK(e){for(var t,n,r=[],i=new Map,o=jh(e[0],_l),a=function(f){return f[4]},s=0;s<o.length;s+=1){var u=hE(e,o,s),c=a(u);i.set(c,r[s]=dE(c,u))}var l=e[0].length>_l&&vE();return{c:function(){t=G("div");for(var f=0;f<r.length;f+=1)r[f].c();n=vt(),l&&l.c(),C(t,"class","jse-navigation-bar-dropdown svelte-6hb2gf")},m:function(f,h){ot(f,t,h);for(var d=0;d<r.length;d+=1)r[d]&&r[d].m(t,null);F(t,n),l&&l.m(t,null)},p:function(f,h){var d=ke(h,1)[0];7&d&&(o=jh(f[0],_l),r=jf(r,d,a,1,f,o,i,t,WN,dE,n,hE)),f[0].length>_l?l?l.p(f,d):((l=vE()).c(),l.m(t,null)):l&&(l.d(1),l=null)},i:It,o:It,d:function(f){f&&it(t);for(var h=0;h<r.length;h+=1)r[h].d();l&&l.d()}}}var _l=100,pE=30;function RK(e,t,n){var r=t.items,i=t.selectedItem,o=t.onSelect;return e.$$set=function(a){"items"in a&&n(0,r=a.items),"selectedItem"in a&&n(1,i=a.selectedItem),"onSelect"in a&&n(2,o=a.onSelect)},[r,i,o,function(a){return o(a)}]}var NK=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,RK,TK,Be,{items:0,selectedItem:1,onSelect:2},PK),i}return tt(n)}();function IK(e){Ae(e,"svelte-1r1k9th",".jse-navigation-bar-item.svelte-1r1k9th.svelte-1r1k9th{position:relative;display:flex}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th{font-family:inherit;font-size:inherit;padding:calc(0.5 * var(--jse-padding)) 2px;border:none;background:transparent;color:inherit;cursor:pointer;outline:none;min-width:2em;white-space:nowrap}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th:focus,.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.svelte-1r1k9th:hover{background:var(--jse-panel-button-background-highlight);color:var(--jse-panel-button-color-highlight)}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.jse-navigation-bar-arrow.svelte-1r1k9th{padding:2px var(--jse-padding) 0}.jse-navigation-bar-item.svelte-1r1k9th button.jse-navigation-bar-button.jse-navigation-bar-arrow.jse-open.svelte-1r1k9th{background:var(--jse-navigation-bar-background);color:var(--jse-navigation-bar-dropdown-color)}.jse-navigation-bar-item.svelte-1r1k9th.svelte-1r1k9th:last-child{padding-right:var(--jse-padding)}")}function mE(e){var t,n,r,i;return{c:function(){t=G("button"),n=Jt(e[2]),C(t,"type","button"),C(t,"class","jse-navigation-bar-button svelte-1r1k9th")},m:function(o,a){ot(o,t,a),F(t,n),r||(i=Nt(t,"click",e[9]),r=!0)},p:function(o,a){4&a&&be(n,o[2])},d:function(o){o&&it(t),r=!1,i()}}}function DK(e){var t,n,r,i,o,a,s;r=new on({props:{data:q_}});var u=e[2]!==void 0&&mE(e);return{c:function(){t=G("div"),n=G("button"),jt(r.$$.fragment),i=vt(),u&&u.c(),C(n,"type","button"),C(n,"class","jse-navigation-bar-button jse-navigation-bar-arrow svelte-1r1k9th"),At(n,"jse-open",e[1]),C(t,"class","jse-navigation-bar-item svelte-1r1k9th")},m:function(c,l){ot(c,t,l),F(t,n),xt(r,n,null),F(t,i),u&&u.m(t,null),e[10](t),o=!0,a||(s=Nt(n,"click",e[4]),a=!0)},p:function(c,l){var f=ke(l,1)[0];(!o||2&f)&&At(n,"jse-open",c[1]),c[2]!==void 0?u?u.p(c,f):((u=mE(c)).c(),u.m(t,null)):u&&(u.d(1),u=null)},i:function(c){o||(T(r.$$.fragment,c),o=!0)},o:function(c){z(r.$$.fragment,c),o=!1},d:function(c){c&&it(t),kt(r),u&&u.d(),e[10](null),a=!1,s()}}}function LK(e,t,n){var r,i,o,a,s=Ir("absolute-popup"),u=s.openAbsolutePopup,c=s.closeAbsolutePopup,l=t.path,f=t.index,h=t.onSelect,d=t.getItems,v=!1;function p(m){c(a),h(r.concat(m))}return e.$$set=function(m){"path"in m&&n(5,l=m.path),"index"in m&&n(6,f=m.index),"onSelect"in m&&n(7,h=m.onSelect),"getItems"in m&&n(8,d=m.getItems)},e.$$.update=function(){96&e.$$.dirty&&(r=l.slice(0,f)),96&e.$$.dirty&&n(2,i=l[f])},[o,v,i,p,function(){if(o){n(1,v=!0);var m={items:d(r),selectedItem:i,onSelect:p};a=u(NK,m,{anchor:o,closeOnOuterClick:!0,onClose:function(){n(1,v=!1)}})}},l,f,h,d,function(){return p(i)},function(m){He[m?"unshift":"push"](function(){n(0,o=m)})}]}var gE=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,LK,DK,Be,{path:5,index:6,onSelect:7,getItems:8},IK),i}return tt(n)}();function p0(e){var t,n;if(navigator.clipboard)return navigator.clipboard.writeText(e);if((t=(n=document).queryCommandSupported)!==null&&t!==void 0&&t.call(n,"copy")){var r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();try{document.execCommand("copy")}catch(i){console.error(i)}finally{document.body.removeChild(r)}}else console.error("Copy failed.")}function BK(e){Ae(e,"svelte-g0evpe",".jse-navigation-bar-path-editor.svelte-g0evpe.svelte-g0evpe{flex:1;display:flex;border:var(--jse-edit-outline);background:var(--jse-background-color)}.jse-navigation-bar-path-editor.svelte-g0evpe input.jse-navigation-bar-text.svelte-g0evpe{flex:1;font-family:inherit;font-size:inherit;padding:0 5px 1px;background:var(--jse-background-color);color:var(--jse-text-color);border:none;outline:none}.jse-navigation-bar-path-editor.svelte-g0evpe button.svelte-g0evpe{border:none;background:var(--jse-background-color);cursor:pointer;font-family:inherit;font-size:80%;color:inherit}.jse-navigation-bar-path-editor.svelte-g0evpe button.jse-navigation-bar-copy.copied.svelte-g0evpe{color:var(--jse-message-success-background)}.jse-navigation-bar-path-editor.svelte-g0evpe button.jse-navigation-bar-validation-error.svelte-g0evpe{color:var(--jse-error-color)}.jse-navigation-bar-path-editor.error.svelte-g0evpe.svelte-g0evpe{border-color:var(--jse-error-color)}.jse-navigation-bar-path-editor.error.svelte-g0evpe input.jse-navigation-bar-text.svelte-g0evpe{color:var(--jse-error-color)}.jse-navigation-bar-path-editor.svelte-g0evpe .jse-copied-text.svelte-g0evpe{background:var(--jse-message-success-background);color:var(--jse-message-success-color);position:relative;margin:2px;padding:0 5px;border-radius:3px}")}function yE(e){var t,n,r,i,o,a;return n=new on({props:{data:Fs}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-navigation-bar-validation-error svelte-g0evpe")},m:function(s,u){ot(s,t,u),xt(n,t,null),i=!0,o||(a=Nr(r=Hg.call(null,t,dt({text:e[3]},e[4]))),o=!0)},p:function(s,u){r&&Rr(r.update)&&8&u&&r.update.call(null,dt({text:s[3]},s[4]))},i:function(s){i||(T(n.$$.fragment,s),i=!0)},o:function(s){z(n.$$.fragment,s),i=!1},d:function(s){s&&it(t),kt(n),o=!1,a()}}}function bE(e){var t;return{c:function(){(t=G("div")).textContent="Copied!",C(t,"class","jse-copied-text svelte-g0evpe")},m:function(n,r){ot(n,t,r)},d:function(n){n&&it(t)}}}function zK(e){var t,n,r,i,o,a,s,u,c,l,f=e[3]&&yE(e),h=e[2]&&bE();return s=new on({props:{data:Ya}}),{c:function(){t=G("div"),n=G("input"),r=vt(),f&&f.c(),i=vt(),h&&h.c(),o=vt(),a=G("button"),jt(s.$$.fragment),C(n,"type","text"),C(n,"class","jse-navigation-bar-text svelte-g0evpe"),n.value=e[0],C(a,"type","button"),C(a,"class","jse-navigation-bar-copy svelte-g0evpe"),C(a,"title","Copy selected path to the clipboard"),At(a,"copied",e[2]),C(t,"class","jse-navigation-bar-path-editor svelte-g0evpe"),At(t,"error",e[3])},m:function(d,v){ot(d,t,v),F(t,n),e[15](n),F(t,r),f&&f.m(t,null),F(t,i),h&&h.m(t,null),F(t,o),F(t,a),xt(s,a,null),u=!0,c||(l=[Nt(n,"keydown",Pa(e[6])),Nt(n,"input",e[5]),Nt(a,"click",e[7])],c=!0)},p:function(d,v){var p=ke(v,1)[0];(!u||1&p&&n.value!==d[0])&&(n.value=d[0]),d[3]?f?(f.p(d,p),8&p&&T(f,1)):((f=yE(d)).c(),T(f,1),f.m(t,i)):f&&(Dt(),z(f,1,1,function(){f=null}),Lt()),d[2]?h||((h=bE()).c(),h.m(t,o)):h&&(h.d(1),h=null),(!u||4&p)&&At(a,"copied",d[2]),(!u||8&p)&&At(t,"error",d[3])},i:function(d){u||(T(f),T(s.$$.fragment,d),u=!0)},o:function(d){z(f),z(s.$$.fragment,d),u=!1},d:function(d){d&&it(t),e[15](null),f&&f.d(),h&&h.d(),kt(s),c=!1,Mn(l)}}}function FK(e,t,n){var r,i,o,a=Ir("absolute-popup"),s=t.path,u=t.pathParser,c=t.onChange,l=t.onClose,f=t.onError,h=t.pathExists,d=!1,v=void 0,p=!1;function m(){i.focus()}function g(y){try{var b=u.parse(y);return function(w){if(!h(w))throw new Error("Path does not exist in current document")}(b),{path:b,error:void 0}}catch(w){return{path:void 0,error:w}}}return Ti(function(){m()}),xi(function(){clearTimeout(v)}),e.$$set=function(y){"path"in y&&n(8,s=y.path),"pathParser"in y&&n(9,u=y.pathParser),"onChange"in y&&n(10,c=y.onChange),"onClose"in y&&n(11,l=y.onClose),"onError"in y&&n(12,f=y.onError),"pathExists"in y&&n(13,h=y.pathExists)},e.$$.update=function(){768&e.$$.dirty&&n(0,o=u.stringify(s)),16385&e.$$.dirty&&n(3,r=d?g(o).error:void 0)},[o,i,p,r,a,function(y){n(0,o=y.currentTarget.value)},function(y){var b=Ha(y);if(b==="Escape"&&l(),b==="Enter"){n(14,d=!0);var w=g(o);w.path!==void 0?c(w.path):f(w.error)}},function(){p0(o),n(2,p=!0),v=setTimeout(function(){return n(2,p=!1)},1e3),m()},s,u,c,l,f,h,d,function(y){He[y?"unshift":"push"](function(){n(1,i=y)})}]}var VK=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,FK,zK,Sr,{path:8,pathParser:9,onChange:10,onClose:11,onError:12,pathExists:13},BK),i}return tt(n)}();function WK(e){Ae(e,"svelte-15r3ahw",".jse-navigation-bar.svelte-15r3ahw.svelte-15r3ahw{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);background:var(--jse-panel-background);color:var(--jse-panel-button-color);padding:0;margin:0;display:flex;overflow:auto;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.svelte-15r3ahw{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);color:var(--jse-panel-color-readonly);background:transparent;border:none;display:flex;cursor:pointer;outline:none;align-items:center}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.flex.svelte-15r3ahw{flex:1}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.svelte-15r3ahw:focus,.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.svelte-15r3ahw:hover,.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit.editing.svelte-15r3ahw{background:var(--jse-panel-button-background-highlight);color:var(--jse-panel-button-color-highlight);transition:color 0.2s ease-in, background 0.2s ease-in}.jse-navigation-bar.svelte-15r3ahw .jse-navigation-bar-edit .jse-navigation-bar-space.svelte-15r3ahw{flex:1;text-align:left}")}function wE(e,t,n){var r=e.slice();return r[20]=t[n],r[22]=n,r}function qK(e){var t,n;return t=new VK({props:{path:e[3],onClose:e[12],onChange:e[13],onError:e[1],pathExists:e[9],pathParser:e[2]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};8&i&&(o.path=r[3]),2&i&&(o.onError=r[1]),4&i&&(o.pathParser=r[2]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function HK(e){for(var t,n,r,i=[],o=new Map,a=e[3],s=function(h){return h[22]},u=0;u<a.length;u+=1){var c=wE(e,a,u),l=s(c);o.set(l,i[u]=xE(l,c))}var f=e[7]&&kE(e);return{c:function(){for(var h=0;h<i.length;h+=1)i[h].c();t=vt(),f&&f.c(),n=vn()},m:function(h,d){for(var v=0;v<i.length;v+=1)i[v]&&i[v].m(h,d);ot(h,t,d),f&&f.m(h,d),ot(h,n,d),r=!0},p:function(h,d){1288&d&&(a=h[3],Dt(),i=jf(i,d,s,1,h,a,o,t.parentNode,op,xE,t,wE),Lt()),h[7]?f?(f.p(h,d),128&d&&T(f,1)):((f=kE(h)).c(),T(f,1),f.m(n.parentNode,n)):f&&(Dt(),z(f,1,1,function(){f=null}),Lt())},i:function(h){if(!r){for(var d=0;d<a.length;d+=1)T(i[d]);T(f),r=!0}},o:function(h){for(var d=0;d<i.length;d+=1)z(i[d]);z(f),r=!1},d:function(h){for(var d=0;d<i.length;d+=1)i[d].d(h);h&&it(t),f&&f.d(h),h&&it(n)}}}function xE(e,t){var n,r,i;return r=new gE({props:{getItems:t[8],path:t[3],index:t[22],onSelect:t[10]}}),{key:e,first:null,c:function(){n=vn(),jt(r.$$.fragment),this.first=n},m:function(o,a){ot(o,n,a),xt(r,o,a),i=!0},p:function(o,a){t=o;var s={};8&a&&(s.path=t[3]),8&a&&(s.index=t[22]),r.$set(s)},i:function(o){i||(T(r.$$.fragment,o),i=!0)},o:function(o){z(r.$$.fragment,o),i=!1},d:function(o){o&&it(n),kt(r,o)}}}function kE(e){var t,n;return t=new gE({props:{getItems:e[8],path:e[3],index:void 0,onSelect:e[10]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};8&i&&(o.path=r[3]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function UK(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v=Jn(e[0])||e[6]?"\xA0":"Navigation bar",p=[HK,qK],m=[];function g(y,b){return y[6]?1:0}return n=g(e),r=m[n]=p[n](e),c=new on({props:{data:e[6]?K_:W_}}),{c:function(){t=G("div"),r.c(),i=vt(),o=G("button"),a=G("span"),s=Jt(v),u=vt(),jt(c.$$.fragment),C(a,"class","jse-navigation-bar-space svelte-15r3ahw"),C(o,"type","button"),C(o,"class","jse-navigation-bar-edit svelte-15r3ahw"),C(o,"title",l=e[6]?"Cancel editing the selected path":"Edit the selected path"),At(o,"flex",!e[6]),At(o,"editing",e[6]),C(t,"class","jse-navigation-bar svelte-15r3ahw")},m:function(y,b){ot(y,t,b),m[n].m(t,null),F(t,i),F(t,o),F(o,a),F(a,s),F(o,u),xt(c,o,null),e[16](o),e[17](t),f=!0,h||(d=Nt(o,"click",e[11]),h=!0)},p:function(y,b){var w=ke(b,1)[0],j=n;(n=g(y))===j?m[n].p(y,w):(Dt(),z(m[j],1,1,function(){m[j]=null}),Lt(),(r=m[n])?r.p(y,w):(r=m[n]=p[n](y)).c(),T(r,1),r.m(t,i)),(!f||65&w)&&v!==(v=Jn(y[0])||y[6]?"\xA0":"Navigation bar")&&be(s,v);var x={};64&w&&(x.data=y[6]?K_:W_),c.$set(x),(!f||64&w&&l!==(l=y[6]?"Cancel editing the selected path":"Edit the selected path"))&&C(o,"title",l),(!f||64&w)&&At(o,"flex",!y[6]),(!f||64&w)&&At(o,"editing",y[6])},i:function(y){f||(T(r),T(c.$$.fragment,y),f=!0)},o:function(y){z(r),z(c.$$.fragment,y),f=!1},d:function(y){y&&it(t),m[n].d(),kt(c),e[16](null),e[17](null),h=!1,d()}}}function JK(e,t,n){var r,i,o,a,s=Dr("jsoneditor:NavigationBar"),u=t.json,c=t.documentState,l=t.onSelect,f=t.onError,h=t.pathParser,d=!1;function v(m){s("select path",JSON.stringify(m)),l(wr(u,m,m))}function p(){n(6,d=!1)}return e.$$set=function(m){"json"in m&&n(0,u=m.json),"documentState"in m&&n(14,c=m.documentState),"onSelect"in m&&n(15,l=m.onSelect),"onError"in m&&n(1,f=m.onError),"pathParser"in m&&n(2,h=m.pathParser)},e.$$.update=function(){16384&e.$$.dirty&&n(3,r=c.selection?c.selection.focusPath:[]),9&e.$$.dirty&&n(7,i=Jn(se(u,r))),8&e.$$.dirty&&setTimeout(function(){if(o&&o.scrollTo){var m=o.scrollWidth-o.clientWidth;m>0&&(s("scrollTo ",m),o.scrollTo({left:m,behavior:"smooth"}))}})},[u,f,h,r,o,a,d,i,function(m){s("get items for path",m);var g=se(u,m);if(Array.isArray(g))return fg(0,g.length).map(String);if(In(g)){var y=Object.keys(g).slice(0);return y.sort(v0),y}return[]},function(m){return Ni(u,m)},v,function(){n(6,d=!d)},p,function(m){p(),v(m)},c,l,function(m){He[m?"unshift":"push"](function(){n(5,a=m)})},function(m){He[m?"unshift":"push"](function(){n(4,o=m)})}]}var KK=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,JK,UK,Be,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},WK),i}return tt(n)}();function GK(e){Ae(e,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function jE(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,W=(e[3]!==-1?"".concat(e[3]+1,"/"):"")+"",O=!e[4]&&SE(e),I=[YK,QK],q=[];function P(S,$){return S[2]?0:1}s=P(e),u=q[s]=I[s](e),y=new on({props:{data:eH}}),j=new on({props:{data:Kq}}),M=new on({props:{data:Zu}});var _=e[0]&&!e[4]&&CE(e);return{c:function(){t=G("div"),n=G("form"),O&&O.c(),r=vt(),i=G("div"),o=G("div"),a=G("div"),u.c(),c=vt(),l=G("label"),f=G("input"),h=vt(),d=G("div"),v=Jt(W),p=Jt(e[10]),m=vt(),g=G("button"),jt(y.$$.fragment),b=vt(),w=G("button"),jt(j.$$.fragment),x=vt(),R=G("button"),jt(M.$$.fragment),E=vt(),_&&_.c(),C(a,"class","jse-search-icon svelte-3lbrbf"),C(f,"class","jse-search-input svelte-3lbrbf"),C(f,"title","Enter text to search"),C(f,"type","text"),C(f,"placeholder","Find"),C(l,"class","jse-search-input-label svelte-3lbrbf"),C(l,"about","jse-search input"),C(d,"class","jse-search-count svelte-3lbrbf"),At(d,"jse-visible",e[8]!==""),C(g,"type","button"),C(g,"class","jse-search-next svelte-3lbrbf"),C(g,"title","Go to next search result (Enter)"),C(w,"type","button"),C(w,"class","jse-search-previous svelte-3lbrbf"),C(w,"title","Go to previous search result (Shift+Enter)"),C(R,"type","button"),C(R,"class","jse-search-clear svelte-3lbrbf"),C(R,"title","Close search box (Esc)"),C(o,"class","jse-search-section svelte-3lbrbf"),C(i,"class","jse-search-contents svelte-3lbrbf"),C(n,"class","jse-search-form svelte-3lbrbf"),C(t,"class","jse-search-box svelte-3lbrbf")},m:function(S,$){ot(S,t,$),F(t,n),O&&O.m(n,null),F(n,r),F(n,i),F(i,o),F(o,a),q[s].m(a,null),F(o,c),F(o,l),F(l,f),Ta(f,e[8]),F(o,h),F(o,d),F(d,v),F(d,p),F(o,m),F(o,g),xt(y,g,null),F(o,b),F(o,w),xt(j,w,null),F(o,x),F(o,R),xt(M,R,null),F(i,E),_&&_.m(i,null),N=!0,A||(L=[Nt(f,"input",e[21]),Nr(XK.call(null,f)),Nt(g,"click",e[22]),Nt(w,"click",e[23]),Nt(R,"click",e[24]),Nt(n,"submit",e[12]),Nt(n,"keydown",e[13])],A=!0)},p:function(S,$){S[4]?O&&(Dt(),z(O,1,1,function(){O=null}),Lt()):O?(O.p(S,$),16&$&&T(O,1)):((O=SE(S)).c(),T(O,1),O.m(n,r));var D=s;(s=P(S))===D?q[s].p(S,$):(Dt(),z(q[D],1,1,function(){q[D]=null}),Lt(),(u=q[s])?u.p(S,$):(u=q[s]=I[s](S)).c(),T(u,1),u.m(a,null)),256&$&&f.value!==S[8]&&Ta(f,S[8]),(!N||8&$)&&W!==(W=(S[3]!==-1?"".concat(S[3]+1,"/"):"")+"")&&be(v,W),(!N||1024&$)&&be(p,S[10]),(!N||256&$)&&At(d,"jse-visible",S[8]!==""),S[0]&&!S[4]?_?_.p(S,$):((_=CE(S)).c(),_.m(i,null)):_&&(_.d(1),_=null)},i:function(S){N||(T(O),T(u),T(y.$$.fragment,S),T(j.$$.fragment,S),T(M.$$.fragment,S),N=!0)},o:function(S){z(O),z(u),z(y.$$.fragment,S),z(j.$$.fragment,S),z(M.$$.fragment,S),N=!1},d:function(S){S&&it(t),O&&O.d(),q[s].d(),kt(y),kt(j),kt(M),_&&_.d(),A=!1,Mn(L)}}}function SE(e){var t,n,r,i,o;return n=new on({props:{data:e[0]?qi:Ga}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-replace-toggle svelte-3lbrbf"),C(t,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(a,s){ot(a,t,s),xt(n,t,null),r=!0,i||(o=Nt(t,"click",e[11]),i=!0)},p:function(a,s){var u={};1&s&&(u.data=a[0]?qi:Ga),n.$set(u)},i:function(a){r||(T(n.$$.fragment,a),r=!0)},o:function(a){z(n.$$.fragment,a),r=!1},d:function(a){a&&it(t),kt(n),i=!1,o()}}}function QK(e){var t,n;return t=new on({props:{data:Gg}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function YK(e){var t,n;return t=new on({props:{data:Hq,spin:!0}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:It,i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function CE(e){var t,n,r,i,o,a,s,u;return{c:function(){t=G("div"),n=G("input"),r=vt(),(i=G("button")).textContent="Replace",o=vt(),(a=G("button")).textContent="All",C(n,"class","jse-replace-input svelte-3lbrbf"),C(n,"title","Enter replacement text"),C(n,"type","text"),C(n,"placeholder","Replace"),C(i,"type","button"),C(i,"title","Replace current occurrence (Ctrl+Enter)"),C(i,"class","svelte-3lbrbf"),C(a,"type","button"),C(a,"title","Replace all occurrences"),C(a,"class","svelte-3lbrbf"),C(t,"class","jse-replace-section svelte-3lbrbf")},m:function(c,l){ot(c,t,l),F(t,n),Ta(n,e[9]),F(t,r),F(t,i),F(t,o),F(t,a),s||(u=[Nt(n,"input",e[25]),Nt(i,"click",e[14]),Nt(a,"click",e[15])],s=!0)},p:function(c,l){512&l&&n.value!==c[9]&&Ta(n,c[9])},d:function(c){c&&it(t),s=!1,Mn(u)}}}function ZK(e){var t,n,r=e[1]&&jE(e);return{c:function(){r&&r.c(),t=vn()},m:function(i,o){r&&r.m(i,o),ot(i,t,o),n=!0},p:function(i,o){var a=ke(o,1)[0];i[1]?r?(r.p(i,a),2&a&&T(r,1)):((r=jE(i)).c(),T(r,1),r.m(t.parentNode,t)):r&&(Dt(),z(r,1,1,function(){r=null}),Lt())},i:function(i){n||(T(r),n=!0)},o:function(i){z(r),n=!1},d:function(i){r&&r.d(i),i&&it(t)}}}function XK(e){e.select()}function tG(e,t,n){var r,i,o=t.show,a=o!==void 0&&o,s=t.searching,u=t.resultCount,c=u===void 0?0:u,l=t.activeIndex,f=l===void 0?0:l,h=t.showReplace,d=h!==void 0&&h,v=t.readOnly,p=v!==void 0&&v,m=t.onChange,g=m===void 0?Dn:m,y=t.onPrevious,b=y===void 0?Dn:y,w=t.onNext,j=w===void 0?Dn:w,x=t.onReplace,R=x===void 0?Dn:x,M=t.onReplaceAll,E=M===void 0?Dn:M,N=t.onClose,A=N===void 0?Dn:N,L="",W="",O="";function I(){n(0,d=!d&&!p)}function q(){p||R(L,O)}return e.$$set=function(P){"show"in P&&n(1,a=P.show),"searching"in P&&n(2,s=P.searching),"resultCount"in P&&n(16,c=P.resultCount),"activeIndex"in P&&n(3,f=P.activeIndex),"showReplace"in P&&n(0,d=P.showReplace),"readOnly"in P&&n(4,p=P.readOnly),"onChange"in P&&n(17,g=P.onChange),"onPrevious"in P&&n(5,b=P.onPrevious),"onNext"in P&&n(6,j=P.onNext),"onReplace"in P&&n(18,R=P.onReplace),"onReplaceAll"in P&&n(19,E=P.onReplaceAll),"onClose"in P&&n(7,A=P.onClose)},e.$$.update=function(){65536&e.$$.dirty&&n(10,r=c>=h3?"".concat(999,"+"):String(c)),131072&e.$$.dirty&&n(20,i=Eu(g,300)),1048832&e.$$.dirty&&i(L),2&e.$$.dirty&&a&&L!==""&&g(L)},[d,a,s,f,p,b,j,A,L,O,r,I,function(P){P.preventDefault(),L!==W?(W=L,i.cancel(),g(L)):j()},function(P){P.stopPropagation();var _=Ha(P);_==="Enter"&&(P.preventDefault(),j()),_==="Shift+Enter"&&(P.preventDefault(),b()),_==="Ctrl+Enter"&&(P.preventDefault(),d?q():j()),_==="Ctrl+H"&&(P.preventDefault(),I()),_==="Escape"&&(P.preventDefault(),A())},q,function(){p||E(L,O)},c,g,R,E,i,function(){L=this.value,n(8,L)},function(){return j()},function(){return b()},function(){return A()},function(){O=this.value,n(9,O)}]}var eG=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,tG,ZK,Be,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},GK),i}return tt(n)}(),$E=Number.isNaN||function(e){return typeof e=="number"&&e!=e};function nG(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||$E(r)&&$E(i)))return!1;var r,i;return!0}function Ol(e,t){t===void 0&&(t=nG);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}var Ml=Symbol("path");function rG(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1/0,r={};Array.isArray(e)&&function(o,a,s){if(o.length<a)o.forEach(s);else for(var u=a>1?(o.length-1)/(a-1):o.length,c=0;c<a;c++){var l=Math.floor(c*u);s(o[l],l,o)}}(e,n,function(o){In(o)?_E(o,r,t):r[Ml]=!0});var i=[];return Ml in r&&i.push([]),OE(r,[],i,t),i}function _E(e,t,n){for(var r in e){var i=e[r],o=t[r]||(t[r]={});In(i)&&n?_E(i,o,n):o[Ml]===void 0&&(o[Ml]=!0)}}function OE(e,t,n,r){for(var i in e){var o=t.concat(i),a=e[i];a&&a[Ml]===!0&&n.push(o),nr(a)&&r&&OE(a,o,n,r)}}function iG(e,t,n,r,i){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:80,a=An(n)?n.length:0,s=function(g,y){var b=Object.values(g);if(Ue(b))return y;var w=function(x,R){return x+R},j=b.reduce(w);return j/b.length}(r,i),u=e-o,c=t+2*o,l=function(g){return r[g]||i},f=0,h=0;h<u&&f<a;)h+=l(f),f++;f>0&&(h-=l(--f));for(var d=f,v=0;v<c&&d<a;)v+=l(d),d++;for(var p=0,m=d;m<a;m++)p+=l(m);return{startIndex:f,endIndex:d,startHeight:h,endHeight:p,averageItemHeight:s,visibleHeight:v,visibleItems:An(n)?n.slice(f,d):[]}}function m0(e,t,n,r){for(var i=Hi(e,t).rowIndex,o=0,a=0;a<i;a++)o+=n[a]||r;return o}function Hi(e,t){var n,r=Dj(n=e)||Vj(n)||mf(n)||Ij(),i=r[0],o=r.slice(1),a=parseInt(i,10);return{rowIndex:isNaN(a)?-1:a,columnIndex:t.findIndex(function(s){return Uu(o,s)})}}function Hs(e,t){var n=e.rowIndex,r=e.columnIndex;return[String(n)].concat(Oe(t[r]))}function oG(e,t){var n=ke(ag(e,function(a){return Tp(a.path[0])}),2),r=n[0],i=n[1],o=Hm(Pu(r,aG),function(a){var s={row:[],columns:{}};return a.forEach(function(u){var c=function(l,f){var h=Hi(l.path,f);return h.columnIndex!==-1?h.columnIndex:-1}(u,t);c!==-1?(s.columns[c]===void 0&&(s.columns[c]=[]),s.columns[c].push(u)):s.row.push(u)}),s});return{root:i,rows:o}}function oc(e,t){if(t&&t.length!==0)return t.length===1?t[0]:{path:e,message:"Multiple validation issues: "+t.map(function(n){return pi(n.path)+" "+n.message}).join(", "),severity:No.warning}}function aG(e){return parseInt(e.path[0],10)}function sG(e,t,n){return t.some(function(r){return function(i,o,a){if(!i)return!1;if(o.op==="replace"){var s=Hi(ao(o.path),a),u=s.rowIndex,c=s.columnIndex,l=a.findIndex(function(f){return rn(f,i.path)});if(u!==-1&&c!==-1&&c!==l)return!1}return!0}(e.sortedColumn,r,n)})?dt(dt({},e),{},{sortedColumn:void 0}):e}var Zr=Dr("jsoneditor:actions");function ME(e){return g0.apply(this,arguments)}function g0(){return g0=Ee(Ft().mark(function e(t){var n,r,i,o,a,s,u,c,l,f;return Ft().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(n=t.json,r=t.documentState,i=t.indentation,o=t.readOnly,a=t.parser,s=t.onPatch,!o&&n!==void 0&&r.selection&&Ju(r.selection)){h.next=3;break}return h.abrupt("return");case 3:if((u=S_(n,r.selection,i,a))!=null){h.next=6;break}return h.abrupt("return");case 6:return Zr("cut",{selection:r.selection,clipboard:u,indentation:i}),h.next=9,p0(u);case 9:c=A_(n,r.selection),l=c.operations,f=c.newSelection,s(l,function(d,v){return{state:dt(dt({},v),{},{selection:f})}});case 11:case"end":return h.stop()}},e)})),g0.apply(this,arguments)}function EE(e){return y0.apply(this,arguments)}function y0(){return y0=Ee(Ft().mark(function e(t){var n,r,i,o,a;return Ft().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(n=t.json,r=t.documentState,i=t.indentation,o=t.parser,(a=S_(n,r.selection,i,o))!=null){s.next=4;break}return s.abrupt("return");case 4:return Zr("copy",{clipboard:a,indentation:i}),s.next=7,p0(a);case 7:case"end":return s.stop()}},e)})),y0.apply(this,arguments)}function AE(e){var t=e.clipboardText,n=e.json,r=e.documentState,i=e.readOnly,o=e.parser,a=e.onPatch,s=e.onChangeText,u=e.openRepairModal;if(!i)try{c(t)}catch(l){u(t,function(f){Zr("repaired pasted text: ",f),c(f)})}function c(l){if(n!==void 0){var f=r.selection||wr(n||{},[],[]),h=E_(n,f,l,o);Zr("paste",{pastedText:l,operations:h,selection:f}),a(h,function(d,v){var p=v;return h.filter(function(m){return(m3(m)||dp(m))&&Jn(m.value)}).forEach(function(m){var g=uo(n,m.path);p=Ua(d,p,g)}),{state:p}})}else Zr("paste text",{pastedText:l}),s(t,function(d,v){if(d)return{state:Ua(d,v,[])}})}}function PE(e){var t=e.json,n=e.text,r=e.documentState,i=e.keepSelection,o=e.readOnly,a=e.onChange,s=e.onPatch;if(!o&&r.selection){var u=t!==void 0&&(yr(r.selection)||Ge(r.selection))?wr(t,r.selection.anchorPath,r.selection.focusPath):r.selection;if(Ue(r.selection.focusPath))Zr("remove root",{selection:r.selection}),a&&a({text:"",json:void 0},t!==void 0?{text:void 0,json:t}:{text:n||"",json:t},{contentErrors:null,patchResult:null});else if(t!==void 0){var c=A_(t,u),l=c.operations,f=c.newSelection;Zr("remove",{operations:l,selection:r.selection,newSelection:f}),s(l,function(h,d){return{state:dt(dt({},d),{},{selection:i?r.selection:f})}})}}}function uG(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&t!==void 0&&n.selection&&Ju(n.selection)){var a=Hi(n.selection.focusPath,r),s=a.rowIndex,u=a.columnIndex;Zr("duplicate row",{rowIndex:s});var c=[String(s)];o(M_(t,[c]),function(l,f){var h=un(Hs({rowIndex:s<t.length?s+1:s,columnIndex:u},r),!1);return{state:dt(dt({},f),{},{selection:h})}})}}function cG(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&t!==void 0&&n.selection&&Ju(n.selection)){var a=Hi(n.selection.focusPath,r).rowIndex;Zr("insert before row",{rowIndex:a}),o(Ku(t,[String(a)],[{key:"",value:nr(t[0])?{}:""}]))}}function lG(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&t!==void 0&&n.selection&&Ju(n.selection)){var a=Hi(n.selection.focusPath,r),s=a.rowIndex,u=a.columnIndex;Zr("insert after row",{rowIndex:s});var c=s+1,l=[String(c)],f=[{key:"",value:nr(t[0])?{}:""}];o(c<t.length?Ku(t,l,f):Vg(t,[],f),function(h,d){var v=un(Hs({rowIndex:c,columnIndex:u},r),!1);return{state:dt(dt({},d),{},{selection:v})}})}}function fG(e){var t=e.json,n=e.documentState,r=e.columns,i=e.readOnly,o=e.onPatch;if(!i&&t!==void 0&&n.selection&&Ju(n.selection)){var a=Hi(n.selection.focusPath,r),s=a.rowIndex,u=a.columnIndex;Zr("remove row",{rowIndex:s}),o(Rh([[String(s)]]),function(c,l){var f=s<c.length?s:s>0?s-1:void 0,h=f!==void 0?un(Hs({rowIndex:f,columnIndex:u},r),!1):void 0;return Zr("remove row new selection",{rowIndex:s,newRowIndex:f,newSelection:h}),{state:dt(dt({},l),{},{selection:h})}})}}function Yh(e){var t=e.insertType,n=e.selectInside,r=e.refJsonEditor,i=e.json,o=e.documentState,a=e.readOnly,s=e.parser,u=e.onPatch,c=e.onReplaceJson;if(!a&&o.selection){var l=function(p,m,g){if(g==="object")return{};if(g==="array")return[];if(g==="structure"&&p!==void 0){var y=se(p,m?y_(m):[]);if(Array.isArray(y)&&!Ue(y)){var b=Ar(y);return Jn(b)?ym(b,function(w){return Array.isArray(w)?[]:In(w)?void 0:""}):""}}return""}(i,o.selection,t);if(i!==void 0){var f=s.stringify(l),h=E_(i,o.selection,f,s);Zr("onInsert",{insertType:t,operations:h,newValue:l,data:f});var d=le(h.filter(function(p){return p.op==="add"||p.op==="replace"}));u(h,function(p,m){if(d){var g=uo(p,d.path);if(Jn(l))return{state:dt(dt({},Vi(p,m,g,gl)),{},{selection:n?Ja(g):m.selection})};if(l===""){var y=Ue(g)?null:se(p,Ze(g));return{state:Rg(p,dt(dt({},o),{},{selection:In(y)?Wi(g,!0):un(g,!0)}),g)}}}}),Zr("after patch"),d&&l===""&&Zh(function(){return $h(r,"",!0)})}else{Zr("onInsert",{insertType:t,newValue:l});var v=[];c(l,function(p,m){return{state:dt(dt({},Ua(p,m,v)),{},{selection:un(v,!0)})}})}}}function TE(e){return b0.apply(this,arguments)}function b0(){return b0=Ee(Ft().mark(function e(t){var n,r,i,o,a,s,u,c,l,f,h,d;return Ft().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(n=t.char,r=t.selectInside,i=t.refJsonEditor,o=t.json,a=t.documentState,s=t.readOnly,u=t.parser,c=t.onPatch,l=t.onReplaceJson,f=t.onSelect,!s&&a.selection){v.next=3;break}return v.abrupt("return");case 3:if(!yr(a.selection)){v.next=8;break}return h=!a.selection.edit,f(dt(dt({},a.selection),{},{edit:!0})),Zh(function(){return $h(i,n,h)}),v.abrupt("return");case 8:if(n!=="{"){v.next=12;break}Yh({insertType:"object",selectInside:r,refJsonEditor:i,json:o,documentState:a,readOnly:s,parser:u,onPatch:c,onReplaceJson:l}),v.next=23;break;case 12:if(n!=="["){v.next=16;break}Yh({insertType:"array",selectInside:r,refJsonEditor:i,json:o,documentState:a,readOnly:s,parser:u,onPatch:c,onReplaceJson:l}),v.next=23;break;case 16:if(!Ge(a.selection)||o===void 0){v.next=20;break}Jn(se(o,a.selection.focusPath))||(d=!a.selection.edit,f(dt(dt({},a.selection),{},{edit:!0})),Zh(function(){return $h(i,n,d)})),v.next=23;break;case 20:return Zr("onInsertValueWithCharacter",{char:n}),v.next=23,hG({char:n,refJsonEditor:i,json:o,documentState:a,readOnly:s,parser:u,onPatch:c,onReplaceJson:l});case 23:case"end":return v.stop()}},e)})),b0.apply(this,arguments)}function hG(e){return w0.apply(this,arguments)}function w0(){return w0=Ee(Ft().mark(function e(t){var n,r,i,o,a,s,u,c,l;return Ft().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(n=t.char,r=t.refJsonEditor,i=t.json,o=t.documentState,a=t.readOnly,s=t.parser,u=t.onPatch,c=t.onReplaceJson,!a&&o.selection){f.next=3;break}return f.abrupt("return");case 3:Yh({insertType:"value",selectInside:!1,refJsonEditor:r,json:i,documentState:o,readOnly:a,parser:s,onPatch:u,onReplaceJson:c}),l=!Ka(o.selection),Zh(function(){return $h(r,n,l)});case 6:case"end":return f.stop()}},e)})),w0.apply(this,arguments)}function Zh(e){setTimeout(function(){return setTimeout(e)})}function dG(e){Ae(e,"svelte-1ch6ow4",".jse-json-preview.svelte-1ch6ow4{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;padding:2px;border-left:var(--jse-main-border);border-right:var(--jse-main-border);border-bottom:var(--jse-main-border)}")}function vG(e){var t,n,r=Uo(Ch({text:e[0],json:e[1]},e[2],e[3]),Sf)+"";return{c:function(){t=G("div"),n=Jt(r),C(t,"class","jse-json-preview svelte-1ch6ow4")},m:function(i,o){ot(i,t,o),F(t,n)},p:function(i,o){15&ke(o,1)[0]&&r!==(r=Uo(Ch({text:i[0],json:i[1]},i[2],i[3]),Sf)+"")&&be(n,r)},i:It,o:It,d:function(i){i&&it(t)}}}function pG(e,t,n){var r=t.text,i=t.json,o=t.indentation,a=t.parser;return e.$$set=function(s){"text"in s&&n(0,r=s.text),"json"in s&&n(1,i=s.json),"indentation"in s&&n(2,o=s.indentation),"parser"in s&&n(3,a=s.parser)},[r,i,o,a]}var RE=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,pG,vG,Sr,{text:0,json:1,indentation:2,parser:3},dG),i}return tt(n)}(),mG=Zv.window;function gG(e){Ae(e,"svelte-1n5yill",".jse-tree-mode.svelte-1n5yill.svelte-1n5yill{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color);line-height:var(--jse-line-height)}.jse-tree-mode.svelte-1n5yill .jse-hidden-input-label .jse-hidden-input.svelte-1n5yill{position:fixed;top:-10px;left:-10px;width:1px;height:1px;padding:0;border:0;outline:none}.jse-tree-mode.svelte-1n5yill .jse-search-box-container.svelte-1n5yill{position:relative;height:0;top:var(--jse-padding);margin-right:calc(var(--jse-padding) + 20px);margin-left:var(--jse-padding);text-align:right;z-index:3}.jse-tree-mode.no-main-menu.svelte-1n5yill.svelte-1n5yill{border-top:var(--jse-main-border)}.jse-tree-mode.svelte-1n5yill .jse-contents.svelte-1n5yill{border-left:var(--jse-main-border);border-right:var(--jse-main-border);flex:1;overflow:auto;position:relative;padding:2px;display:flex;flex-direction:column}.jse-tree-mode.svelte-1n5yill .jse-contents.svelte-1n5yill:last-child{border-bottom:var(--jse-main-border)}.jse-tree-mode.svelte-1n5yill .jse-contents .jse-loading-space.svelte-1n5yill{flex:1}.jse-tree-mode.svelte-1n5yill .jse-contents .jse-loading.svelte-1n5yill{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function NE(e){var t,n,r;function i(a){e[75](a)}var o={json:e[11],selection:e[17].selection,readOnly:e[0],historyState:e[23],onExpandAll:e[40],onCollapseAll:e[41],onUndo:e[36],onRedo:e[37],onSort:e[38],onTransform:e[39],onContextMenu:e[45],onCopy:e[34],onRenderMenu:e[7]};return e[20]!==void 0&&(o.showSearch=e[20]),t=new $K({props:o}),He.push(function(){return no(t,"showSearch",i)}),{c:function(){jt(t.$$.fragment)},m:function(a,s){xt(t,a,s),r=!0},p:function(a,s){var u={};2048&s[0]&&(u.json=a[11]),131072&s[0]&&(u.selection=a[17].selection),1&s[0]&&(u.readOnly=a[0]),8388608&s[0]&&(u.historyState=a[23]),128&s[0]&&(u.onRenderMenu=a[7]),!n&&1048576&s[0]&&(n=!0,u.showSearch=a[20],eo(function(){return n=!1})),t.$set(u)},i:function(a){r||(T(t.$$.fragment,a),r=!0)},o:function(a){z(t.$$.fragment,a),r=!1},d:function(a){kt(t,a)}}}function IE(e){var t,n;return t=new KK({props:{json:e[11],documentState:e[17],onSelect:e[49],onError:e[6],pathParser:e[4]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};2048&i[0]&&(o.json=r[11]),131072&i[0]&&(o.documentState=r[17]),64&i[0]&&(o.onError=r[6]),16&i[0]&&(o.pathParser=r[4]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function yG(e){var t;return{c:function(){(t=G("div")).innerHTML=`<div class="jse-loading-space svelte-1n5yill"></div>
|
|
<div class="jse-loading svelte-1n5yill">loading...</div>`,C(t,"class","jse-contents svelte-1n5yill")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function bG(e){var t,n,r,i,o,a,s,u,c,l=[xG,wG],f=[];function h(d,v){return d[11]===void 0?0:1}return i=h(e),o=f[i]=l[i](e),{c:function(){t=G("label"),n=G("input"),r=vt(),o.c(),a=vn(),C(n,"type","text"),n.readOnly="readonly",C(n,"tabindex","-1"),C(n,"class","jse-hidden-input svelte-1n5yill"),C(t,"class","jse-hidden-input-label")},m:function(d,v){ot(d,t,v),F(t,n),e[76](n),ot(d,r,v),f[i].m(d,v),ot(d,a,v),s=!0,u||(c=Nt(n,"paste",e[35]),u=!0)},p:function(d,v){var p=i;(i=h(d))===p?f[i].p(d,v):(Dt(),z(f[p],1,1,function(){f[p]=null}),Lt(),(o=f[i])?o.p(d,v):(o=f[i]=l[i](d)).c(),T(o,1),o.m(a.parentNode,a))},i:function(d){s||(T(o),s=!0)},o:function(d){z(o),s=!1},d:function(d){d&&it(t),e[76](null),d&&it(r),f[i].d(d),d&&it(a),u=!1,c()}}}function wG(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v;a=new eG({props:{show:e[20],resultCount:((t=e[18])===null||t===void 0||(n=t.items)===null||n===void 0?void 0:n.length)||0,activeIndex:((r=e[18])===null||r===void 0?void 0:r.activeIndex)||0,showReplace:e[21],searching:e[22],readOnly:e[0],onChange:e[27],onNext:e[28],onPrevious:e[29],onReplace:e[30],onReplaceAll:e[31],onClose:e[32]}}),c=new wK({props:{value:e[11],path:[],expandedMap:e[17].expandedMap,enforceStringMap:e[17].enforceStringMap,visibleSectionsMap:e[17].visibleSectionsMap,validationErrorsMap:e[25],searchResultItemsMap:(i=e[18])===null||i===void 0?void 0:i.itemsMap,selection:e[17].selection,context:e[14],onDragSelectionStart:Dn}});var p=e[19]&&DE(e),m=e[24]&&LE(e);return d=new a0({props:{validationErrors:e[13],selectError:e[33]}}),{c:function(){o=G("div"),jt(a.$$.fragment),s=vt(),u=G("div"),jt(c.$$.fragment),l=vt(),p&&p.c(),f=vt(),m&&m.c(),h=vt(),jt(d.$$.fragment),C(o,"class","jse-search-box-container svelte-1n5yill"),C(u,"class","jse-contents svelte-1n5yill"),C(u,"data-jsoneditor-scrollable-contents",!0)},m:function(g,y){ot(g,o,y),xt(a,o,null),ot(g,s,y),ot(g,u,y),xt(c,u,null),e[77](u),ot(g,l,y),p&&p.m(g,y),ot(g,f,y),m&&m.m(g,y),ot(g,h,y),xt(d,g,y),v=!0},p:function(g,y){var b,w,j,x,R={};1048576&y[0]&&(R.show=g[20]),262144&y[0]&&(R.resultCount=((b=g[18])===null||b===void 0||(w=b.items)===null||w===void 0?void 0:w.length)||0),262144&y[0]&&(R.activeIndex=((j=g[18])===null||j===void 0?void 0:j.activeIndex)||0),2097152&y[0]&&(R.showReplace=g[21]),4194304&y[0]&&(R.searching=g[22]),1&y[0]&&(R.readOnly=g[0]),a.$set(R);var M={};2048&y[0]&&(M.value=g[11]),131072&y[0]&&(M.expandedMap=g[17].expandedMap),131072&y[0]&&(M.enforceStringMap=g[17].enforceStringMap),131072&y[0]&&(M.visibleSectionsMap=g[17].visibleSectionsMap),33554432&y[0]&&(M.validationErrorsMap=g[25]),262144&y[0]&&(M.searchResultItemsMap=(x=g[18])===null||x===void 0?void 0:x.itemsMap),131072&y[0]&&(M.selection=g[17].selection),16384&y[0]&&(M.context=g[14]),c.$set(M),g[19]?p?(p.p(g,y),524288&y[0]&&T(p,1)):((p=DE(g)).c(),T(p,1),p.m(f.parentNode,f)):p&&(Dt(),z(p,1,1,function(){p=null}),Lt()),g[24]?m?(m.p(g,y),16777216&y[0]&&T(m,1)):((m=LE(g)).c(),T(m,1),m.m(h.parentNode,h)):m&&(Dt(),z(m,1,1,function(){m=null}),Lt());var E={};8192&y[0]&&(E.validationErrors=g[13]),d.$set(E)},i:function(g){v||(T(a.$$.fragment,g),T(c.$$.fragment,g),T(p),T(m),T(d.$$.fragment,g),v=!0)},o:function(g){z(a.$$.fragment,g),z(c.$$.fragment,g),z(p),z(m),z(d.$$.fragment,g),v=!1},d:function(g){g&&it(o),kt(a),g&&it(s),g&&it(u),kt(c),e[77](null),g&&it(l),p&&p.d(g),g&&it(f),m&&m.d(g),g&&it(h),kt(d,g)}}}function xG(e){var t,n,r,i,o=[jG,kG],a=[];function s(u,c){return u[12]===""||u[12]===void 0?0:1}return t=s(e),n=a[t]=o[t](e),{c:function(){n.c(),r=vn()},m:function(u,c){a[t].m(u,c),ot(u,r,c),i=!0},p:function(u,c){var l=t;(t=s(u))===l?a[t].p(u,c):(Dt(),z(a[l],1,1,function(){a[l]=null}),Lt(),(n=a[t])?n.p(u,c):(n=a[t]=o[t](u)).c(),T(n,1),n.m(r.parentNode,r))},i:function(u){i||(T(n),i=!0)},o:function(u){z(n),i=!1},d:function(u){a[t].d(u),u&&it(r)}}}function DE(e){var t,n;return t=new po({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(e[19].contents)?"array":"object"," as text"),actions:[{icon:Ih,text:"Paste as JSON instead",onMouseDown:e[46]},{text:"Leave as is",onClick:e[47]}],onClose:e[78]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};524288&i[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(r[19].contents)?"array":"object"," as text")),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function LE(e){var t,n;return t=new po({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:e[0]?[]:[{icon:xl,text:"Ok",onClick:e[8]},{icon:Qa,text:"Repair manually instead",onClick:e[48]}],onClose:e[9]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i[0]&&(o.actions=r[0]?[]:[{icon:xl,text:"Ok",onClick:r[8]},{icon:Qa,text:"Repair manually instead",onClick:r[48]}]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function kG(e){var t,n,r,i;return t=new po({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:e[0]?[]:[{icon:Qa,text:"Repair manually",onClick:e[48]}]}}),r=new RE({props:{text:e[12],json:e[11],indentation:e[5],parser:e[3]}}),{c:function(){jt(t.$$.fragment),n=vt(),jt(r.$$.fragment)},m:function(o,a){xt(t,o,a),ot(o,n,a),xt(r,o,a),i=!0},p:function(o,a){var s={};1&a[0]&&(s.actions=o[0]?[]:[{icon:Qa,text:"Repair manually",onClick:o[48]}]),t.$set(s);var u={};4096&a[0]&&(u.text=o[12]),2048&a[0]&&(u.json=o[11]),32&a[0]&&(u.indentation=o[5]),8&a[0]&&(u.parser=o[3]),r.$set(u)},i:function(o){i||(T(t.$$.fragment,o),T(r.$$.fragment,o),i=!0)},o:function(o){z(t.$$.fragment,o),z(r.$$.fragment,o),i=!1},d:function(o){kt(t,o),o&&it(n),kt(r,o)}}}function jG(e){var t,n;return t=new EK({props:{readOnly:e[0]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i[0]&&(o.readOnly=r[0]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function SG(e){var t,n,r,i,o,a,s,u,c=e[1]&&NE(e),l=e[2]&&IE(e),f=[bG,yG],h=[];return i=function(d,v){return d[26]?1:0}(e),o=h[i]=f[i](e),{c:function(){t=G("div"),c&&c.c(),n=vt(),l&&l.c(),r=vt(),o.c(),C(t,"class","jse-tree-mode svelte-1n5yill"),At(t,"no-main-menu",!e[1])},m:function(d,v){ot(d,t,v),c&&c.m(t,null),F(t,n),l&&l.m(t,null),F(t,r),h[i].m(t,null),e[79](t),a=!0,s||(u=[Nt(mG,"mousedown",e[50]),Nt(t,"keydown",e[42]),Nt(t,"mousedown",e[43]),Nt(t,"contextmenu",e[44])],s=!0)},p:function(d,v){d[1]?c?(c.p(d,v),2&v[0]&&T(c,1)):((c=NE(d)).c(),T(c,1),c.m(t,n)):c&&(Dt(),z(c,1,1,function(){c=null}),Lt()),d[2]?l?(l.p(d,v),4&v[0]&&T(l,1)):((l=IE(d)).c(),T(l,1),l.m(t,r)):l&&(Dt(),z(l,1,1,function(){l=null}),Lt()),o.p(d,v),(!a||2&v[0])&&At(t,"no-main-menu",!d[1])},i:function(d){a||(T(c),T(l),T(o),a=!0)},o:function(d){z(c),z(l),z(o),a=!1},d:function(d){d&&it(t),c&&c.d(),l&&l.d(),h[i].d(),e[79](null),s=!1,Mn(u)}}}function CG(e,t,n){var r,i=Dr("jsoneditor:TreeMode"),o=typeof window=="undefined";i("isSSR:",o);var a,s,u,c,l,f=Ir("simple-modal").open,h=qa(),d=qa(),v=Ir("absolute-popup"),p=v.openAbsolutePopup,m=v.closeAbsolutePopup,g=!1,y=qO(),b=t.readOnly,w=t.externalContent,j=t.mainMenuBar,x=t.navigationBar,R=t.escapeControlCharacters,M=t.escapeUnicodeCharacters,E=t.parser,N=t.parseMemoizeOne,A=t.validator,L=t.validationParser,W=t.pathParser,O=t.indentation,I=t.onError,q=t.onChange,P=t.onChangeMode,_=t.onRenderValue,S=t.onRenderMenu,$=t.onClassName,D=t.onFocus,B=t.onBlur,k=t.onSortModal,H=t.onTransformModal,U=t.onJSONEditorModal,st=!1;o0({onMount:Ti,onDestroy:xi,getWindow:function(){return Bu(u)},hasFocus:function(){return st&&document.hasFocus()||_h(u)},onFocus:function(){g=!0,D&&D()},onBlur:function(){g=!1,B&&B()}});var ut=void 0;function gt(Y){i("updateSelection",Y);var mt=typeof Y=="function"?Y(K.selection):Y;rn(mt,K.selection)||n(17,K=dt(dt({},K),{},{selection:mt}))}var St,Pt,pt,Bt=!1,K=Eh(),$t=!1,Kt=!1,Ct=!1,V="";function Q(Y){return ft.apply(this,arguments)}function ft(){return ft=Ee(Ft().mark(function Y(mt){return Ft().wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return i("search text updated",mt),n(74,V=mt),Rt.next=4,pr();case 4:return Rt.next=6,$e();case 6:case"end":return Rt.stop()}},Y)})),ft.apply(this,arguments)}function wt(){return(wt=Ee(Ft().mark(function Y(){return Ft().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return n(18,St=St?wq(St):void 0),mt.next=3,$e();case 3:case"end":return mt.stop()}},Y)}))).apply(this,arguments)}function _t(){return(_t=Ee(Ft().mark(function Y(){return Ft().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return n(18,St=St?xq(St):void 0),mt.next=3,$e();case 3:case"end":return mt.stop()}},Y)}))).apply(this,arguments)}function Ut(){return(Ut=Ee(Ft().mark(function Y(mt,Rt){var Wt,qt,Yt,ve,Me;return Ft().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(qt=(Wt=St)===null||Wt===void 0?void 0:Wt.activeItem,i("handleReplace",{replacementText:Rt,activeItem:qt}),qt){_e.next=4;break}return _e.abrupt("return");case 4:return Yt=kq(c,K,Rt,qt,E),ve=Yt.operations,Me=Yt.newSelection,xe(ve,function(Fn,jr){return{state:dt(dt({},jr),{},{selection:Me})}}),_e.next=8,pr();case 8:return _e.next=10,$e();case 10:case"end":return _e.stop()}},Y)}))).apply(this,arguments)}function zt(){return zt=Ee(Ft().mark(function Y(mt,Rt){var Wt,qt,Yt;return Ft().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return i("handleReplaceAll",{text:mt,replacementText:Rt}),Wt=jq(c,K,mt,Rt,E),qt=Wt.operations,Yt=Wt.newSelection,xe(qt,function(Me,_e){return{state:dt(dt({},_e),{},{selection:Yt})}}),ve.next=5,pr();case 5:return ve.next=7,$e();case 7:case"end":return ve.stop()}},Y)})),zt.apply(this,arguments)}function $e(){return qe.apply(this,arguments)}function qe(){return(qe=Ee(Ft().mark(function Y(){var mt,Rt,Wt;return Ft().wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(Rt=(mt=St)===null||mt===void 0?void 0:mt.activeItem,i("focusActiveSearchResult",St),!Rt){qt.next=9;break}return Wt=Rt.path,n(17,K=dt(dt({},Rg(c,K,Wt)),{},{selection:void 0})),qt.next=7,pr();case 7:return qt.next=9,oe(Wt);case 9:case"end":return qt.stop()}},Y)}))).apply(this,arguments)}var De=HO({onChange:function(Y){n(23,re=Y)}}),re=De.getState(),Ne,Xe,Bn=vg(function(Y,mt){if(Y==="")return i("clearing search result"),void(St!==void 0&&n(18,St=void 0));n(22,Ct=!0),setTimeout(function(){i("searching...",Y);var Rt=R_(Y,mt,h3);n(18,St=function(Wt,qt,Yt){var ve=Yt!=null&&Yt.activeItem?D_(Yt.activeItem):void 0,Me=qt.findIndex(function(sr){return rn(ve,D_(sr))}),_e=Me!==-1?Me:(Yt==null?void 0:Yt.activeIndex)!==void 0&&(Yt==null?void 0:Yt.activeIndex)<qt.length?Yt==null?void 0:Yt.activeIndex:qt.length>0?0:-1,Fn=qt.map(function(sr,Vn){return dt(dt({},sr),{},{active:Vn===_e})}),jr=Fn[_e];return{items:Fn,itemsMap:Pu(Fn,function(sr){return Qt(sr.path)}),activeItem:jr,activeIndex:_e}}(0,Rt,St)),n(22,Ct=!1)})},300),ue=!1,_n=[],Qe=Ol(UO);function gn(Y,mt,Rt,Wt){tc(function(){var qt;try{qt=Qe(Y,mt,Rt,Wt)}catch(Yt){qt=[{path:[],message:"Failed to validate: "+Yt.message,severity:No.warning}]}rn(qt,_n)||(i("validationErrors changed:",qt),n(13,_n=qt))},function(qt){return i("validationErrors updated in ".concat(qt," ms"))})}function ln(){return i("validate"),ut?{parseError:ut,isRepairable:!1}:(gn(c,A,E,L),Ue(_n)?null:{validationErrors:_n})}function ir(){return c}function or(){return K}function ar(Y){Y.json!==void 0&&function(mt){if(mt!==void 0){var Rt=!rn(c,mt);if(i("update external json",{isChanged:Rt,currentlyText:c===void 0}),!!Rt){var Wt={json:c,text:l},qt=K,Yt=c,ve=l,Me=ue;n(11,c=mt),zn(c),n(12,l=void 0),n(24,ue=!1),ut=void 0,an(c),bt({previousJson:Yt,previousState:qt,previousText:ve,previousTextIsRepaired:Me}),me(Wt,null)}}}(Y.json),Y.text!==void 0&&function(mt){if(!(mt===void 0||w.json!==void 0)){var Rt=mt!==l;if(i("update external text",{isChanged:Rt}),!!Rt){var Wt={json:c,text:l},qt=c,Yt=K,ve=l,Me=ue;try{n(11,c=N(mt)),zn(c),n(12,l=mt),n(24,ue=!1),ut=void 0}catch(_e){try{n(11,c=N(Io(mt))),zn(c),n(12,l=mt),n(24,ue=!0),ut=void 0,an(c)}catch(Fn){n(11,c=void 0),n(12,l=w.text),n(24,ue=!1),ut=l!==void 0&&l!==""?Du(l,_e.message||_e.toString()):void 0}}an(c),bt({previousJson:qt,previousState:Yt,previousText:ve,previousTextIsRepaired:Me}),me(Wt,null)}}}(Y.text)}function zn(Y){Bt||(Bt=!0,n(17,K=Vi(Y,K,[],function(mt){return D6({json:mt},d3)?Jo:gl}(Y))))}function an(Y){K.selection!==void 0&&(K.selection&&Ni(Y,K.selection.anchorPath)&&Ni(Y,K.selection.focusPath)||(i("clearing selection: path does not exist anymore",K.selection),n(17,K=dt(dt({},K),{},{selection:qu(Y,K)}))))}function bt(Y){var mt=Y.previousJson,Rt=Y.previousState,Wt=Y.previousText,qt=Y.previousTextIsRepaired;mt===void 0&&Wt===void 0||(c!==void 0?mt!==void 0?De.add({undo:{patch:[{op:"replace",path:"",value:mt}],state:Yr(Rt),json:void 0,text:Wt,textIsRepaired:qt},redo:{patch:[{op:"replace",path:"",value:c}],state:Yr(K),json:void 0,text:l,textIsRepaired:ue}}):De.add({undo:{patch:void 0,json:void 0,text:Wt,state:Yr(Rt),textIsRepaired:qt},redo:{patch:void 0,json:c,state:Yr(K),text:l,textIsRepaired:ue}}):mt!==void 0&&De.add({undo:{patch:void 0,json:mt,state:Yr(Rt),text:Wt,textIsRepaired:qt},redo:{patch:void 0,json:void 0,text:l,textIsRepaired:ue,state:Yr(K)}}))}function ie(Y,mt){if(i("patch",Y,mt),c===void 0)throw new Error("Cannot apply patch: no JSON");var Rt={json:c,text:l},Wt=c,qt=K,Yt=l,ve=ue,Me=P_(c,Y),_e=h_(c,K,Y),Fn=Hu(c,Y),jr=function(la,Mo){return Mo!==void 0||!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?dt(dt({},la),{},{selection:Mo}):la}(_e.documentState,Fn,!1);i("patch updatedSelection",Fn);var sr=typeof mt=="function"?mt(_e.json,jr):void 0;n(11,c=sr&&sr.json!==void 0?sr.json:_e.json);var Vn=sr&&sr.state!==void 0?sr.state:jr;n(17,K=Vn),n(12,l=void 0),n(24,ue=!1),n(19,pt=void 0),ut=void 0,an(c),De.add({undo:{patch:Me,json:void 0,text:Yt,state:Yr(qt),textIsRepaired:ve},redo:{patch:Y,json:void 0,state:Yr(Vn),text:l,textIsRepaired:ue}});var li={json:c,previousJson:Wt,undo:Me,redo:Y};return me(Rt,li),li}function Le(){!b&&K.selection&>(Wi(K.selection.focusPath,!0))}function yt(){if(!b&&K.selection){var Y=K.selection.focusPath,mt=se(c,Y);Jn(mt)?function(Rt,Wt){i("openJSONEditorModal",{path:Rt,value:Wt}),st=!0,U({content:{json:Wt},path:Rt,onPatch:Xe.onPatch,onClose:function(){st=!1,br()}})}(Y,mt):gt(un(Y,!0))}}function Zt(){if(!b&&Ge(K.selection)){var Y=K.selection.focusPath,mt=Qt(Y),Rt=se(c,Y),Wt=!ja(Rt,K.enforceStringMap,mt,E),qt=Wt?String(Rt):gu(String(Rt),E);i("handleToggleEnforceString",{enforceString:Wt,value:Rt,updatedValue:qt}),xe([{op:"replace",path:mt,value:qt}],function(Yt,ve){return{state:f_(ve,mt,Wt)}})}}function Gt(){return fe.apply(this,arguments)}function fe(){return fe=Ee(Ft().mark(function Y(){var mt,Rt=arguments;return Ft().wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:return mt=!(Rt.length>0&&Rt[0]!==void 0)||Rt[0],Wt.next=3,ME({json:c,documentState:K,indentation:mt?O:void 0,readOnly:b,parser:E,onPatch:xe});case 3:case"end":return Wt.stop()}},Y)})),fe.apply(this,arguments)}function Nn(){return tn.apply(this,arguments)}function tn(){return tn=Ee(Ft().mark(function Y(){var mt,Rt=arguments;return Ft().wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(mt=!(Rt.length>0&&Rt[0]!==void 0)||Rt[0],c!==void 0){Wt.next=3;break}return Wt.abrupt("return");case 3:return Wt.next=5,EE({json:c,documentState:K,indentation:mt?O:void 0,parser:E});case 5:case"end":return Wt.stop()}},Y)})),tn.apply(this,arguments)}function Tr(){f(nM,{},dt(dt({},Ss),{},{styleWindow:{width:"450px"}}),{onClose:function(){return br()}})}function Z(Y,mt){f(dM,{text:Y,onParse:Sh,onRepair:R6,onApply:mt},dt(dt({},Ss),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return br()}})}function ct(){PE({json:c,text:l,documentState:K,keepSelection:!1,readOnly:b,onChange:q,onPatch:xe})}function lt(){!b&&c!==void 0&&K.selection&&Ju(K.selection)&&!Ue(K.selection.focusPath)&&(i("duplicate",{selection:K.selection}),xe(M_(c,C_(K.selection))))}function rt(){if(!b&&K.selection&&(yn(K.selection)||Ge(K.selection))&&!Ue(K.selection.focusPath)){i("extract",{selection:K.selection});var Y=function(mt,Rt){if(Ge(Rt))return[{op:"move",from:Qt(Rt.focusPath),path:""}];if(!yn(Rt))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Wt=se(mt,Ze(Rt.focusPath));if(An(Wt))return[{op:"replace",path:"",value:Rt.paths.map(function(Yt){var ve=Cr(le(Yt));return Wt[ve]})}];if(nr(Wt)){var qt={};return Rt.paths.forEach(function(Yt){var ve=String(le(Yt));qt[ve]=Wt[ve]}),[{op:"replace",path:"",value:qt}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(Rt))}(c,K.selection);xe(Y,function(mt,Rt){if(Jn(mt))return{state:Ua(mt,Rt,[])}})}}function Tt(Y){c!==void 0&&Yh({insertType:Y,selectInside:!0,refJsonEditor:u,json:c,documentState:K,readOnly:b,parser:E,onPatch:xe,onReplaceJson:wn})}function te(Y){yr(K.selection)&>(un(K.selection.focusPath,!1)),Tt(Y)}function ye(Y){if(!b&&K.selection)if(Bs(K.selection))try{var mt=K.selection.anchorPath,Rt=se(c,mt),Wt=function(Yt,ve,Me){if(ve==="array"){if(Array.isArray(Yt))return Yt;if(In(Yt))return A6(Yt);if(typeof Yt=="string")try{var _e=Me.parse(Yt);if(Array.isArray(_e))return _e;if(In(_e))return A6(_e)}catch(jr){return[Yt]}return[Yt]}if(ve==="object"){if(Array.isArray(Yt))return E6(Yt);if(In(Yt))return Yt;if(typeof Yt=="string")try{var Fn=Me.parse(Yt);if(In(Fn))return Fn;if(Array.isArray(Fn))return E6(Fn)}catch(jr){return{value:Yt}}return{value:Yt}}if(ve==="value")return Jn(Yt)?Me.stringify(Yt):Yt;throw new Error("Cannot convert ".concat(Np(Yt,Me)," to ").concat(ve))}(Rt,Y,E);if(Wt===Rt)return;var qt=[{op:"replace",path:Qt(mt),value:Wt}];i("handleConvert",{selection:K.selection,path:mt,type:Y,operations:qt}),xe(qt,function(Yt,ve){return{state:Ua(Yt,ve,K.selection.focusPath)}})}catch(Yt){I(Yt)}else I(new Error("Cannot convert current selection to ".concat(Y)))}function en(){var Y=w_(c,K,!1),mt=Ze(K.selection.focusPath);!Ue(Y.focusPath)&&rn(mt,Ze(Y.focusPath))?gt(Sa(Y.focusPath)):gt(Ja(mt)),i("insert before",{selection:K.selection,selectionBefore:Y,parentPath:mt}),pr().then(Pi)}function ze(){var Y=yn(K.selection)?le(K.selection.paths):K.selection.focusPath;i("insert after",Y),gt(Sa(Y)),pr().then(Pi)}function bn(Y){return On.apply(this,arguments)}function On(){return(On=Ee(Ft().mark(function Y(mt){return Ft().wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:return Rt.next=2,TE({char:mt,selectInside:!0,refJsonEditor:u,json:c,documentState:K,readOnly:b,parser:E,onPatch:xe,onReplaceJson:wn,onSelect:gt});case 2:case"end":return Rt.stop()}},Y)}))).apply(this,arguments)}function Re(){if(!b&&De.getState().canUndo){var Y=De.undo();if(Y){var mt={json:c,text:l};n(11,c=Y.undo.patch?so(c,Y.undo.patch):Y.undo.json),n(17,K=Y.undo.state),n(12,l=Y.undo.text),n(24,ue=Y.undo.textIsRepaired),ut=void 0,i("undo",{item:Y,json:c,documentState:K}),me(mt,{json:c,previousJson:mt.json,redo:Y.undo.patch,undo:Y.redo.patch}),br(),K.selection&&oe(K.selection.focusPath,!1)}}}function dn(){if(!b&&De.getState().canRedo){var Y=De.redo();if(Y){var mt={json:c,text:l};n(11,c=Y.redo.patch?so(c,Y.redo.patch):Y.redo.json),n(17,K=Y.redo.state),n(12,l=Y.redo.text),n(24,ue=Y.redo.textIsRepaired),ut=void 0,i("redo",{item:Y,json:c,documentState:K}),me(mt,{json:c,previousJson:mt.json,redo:Y.redo.patch,undo:Y.undo.patch}),br(),K.selection&&oe(K.selection.focusPath,!1)}}}function nt(Y){var mt;b||c===void 0||(st=!0,k({id:h,json:c,rootPath:Y,onSort:(mt=Ee(Ft().mark(function Rt(Wt){var qt;return Ft().wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:qt=Wt.operations,i("onSort",Y,qt),xe(qt,function(ve,Me){return{state:dt(dt({},Ua(ve,Me,Y)),{},{selection:un(Y,!1)})}});case 3:case"end":return Yt.stop()}},Rt)})),function(Rt){return mt.apply(this,arguments)}),onClose:function(){st=!1,br()}}))}function Et(){K.selection&&nt(j_(c,K.selection))}function Vt(Y){if(c!==void 0){var mt=Y.id,Rt=Y.onTransform,Wt=Y.onClose,qt=Y.rootPath||[];st=!0,H({id:mt||d,json:c,rootPath:qt,onTransform:function(Yt){Rt?Rt({operations:Yt,json:c,transformedJson:so(c,Yt)}):(i("onTransform",qt,Yt),xe(Yt,function(ve,Me){return{state:dt(dt({},Ua(ve,Me,qt)),{},{selection:un(qt,!1)})}}))},onClose:function(){st=!1,br(),Wt&&Wt()}})}}function ne(){K.selection&&Vt({rootPath:j_(c,K.selection)})}function oe(Y){return Ie.apply(this,arguments)}function Ie(){return Ie=Ee(Ft().mark(function Y(mt){var Rt,Wt,qt,Yt,ve,Me=arguments;return Ft().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return Rt=!(Me.length>1&&Me[1]!==void 0)||Me[1],n(17,K=Rg(c,K,mt)),_e.next=4,pr();case 4:if(!(Wt=Ye(mt))){_e.next=16;break}if(i("scrollTo",{path:mt,elem:Wt,refContents:a}),qt=a.getBoundingClientRect(),Yt=Wt.getBoundingClientRect(),Rt){_e.next=12;break}if(!(Yt.bottom>qt.top&&Yt.top<qt.bottom)){_e.next=12;break}return _e.abrupt("return",Promise.resolve());case 12:return ve=-qt.height/4,_e.abrupt("return",new Promise(function(Fn){y(Wt,{container:a,offset:ve,duration:300,callback:function(){return Fn()}})}));case 16:return _e.abrupt("return",Promise.resolve());case 17:case"end":return _e.stop()}},Y)})),Ie.apply(this,arguments)}function Ye(Y){return a?a.querySelector('div[data-path="'.concat(zu(Y),'"]')):null}function pe(Y){var mt=Ye(Y);if(mt&&a){var Rt=a.getBoundingClientRect(),Wt=mt.getBoundingClientRect(),qt=Jn(se(c,Y))?20:Wt.height;Wt.top<Rt.top+20?y(mt,{container:a,offset:-20,duration:0}):Wt.top+qt>Rt.bottom-20&&y(mt,{container:a,offset:-(Rt.height-qt-20),duration:0})}}function me(Y,mt){(Y.json!==void 0||(Y==null?void 0:Y.text)!==void 0)&&(l!==void 0?q({text:l,json:void 0},Y,{contentErrors:ln(),patchResult:mt}):c!==void 0&&q({text:void 0,json:c},Y,{contentErrors:ln(),patchResult:mt}))}function xe(Y,mt){if(!b)return i("handlePatch",Y,mt),ie(Y,mt)}function wn(Y,mt){var Rt=K,Wt=c,qt=l,Yt={json:c,text:l},ve=ue,Me=Vi(c,K,[],Jo),_e=typeof mt=="function"?mt(Y,Me):void 0;n(11,c=_e&&_e.json!==void 0?_e.json:Y),n(17,K=_e&&_e.state!==void 0?_e.state:Me),n(12,l=void 0),n(24,ue=!1),ut=void 0,an(c),bt({previousJson:Wt,previousState:Rt,previousText:qt,previousTextIsRepaired:ve}),me(Yt,null)}function xn(Y,mt){i("handleChangeText");var Rt=K,Wt=c,qt=l,Yt={json:c,text:l},ve=ue;try{n(11,c=N(Y)),n(17,K=Vi(c,K,[],Jo)),n(12,l=void 0),n(24,ue=!1),ut=void 0}catch(_e){try{n(11,c=N(Io(Y))),n(17,K=Vi(c,K,[],Jo)),n(12,l=Y),n(24,ue=!0),ut=void 0}catch(Fn){n(11,c=void 0),n(17,K=Eh({json:c,expand:Jo})),n(12,l=Y),n(24,ue=!1),ut=l!==""?Du(l,_e.message||_e.toString()):void 0}}if(typeof mt=="function"){var Me=mt(c,K);n(11,c=Me&&Me.json?Me.json:c),n(17,K=Me&&Me.state?Me.state:K)}an(c),bt({previousJson:Wt,previousState:Rt,previousText:qt,previousTextIsRepaired:ve}),me(Yt,null)}function kr(Y,mt){var Rt=arguments.length>2&&arguments[2]!==void 0&&arguments[2];i("expand",{path:Y,expanded:mt,recursive:Rt}),n(17,K=mt?Rt?Vi(c,K,Y,gl):function(Wt,qt){return dt(dt({},Wt),{},{expandedMap:dt(dt({},Wt.expandedMap),{},fi({},Qt(qt),!0))})}(K,Y):l_(K,Y)),K.selection&&!mt&&function(Wt,qt){return Uu(Wt.focusPath,qt)&&(Wt.focusPath.length>qt.length||_r(Wt))}(K.selection,Y)&>(void 0),setTimeout(function(){_h(u)||br()})}function Zi(Y){i("openFind",{findAndReplace:Y}),n(20,$t=!1),n(21,Kt=!1),pr().then(function(){n(20,$t=!0),n(21,Kt=Y)})}function su(Y,mt){i("handleExpandSection",Y,mt);var Rt=Qt(Y);n(17,K=function(Wt,qt,Yt,ve){return dt(dt({},qt),{},{visibleSectionsMap:dt(dt({},qt.visibleSectionsMap),{},fi({},Yt,c_(Ah(qt,Yt).concat(ve))))})}(0,K,Rt,mt))}function Ea(Y){i("pasted json as text",Y),n(19,pt=Y)}function ci(Y){var mt=Y.anchor,Rt=Y.left,Wt=Y.top,qt=Y.width,Yt=Y.height,ve=Y.offsetTop,Me=Y.offsetLeft,_e=Y.showTip;st=!0;var Fn=p(_J,{json:c,documentState:K,parser:E,showTip:_e,onEditKey:Le,onEditValue:yt,onToggleEnforceString:Zt,onCut:Gt,onCopy:Nn,onPaste:Tr,onRemove:ct,onDuplicate:lt,onExtract:rt,onInsertBefore:en,onInsert:te,onConvert:ye,onInsertAfter:ze,onSort:Et,onTransform:ne,onCloseContextMenu:function(){m(Fn),br()}},{left:Rt,top:Wt,offsetTop:ve,offsetLeft:Me,width:qt,height:Yt,anchor:mt,closeOnOuterClick:!0,onClose:function(){st=!1,br()}})}function Pi(Y){if(!b&&!Ka(K.selection)){if(Y&&(Y.stopPropagation(),Y.preventDefault()),Y&&Y.type==="contextmenu"&&Y.target!==s)ci({left:Y.clientX,top:Y.clientY,width:pa,height:va,showTip:!1});else{var mt,Rt=(mt=a)===null||mt===void 0?void 0:mt.querySelector(".jse-context-menu-pointer.jse-selected");if(Rt)ci({anchor:Rt,offsetTop:2,width:pa,height:va,showTip:!1});else{var Wt,qt=(Wt=a)===null||Wt===void 0?void 0:Wt.getBoundingClientRect();qt&&ci({top:qt.top+2,left:qt.left+2,width:pa,height:va,showTip:!1})}}return!1}}function Aa(){return(Aa=Ee(Ft().mark(function Y(){var mt,Rt,Wt;return Ft().wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return i("apply pasted json",pt),Rt=(mt=pt).path,Wt=mt.contents,gt(un(Rt,!1)),qt.next=5,pr();case 5:xe([{op:"replace",path:Qt(Rt),value:Wt}],function(Yt,ve){return{state:Ua(Yt,ve,Rt)}});case 7:case"end":return qt.stop()}},Y)}))).apply(this,arguments)}function br(){i("focus"),s&&(s.focus(),s.select())}function _o(Y){return function(mt,Rt,Wt){var qt=Ze(Wt),Yt=[le(Wt)],ve=se(mt,qt),Me=ve?zg(ve,Rt,Yt):void 0;return Me?un(qt.concat(Me),!1):Sa(Wt)}(c,K,Y)}function Oo(Y){r&&r.onDrag(Y)}function Jv(){r&&r.onDragEnd()}return e.$$set=function(Y){"readOnly"in Y&&n(0,b=Y.readOnly),"externalContent"in Y&&n(51,w=Y.externalContent),"mainMenuBar"in Y&&n(1,j=Y.mainMenuBar),"navigationBar"in Y&&n(2,x=Y.navigationBar),"escapeControlCharacters"in Y&&n(52,R=Y.escapeControlCharacters),"escapeUnicodeCharacters"in Y&&n(53,M=Y.escapeUnicodeCharacters),"parser"in Y&&n(3,E=Y.parser),"parseMemoizeOne"in Y&&n(54,N=Y.parseMemoizeOne),"validator"in Y&&n(55,A=Y.validator),"validationParser"in Y&&n(56,L=Y.validationParser),"pathParser"in Y&&n(4,W=Y.pathParser),"indentation"in Y&&n(5,O=Y.indentation),"onError"in Y&&n(6,I=Y.onError),"onChange"in Y&&n(57,q=Y.onChange),"onChangeMode"in Y&&n(58,P=Y.onChangeMode),"onRenderValue"in Y&&n(59,_=Y.onRenderValue),"onRenderMenu"in Y&&n(7,S=Y.onRenderMenu),"onClassName"in Y&&n(60,$=Y.onClassName),"onFocus"in Y&&n(61,D=Y.onFocus),"onBlur"in Y&&n(62,B=Y.onBlur),"onSortModal"in Y&&n(63,k=Y.onSortModal),"onTransformModal"in Y&&n(64,H=Y.onTransformModal),"onJSONEditorModal"in Y&&n(65,U=Y.onJSONEditorModal)},e.$$.update=function(){6291456&e.$$.dirty[1]&&n(73,Pt=$g({escapeControlCharacters:R,escapeUnicodeCharacters:M})),1048576&e.$$.dirty[1]&&ar(w),2048&e.$$.dirty[0]|4096&e.$$.dirty[2]&&Bn(V,c),e.$$.dirty[0],2056&e.$$.dirty[0]|50331648&e.$$.dirty[1]&&gn(c,A,E,L),8192&e.$$.dirty[0]&&n(25,Ne=function(Y){var mt={};return Y.forEach(function(Rt){mt[Qt(Rt.path)]=Rt}),Y.forEach(function(Rt){for(var Wt=Rt.path;Wt.length>0;){var qt=Qt(Wt=Ze(Wt));qt in mt||(mt[qt]={isChildError:!0,path:Wt,message:"Contains invalid data",severity:No.warning})}}),mt}(_n)),1024&e.$$.dirty[0]&&(r=a?function(Y){var mt,Rt;function Wt(Me){return Me<20?XN:Me<50?tI:eI}function qt(){if(Y){var Me=(mt||0)*(f3/1e3);Y.scrollTop+=Me}}function Yt(Me){Rt&&Me===mt||(ve(),i0("startAutoScroll",Me),mt=Me,Rt=setInterval(qt,f3))}function ve(){Rt&&(i0("stopAutoScroll"),clearInterval(Rt),Rt=void 0,mt=void 0)}return i0("createAutoScrollHandler",Y),{onDrag:function(Me){if(Y){var _e=Me.clientY,Fn=Y.getBoundingClientRect(),jr=Fn.top,sr=Fn.bottom;_e<jr?Yt(-Wt(jr-_e)):_e>sr?Yt(Wt(_e-sr)):ve()}},onDragEnd:function(){ve()}}}(a):void 0),9&e.$$.dirty[0]|805306368&e.$$.dirty[1]|2048&e.$$.dirty[2]&&n(14,Xe={readOnly:b,parser:E,normalization:Pt,getJson:ir,getDocumentState:or,findElement:Ye,findNextInside:_o,focus:br,onPatch:xe,onInsert:Tt,onExpand:kr,onSelect:gt,onFind:Zi,onExpandSection:su,onPasteJson:Ea,onRenderValue:_,onContextMenu:ci,onClassName:$||function(){},onDrag:Oo,onDragEnd:Jv}),16384&e.$$.dirty[0]&&i("context changed",Xe)},[b,j,x,E,W,O,I,S,function(){return ue&&c!==void 0&&wn(c),{json:c,text:l}},br,a,c,l,_n,Xe,s,u,K,St,pt,$t,Kt,Ct,re,ue,Ne,o,Q,function(){return wt.apply(this,arguments)},function(){return _t.apply(this,arguments)},function(Y,mt){return Ut.apply(this,arguments)},function(Y,mt){return zt.apply(this,arguments)},function(){n(20,$t=!1),n(21,Kt=!1),Q(""),br()},function(Y){i("select validation error",Y),gt(un(Y.path,!1)),oe(Y.path)},Nn,function(Y){Y.preventDefault(),AE({clipboardText:Y.clipboardData.getData("text/plain"),json:c,documentState:K,readOnly:b,parser:E,onPatch:xe,onChangeText:xn,openRepairModal:Z})},Re,dn,function(){nt([])},function(){Vt({rootPath:[]})},function(){kr([],!0,!0)},function(){kr([],!1,!0)},function(Y){var mt=Ha(Y),Rt=Y.shiftKey;if(i("keydown",{combo:mt,key:Y.key}),mt==="Ctrl+X"&&(Y.preventDefault(),Gt(!0)),mt==="Ctrl+Shift+X"&&(Y.preventDefault(),Gt(!1)),mt==="Ctrl+C"&&(Y.preventDefault(),Nn(!0)),mt==="Ctrl+Shift+C"&&(Y.preventDefault(),Nn(!1)),mt==="Ctrl+D"&&(Y.preventDefault(),lt()),mt!=="Delete"&&mt!=="Backspace"||(Y.preventDefault(),ct()),mt==="Insert"&&(Y.preventDefault(),Tt("structure")),mt==="Ctrl+A"&&(Y.preventDefault(),gt(un([],!1))),mt==="Ctrl+Q"&&Pi(Y),mt==="ArrowUp"||mt==="Shift+ArrowUp"){Y.preventDefault();var Wt=K.selection?w_(c,K,Rt,!0)||K.selection:qu(c,K);gt(Wt),pe(Wt.focusPath)}if(mt==="ArrowDown"||mt==="Shift+ArrowDown"){Y.preventDefault();var qt=K.selection?function(Vn,li){var la=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Mo=arguments.length>3&&arguments[3]!==void 0&&arguments[3],kn=li.selection;if(!kn)return null;var wi=!Mo&&yn(kn)?le(kn.paths):kn.focusPath,Xi=zg(Vn,li,wi),Eo=Xi,Ao=Xi;if(Xi===null||Eo==null||Ao==null)return null;if(la){var ws=zg(Vn,Jn(se(Vn,wi))?l_(li,wi):li,wi);return ws===null?null:fo(kn)?wr(Vn,ws,ws):_r(kn)?wr(Vn,Eo,Ao):wr(Vn,kn.anchorPath,ws)}if(yr(kn)){var ht=se(Vn,Ze(Xi));return Array.isArray(ht)?un(Ao,!1):Wi(Ao,!1)}return Ge(kn)?un(Ao,!1):_r(kn)?wr(Vn,Eo,Ao):wr(Vn,Xi,Xi)}(c,K,Rt,!0)||K.selection:qu(c,K);gt(qt),pe(qt.focusPath)}if(mt==="ArrowLeft"||mt==="Shift+ArrowLeft"){Y.preventDefault();var Yt=K.selection?function(Vn,li){var la=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Mo=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],kn=li.selection;if(!kn)return null;var wi=x_(Vn,li,Mo),Xi=wi.caret,Eo=wi.previous;if(la)return yn(kn)?null:wr(Vn,kn.anchorPath,kn.focusPath);if(Xi&&Eo)return Fg(Eo);var Ao=se(Vn,Ze(kn.focusPath));return Ge(kn)&&Array.isArray(Ao)?wr(Vn,kn.focusPath,kn.focusPath):yn(kn)&&!Array.isArray(Ao)?Wi(kn.focusPath,!1):null}(c,K,Rt,!b)||K.selection:qu(c,K);gt(Yt),pe(Yt.focusPath)}if(mt==="ArrowRight"||mt==="Shift+ArrowRight"){Y.preventDefault();var ve=K.selection&&c!==void 0?function(Vn,li){var la=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Mo=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],kn=li.selection;if(!kn)return null;var wi=x_(Vn,li,Mo),Xi=wi.caret,Eo=wi.next;return la?yn(kn)?null:wr(Vn,kn.anchorPath,kn.focusPath):Xi&&Eo?Fg(Eo):yn(kn)?un(kn.focusPath,!1):null}(c,K,Rt,!b)||K.selection:qu(c,K);gt(ve),pe(ve.focusPath)}if(mt==="Enter"&&K.selection){if(!b&&yn(K.selection)&&K.selection.paths.length===1){var Me=K.selection.focusPath,_e=se(c,Ze(Me));Array.isArray(_e)&>(un(Me,!1))}!b&&yr(K.selection)&&(Y.preventDefault(),gt(dt(dt({},K.selection),{},{edit:!0}))),Ge(K.selection)&&(Y.preventDefault(),Jn(se(c,K.selection.focusPath))?kr(K.selection.focusPath,!0):b||gt(dt(dt({},K.selection),{},{edit:!0})))}if(mt.replace(/^Shift\+/,"").length===1&&K.selection)return Y.preventDefault(),void bn(Y.key);if(mt==="Enter"&&(fo(K.selection)||_r(K.selection)))return Y.preventDefault(),void bn("");if(mt==="Ctrl+Enter"&&Ge(K.selection)){var Fn=se(c,K.selection.focusPath);Rf(Fn)&&window.open(String(Fn),"_blank")}if(mt==="Escape"&&K.selection&&(Y.preventDefault(),gt(void 0)),mt==="Ctrl+F"&&(Y.preventDefault(),Zi(!1)),mt==="Ctrl+H"&&(Y.preventDefault(),Zi(!0)),mt==="Ctrl+Z"){Y.preventDefault();var jr=document.activeElement;jr&&jr.blur&&jr.focus?(jr.blur(),setTimeout(function(){Re(),setTimeout(function(){return jr.select()})})):Re()}if(mt==="Ctrl+Shift+Z"){Y.preventDefault();var sr=document.activeElement;sr&&sr.blur&&sr.focus?(sr.blur(),setTimeout(function(){dn(),setTimeout(function(){return sr.select()})})):dn()}},function(Y){i("handleMouseDown",Y),setTimeout(function(){setTimeout(function(){g||U6(Y.target,"BUTTON")||(br(),K.selection||c!==void 0||l!==""&&l!==void 0||(i("createDefaultSelection"),n(17,K=dt(dt({},K),{},{selection:wr(c||{},[],[])}))))})})},Pi,function(Y){b||ci({anchor:K6(Y.target,"BUTTON"),offsetTop:0,width:pa,height:va,showTip:!0})},function(){return Aa.apply(this,arguments)},function(){i("clear pasted json"),n(19,pt=void 0)},function(){P(Lr.text)},function(Y){gt(Y),br(),oe(Y.focusPath)},function(Y){var mt=!fl(Y.target,function(Rt){return Rt===u});mt&&Ka(K.selection)&&(i("click outside the editor, stop edit mode"),gt(function(Rt){return yr(Rt)||Ge(Rt)?dt(dt({},Rt),{},{edit:!1}):Rt}),g&&s&&(s.focus(),s.blur()),pr().then(function(){setTimeout(function(){s&&s.blur()})}))},w,R,M,N,A,L,q,P,_,$,D,B,k,H,U,function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gl;i("expand");var mt=dt(dt({},K),{},{expandedMap:{},visibleSectionsMap:{}});n(17,K=Vi(c,mt,[],Y))},ln,ir,ie,Vt,oe,Ye,Pt,V,function(Y){n(20,$t=Y)},function(Y){He[Y?"unshift":"push"](function(){n(15,s=Y)})},function(Y){He[Y?"unshift":"push"](function(){n(10,a=Y)})},function(){setTimeout(br)},function(Y){He[Y?"unshift":"push"](function(){n(16,u=Y)})}]}var x0=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,CG,SG,Be,{readOnly:0,externalContent:51,mainMenuBar:1,navigationBar:2,escapeControlCharacters:52,escapeUnicodeCharacters:53,parser:3,parseMemoizeOne:54,validator:55,validationParser:56,pathParser:4,indentation:5,onError:6,onChange:57,onChangeMode:58,onRenderValue:59,onRenderMenu:7,onClassName:60,onFocus:61,onBlur:62,onSortModal:63,onTransformModal:64,onJSONEditorModal:65,expand:66,validate:67,getJson:68,patch:69,acceptAutoRepair:8,openTransformModal:70,scrollTo:71,findElement:72,focus:9},gG,[-1,-1,-1,-1,-1]),i}return tt(n,[{key:"expand",get:function(){return this.$$.ctx[66]}},{key:"validate",get:function(){return this.$$.ctx[67]}},{key:"getJson",get:function(){return this.$$.ctx[68]}},{key:"patch",get:function(){return this.$$.ctx[69]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[70]}},{key:"scrollTo",get:function(){return this.$$.ctx[71]}},{key:"findElement",get:function(){return this.$$.ctx[72]}},{key:"focus",get:function(){return this.$$.ctx[9]}}]),n}();function $G(e){Ae(e,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function BE(e){var t,n,r,i,o,a=[OG,_G],s=[];function u(c,l){return 16384&l[0]&&(t=null),t==null&&(t=!!Array.isArray(c[14])),t?0:1}return n=u(e,[-1,-1]),r=s[n]=a[n](e),{c:function(){r.c(),i=vn()},m:function(c,l){s[n].m(c,l),ot(c,i,l),o=!0},p:function(c,l){var f=n;(n=u(c,l))===f?s[n].p(c,l):(Dt(),z(s[f],1,1,function(){s[f]=null}),Lt(),(r=s[n])?r.p(c,l):(r=s[n]=a[n](c)).c(),T(r,1),r.m(i.parentNode,i))},i:function(c){o||(T(r),o=!0)},o:function(c){z(r),o=!1},d:function(c){s[n].d(c),c&&it(i)}}}function _G(e){var t;return{c:function(){t=Jt("(Only available for arrays, not for objects)")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function OG(e){var t,n;return t=new tU({props:{queryOptions:e[12],json:e[14],onChange:e[22]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};4096&i[0]&&(o.queryOptions=r[12]),16384&i[0]&&(o.json=r[14]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function zE(e){var t,n;return t=new x0({props:{externalContent:e[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:e[2],escapeControlCharacters:e[3],escapeUnicodeCharacters:e[4],parser:e[5],parseMemoizeOne:e[6],onRenderValue:e[10],onRenderMenu:Dn,onError:console.error,onChange:Dn,onChangeMode:Dn,onFocus:Dn,onBlur:Dn,onSortModal:Dn,onTransformModal:Dn,onJSONEditorModal:Dn,onClassName:e[11],validator:null,validationParser:e[7],pathParser:e[8]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};524288&i[0]&&(o.externalContent=r[19]),4&i[0]&&(o.indentation=r[2]),8&i[0]&&(o.escapeControlCharacters=r[3]),16&i[0]&&(o.escapeUnicodeCharacters=r[4]),32&i[0]&&(o.parser=r[5]),64&i[0]&&(o.parseMemoizeOne=r[6]),1024&i[0]&&(o.onRenderValue=r[10]),2048&i[0]&&(o.onClassName=r[11]),128&i[0]&&(o.validationParser=r[7]),256&i[0]&&(o.pathParser=r[8]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function MG(e){var t,n;return{c:function(){t=G("div"),n=Jt(e[17]),C(t,"class","jse-preview jse-error svelte-107mggt")},m:function(r,i){ot(r,t,i),F(t,n)},p:function(r,i){131072&i[0]&&be(n,r[17])},i:It,o:It,d:function(r){r&&it(t)}}}function EG(e){var t,n;return t=new x0({props:{externalContent:e[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:e[2],escapeControlCharacters:e[3],escapeUnicodeCharacters:e[4],parser:e[5],parseMemoizeOne:e[6],onRenderValue:e[10],onRenderMenu:Dn,onError:console.error,onChange:Dn,onChangeMode:Dn,onFocus:Dn,onBlur:Dn,onSortModal:Dn,onTransformModal:Dn,onJSONEditorModal:Dn,onClassName:e[11],validator:null,validationParser:e[7],pathParser:e[8]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};262144&i[0]&&(o.externalContent=r[18]),4&i[0]&&(o.indentation=r[2]),8&i[0]&&(o.escapeControlCharacters=r[3]),16&i[0]&&(o.escapeUnicodeCharacters=r[4]),32&i[0]&&(o.parser=r[5]),64&i[0]&&(o.parseMemoizeOne=r[6]),1024&i[0]&&(o.onRenderValue=r[10]),2048&i[0]&&(o.onClassName=r[11]),128&i[0]&&(o.validationParser=r[7]),256&i[0]&&(o.pathParser=r[8]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function AG(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,W,O,I,q,P,_,S,$,D,B,k,H,U,st,ut,gt,St,Pt,pt,Bt=e[21](e[0]).description+"";t=new lU({props:{queryLanguages:e[9],queryLanguageId:e[0],onChangeQueryLanguage:e[27]}}),y=new on({props:{data:e[15]?qi:Ga}});var K=e[15]&&BE(e);I=new on({props:{data:e[16]?qi:Ga}});var $t=e[16]&&zE(e),Kt=[EG,MG],Ct=[];function V(Q,ft){return Q[17]?1:0}return B=V(e),k=Ct[B]=Kt[B](e),{c:function(){jt(t.$$.fragment),n=vt(),r=G("div"),i=G("div"),o=G("div"),(a=G("div")).innerHTML='<div class="jse-label-inner svelte-107mggt">Language</div>',s=vt(),u=G("div"),c=vt(),(l=G("div")).innerHTML='<div class="jse-label-inner svelte-107mggt">Path</div>',f=vt(),h=G("input"),v=vt(),p=G("div"),m=G("div"),g=G("button"),jt(y.$$.fragment),b=Jt(`
|
|
Wizard`),w=vt(),K&&K.c(),j=vt(),(x=G("div")).innerHTML='<div class="jse-label-inner svelte-107mggt">Query</div>',R=vt(),M=G("textarea"),E=vt(),N=G("div"),A=G("div"),L=G("div"),W=G("div"),O=G("button"),jt(I.$$.fragment),q=Jt(`
|
|
Original`),P=vt(),$t&&$t.c(),_=vt(),S=G("div"),($=G("div")).innerHTML='<div class="jse-label-inner svelte-107mggt">Preview</div>',D=vt(),k.c(),H=vt(),U=G("div"),st=G("button"),ut=Jt("Transform"),C(a,"class","jse-label svelte-107mggt"),C(u,"class","jse-description svelte-107mggt"),C(l,"class","jse-label svelte-107mggt"),C(h,"class","jse-path svelte-107mggt"),C(h,"type","text"),h.readOnly=!0,C(h,"title","Selected path"),h.value=d=Ue(e[1])?"(whole document)":pi(e[1]),C(g,"type","button"),C(g,"class","svelte-107mggt"),C(m,"class","jse-label-inner svelte-107mggt"),C(p,"class","jse-label svelte-107mggt"),C(x,"class","jse-label svelte-107mggt"),C(M,"class","jse-query svelte-107mggt"),C(M,"spellcheck","false"),M.value=e[13],C(o,"class","jse-query-contents svelte-107mggt"),C(O,"type","button"),C(O,"class","svelte-107mggt"),C(W,"class","jse-label-inner svelte-107mggt"),C(L,"class","jse-label svelte-107mggt"),C(A,"class","jse-original-data svelte-107mggt"),At(A,"jse-hide",!e[16]),C($,"class","jse-label svelte-107mggt"),C(S,"class","jse-preview-data svelte-107mggt"),C(N,"class","jse-data-contents svelte-107mggt"),At(N,"jse-hide-original-data",!e[16]),C(i,"class","jse-main-contents svelte-107mggt"),C(st,"type","button"),C(st,"class","jse-primary svelte-107mggt"),st.disabled=gt=!!e[17],C(U,"class","jse-actions svelte-107mggt"),C(r,"class","jse-modal-contents svelte-107mggt")},m:function(Q,ft){xt(t,Q,ft),ot(Q,n,ft),ot(Q,r,ft),F(r,i),F(i,o),F(o,a),F(o,s),F(o,u),u.innerHTML=Bt,F(o,c),F(o,l),F(o,f),F(o,h),F(o,v),F(o,p),F(p,m),F(m,g),xt(y,g,null),F(g,b),F(o,w),K&&K.m(o,null),F(o,j),F(o,x),F(o,R),F(o,M),F(i,E),F(i,N),F(N,A),F(A,L),F(L,W),F(W,O),xt(I,O,null),F(O,q),F(A,P),$t&&$t.m(A,null),F(N,_),F(N,S),F(S,$),F(S,D),Ct[B].m(S,null),F(r,H),F(r,U),F(U,st),F(st,ut),St=!0,Pt||(pt=[Nt(g,"click",e[25]),Nt(M,"input",e[23]),Nt(O,"click",e[26]),Nt(st,"click",e[24]),Nr(TG.call(null,st))],Pt=!0)},p:function(Q,ft){var wt={};512&ft[0]&&(wt.queryLanguages=Q[9]),1&ft[0]&&(wt.queryLanguageId=Q[0]),t.$set(wt),(!St||1&ft[0])&&Bt!==(Bt=Q[21](Q[0]).description+"")&&(u.innerHTML=Bt),(!St||2&ft[0]&&d!==(d=Ue(Q[1])?"(whole document)":pi(Q[1]))&&h.value!==d)&&(h.value=d);var _t={};32768&ft[0]&&(_t.data=Q[15]?qi:Ga),y.$set(_t),Q[15]?K?(K.p(Q,ft),32768&ft[0]&&T(K,1)):((K=BE(Q)).c(),T(K,1),K.m(o,j)):K&&(Dt(),z(K,1,1,function(){K=null}),Lt()),(!St||8192&ft[0])&&(M.value=Q[13]);var Ut={};65536&ft[0]&&(Ut.data=Q[16]?qi:Ga),I.$set(Ut),Q[16]?$t?($t.p(Q,ft),65536&ft[0]&&T($t,1)):(($t=zE(Q)).c(),T($t,1),$t.m(A,null)):$t&&(Dt(),z($t,1,1,function(){$t=null}),Lt()),(!St||65536&ft[0])&&At(A,"jse-hide",!Q[16]);var zt=B;(B=V(Q))===zt?Ct[B].p(Q,ft):(Dt(),z(Ct[zt],1,1,function(){Ct[zt]=null}),Lt(),(k=Ct[B])?k.p(Q,ft):(k=Ct[B]=Kt[B](Q)).c(),T(k,1),k.m(S,null)),(!St||65536&ft[0])&&At(N,"jse-hide-original-data",!Q[16]),(!St||131072&ft[0]&>!==(gt=!!Q[17]))&&(st.disabled=gt)},i:function(Q){St||(T(t.$$.fragment,Q),T(y.$$.fragment,Q),T(K),T(I.$$.fragment,Q),T($t),T(k),St=!0)},o:function(Q){z(t.$$.fragment,Q),z(y.$$.fragment,Q),z(K),z(I.$$.fragment,Q),z($t),z(k),St=!1},d:function(Q){kt(t,Q),Q&&it(n),Q&&it(r),kt(y),K&&K.d(),kt(I),$t&&$t.d(),Ct[B].d(),Pt=!1,Mn(pt)}}}function PG(e){var t,n,r,i,o;return n=new t_({props:{$$slots:{default:[AG]},$$scope:{ctx:e}}}),{c:function(){t=G("div"),jt(n.$$.fragment),C(t,"class","jse-modal jse-transform svelte-107mggt")},m:function(a,s){ot(a,t,s),xt(n,t,null),r=!0,i||(o=Nr(Qh.call(null,t,e[20])),i=!0)},p:function(a,s){var u={};1048575&s[0]|256&s[1]&&(u.$$scope={dirty:s,ctx:a}),n.$set(u)},i:function(a){r||(T(n.$$.fragment,a),r=!0)},o:function(a){z(n.$$.fragment,a),r=!1},d:function(a){a&&it(t),kt(n),i=!1,o()}}}function TG(e){e.focus()}function RG(e,t,n){var r,i,o=Dr("jsoneditor:TransformModal"),a=t.id,s=a===void 0?"transform-modal-"+Wc():a,u=t.json,c=t.rootPath,l=c===void 0?[]:c,f=t.indentation,h=t.escapeControlCharacters,d=t.escapeUnicodeCharacters,v=t.parser,p=t.parseMemoizeOne,m=t.validationParser,g=t.pathParser,y=t.queryLanguages,b=t.queryLanguageId,w=t.onChangeQueryLanguage,j=t.onRenderValue,x=t.onClassName,R=t.onTransform,M=Ir("simple-modal").close,E="".concat(s,":").concat(Qt(l)),N=ho[E]||{},A=ho.showWizard!==!1,L=ho.showOriginal!==!1,W=N.queryOptions||{},O=b===N.queryLanguageId&&N.query?N.query:_(b).createQuery(u,N.queryOptions||{}),I=N.isManual||!1,q=void 0,P={text:""};function _($){return y.find(function(D){return D.id===$})||y[0]}var S=Eu(function($,D){try{o("previewTransform",{query:D});var B=_(b).executeQuery($,D,v);n(18,P={json:B}),n(17,q=void 0)}catch(k){n(18,P={text:""}),n(17,q=k.toString())}},300);return e.$$set=function($){"id"in $&&n(28,s=$.id),"json"in $&&n(29,u=$.json),"rootPath"in $&&n(1,l=$.rootPath),"indentation"in $&&n(2,f=$.indentation),"escapeControlCharacters"in $&&n(3,h=$.escapeControlCharacters),"escapeUnicodeCharacters"in $&&n(4,d=$.escapeUnicodeCharacters),"parser"in $&&n(5,v=$.parser),"parseMemoizeOne"in $&&n(6,p=$.parseMemoizeOne),"validationParser"in $&&n(7,m=$.validationParser),"pathParser"in $&&n(8,g=$.pathParser),"queryLanguages"in $&&n(9,y=$.queryLanguages),"queryLanguageId"in $&&n(0,b=$.queryLanguageId),"onChangeQueryLanguage"in $&&n(30,w=$.onChangeQueryLanguage),"onRenderValue"in $&&n(10,j=$.onRenderValue),"onClassName"in $&&n(11,x=$.onClassName),"onTransform"in $&&n(31,R=$.onTransform)},e.$$.update=function(){536870914&e.$$.dirty[0]&&n(14,r=se(u,l)),16384&e.$$.dirty[0]&&n(19,i={json:r}),24576&e.$$.dirty[0]&&S(r,O),12289&e.$$.dirty[0]|6&e.$$.dirty[1]&&(n(32,ho[E]={queryOptions:W,query:O,queryLanguageId:b,isManual:I},ho),o("store state in memory",E,ho[E]))},[b,l,f,h,d,v,p,m,g,y,j,x,W,O,r,A,L,q,P,i,M,_,function($){n(12,W=$),n(13,O=_(b).createQuery(u,$)),n(33,I=!1),o("updateQueryByWizard",{queryOptions:W,query:O,isManual:I})},function($){n(13,O=$.target.value),n(33,I=!0),o("handleChangeQuery",{query:O,isManual:I})},function(){try{o("handleTransform",{query:O});var $=_(b).executeQuery(r,O,v);R([{op:"replace",path:Qt(l),value:$}]),M()}catch(D){console.error(D),n(18,P={text:""}),n(17,q=D.toString())}},function(){n(15,A=!A),n(32,ho.showWizard=A,ho)},function(){n(16,L=!L),n(32,ho.showOriginal=L,ho)},function($){o("handleChangeQueryLanguage",$),n(0,b=$),w($);var D=_(b);n(13,O=D.createQuery(u,W)),n(33,I=!1)},s,u,w,R,ho,I]}var NG=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,RG,PG,Be,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},$G,[-1,-1]),i}return tt(n)}(),es={};function IG(e){Ae(e,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function FE(e){var t,n,r,i,o,a,s;function u(l){e[14](l)}var c={showChevron:!0,items:e[3]};return e[1]!==void 0&&(c.value=e[1]),o=new qs({props:c}),He.push(function(){return no(o,"value",u)}),{c:function(){t=G("tr"),(n=G("th")).textContent="Property",r=vt(),i=G("td"),jt(o.$$.fragment),C(n,"class","svelte-1y818v2"),C(i,"class","svelte-1y818v2")},m:function(l,f){ot(l,t,f),F(t,n),F(t,r),F(t,i),xt(o,i,null),s=!0},p:function(l,f){var h={};8&f&&(h.items=l[3]),!a&&2&f&&(a=!0,h.value=l[1],eo(function(){return a=!1})),o.$set(h)},i:function(l){s||(T(o.$$.fragment,l),s=!0)},o:function(l){z(o.$$.fragment,l),s=!1},d:function(l){l&&it(t),kt(o)}}}function VE(e){var t,n;return{c:function(){t=G("div"),n=Jt(e[5]),C(t,"class","jse-error svelte-1y818v2")},m:function(r,i){ot(r,t,i),F(t,n)},p:function(r,i){32&i&&be(n,r[5])},d:function(r){r&&it(t)}}}function DG(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,W,O,I,q;n=new s0({props:{title:e[4]?"Sort array items":"Sort object keys"}});var P=e[4]&&(e[3].length>1||e[1]===void 0)&&FE(e);function _(D){e[15](D)}var S={showChevron:!0,clearable:!1,items:e[7]};e[2]!==void 0&&(S.value=e[2]),j=new qs({props:S}),He.push(function(){return no(j,"value",_)});var $=e[5]&&VE(e);return{c:function(){t=G("div"),jt(n.$$.fragment),r=vt(),i=G("div"),o=G("table"),(a=G("colgroup")).innerHTML=`<col width="25%"/>
|
|
<col width="75%"/>`,s=vt(),u=G("tbody"),c=G("tr"),(l=G("th")).textContent="Path",f=vt(),h=G("td"),d=G("input"),p=vt(),P&&P.c(),m=vt(),g=G("tr"),(y=G("th")).textContent="Direction",b=vt(),w=G("td"),jt(j.$$.fragment),R=vt(),M=G("div"),$&&$.c(),E=vt(),N=G("div"),A=G("button"),L=Jt("Sort"),C(l,"class","svelte-1y818v2"),C(d,"class","jse-path svelte-1y818v2"),C(d,"type","text"),d.readOnly=!0,C(d,"title","Selected path"),d.value=v=Ue(e[0])?"(whole document)":pi(e[0]),C(h,"class","svelte-1y818v2"),C(y,"class","svelte-1y818v2"),C(w,"class","svelte-1y818v2"),C(o,"class","svelte-1y818v2"),C(M,"class","jse-space svelte-1y818v2"),C(A,"type","button"),C(A,"class","jse-primary svelte-1y818v2"),A.disabled=W=!!e[4]&&!e[1],C(N,"class","jse-actions svelte-1y818v2"),C(i,"class","jse-modal-contents svelte-1y818v2"),C(t,"class","jse-modal jse-sort svelte-1y818v2")},m:function(D,B){ot(D,t,B),xt(n,t,null),F(t,r),F(t,i),F(i,o),F(o,a),F(o,s),F(o,u),F(u,c),F(c,l),F(c,f),F(c,h),F(h,d),F(u,p),P&&P.m(u,null),F(u,m),F(u,g),F(g,y),F(g,b),F(g,w),xt(j,w,null),F(i,R),F(i,M),$&&$.m(M,null),F(i,E),F(i,N),F(N,A),F(A,L),O=!0,I||(q=[Nt(A,"click",e[8]),Nr(LG.call(null,A)),Nr(Qh.call(null,t,e[6]))],I=!0)},p:function(D,B){var k=ke(B,1)[0],H={};16&k&&(H.title=D[4]?"Sort array items":"Sort object keys"),n.$set(H),(!O||1&k&&v!==(v=Ue(D[0])?"(whole document)":pi(D[0]))&&d.value!==v)&&(d.value=v),D[4]&&(D[3].length>1||D[1]===void 0)?P?(P.p(D,k),26&k&&T(P,1)):((P=FE(D)).c(),T(P,1),P.m(u,m)):P&&(Dt(),z(P,1,1,function(){P=null}),Lt());var U={};!x&&4&k&&(x=!0,U.value=D[2],eo(function(){return x=!1})),j.$set(U),D[5]?$?$.p(D,k):(($=VE(D)).c(),$.m(M,null)):$&&($.d(1),$=null),(!O||18&k&&W!==(W=!!D[4]&&!D[1]))&&(A.disabled=W)},i:function(D){O||(T(n.$$.fragment,D),T(P),T(j.$$.fragment,D),O=!0)},o:function(D){z(n.$$.fragment,D),z(P),z(j.$$.fragment,D),O=!1},d:function(D){D&&it(t),kt(n),P&&P.d(),kt(j),$&&$.d(),I=!1,Mn(q)}}}function LG(e){e.focus()}function BG(e,t,n){var r,i,o,a=Dr("jsoneditor:SortModal"),s=t.id,u=t.json,c=t.rootPath,l=t.onSort,f=Ir("simple-modal").close,h="".concat(s,":").concat(Qt(c)),d=se(u,c),v={value:1,label:"ascending"},p=[v,{value:-1,label:"descending"}],m=es[h]&&es[h].selectedProperty||void 0,g=es[h]&&es[h].selectedDirection||v,y=void 0;return e.$$set=function(b){"id"in b&&n(9,s=b.id),"json"in b&&n(10,u=b.json),"rootPath"in b&&n(0,c=b.rootPath),"onSort"in b&&n(11,l=b.onSort)},e.$$.update=function(){16&e.$$.dirty&&n(13,i=r&&d!==void 0?kg(d):void 0),8192&e.$$.dirty&&n(3,o=i?i.map(hl):void 0),10&e.$$.dirty&&m===void 0&&o&&o.length===1&&n(1,m=o[0]),4102&e.$$.dirty&&(n(12,es[h]={selectedProperty:m,selectedDirection:g},es),a("store state in memory",h,es[h]))},n(4,r=Array.isArray(d)),[c,m,g,o,r,y,f,p,function(){try{var b,w;n(5,y=void 0);var j=(b=m)===null||b===void 0?void 0:b.value,x=(w=g)===null||w===void 0?void 0:w.value,R=fE(u,c,j,x);l({operations:R,rootPath:c,itemPath:j,direction:x}),f()}catch(M){n(5,y=M.toString())}},s,u,l,es,i,function(b){n(1,m=b),n(3,o),n(13,i),n(4,r)},function(b){n(2,g=b)}]}var zG=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,BG,DG,Be,{id:9,json:10,rootPath:0,onSort:11},IG),i}return tt(n)}();function Zo(){}function Xh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<.9*t)return e.toFixed()+" B";var n=e/t;if(n<.9*t)return n.toFixed(1)+" KB";var r=n/t;if(r<.9*t)return r.toFixed(1)+" MB";var i=r/t;return i<.9*t?i.toFixed(1)+" GB":(i/t).toFixed(1)+" TB"}function FG(e){var t,n;return t=new Gh({props:{items:e[0]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&ke(i,1)[0]&&(o.items=r[0]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function VG(e,t,n){var r,i,o=t.readOnly,a=o!==void 0&&o,s=t.onFormat,u=t.onCompact,c=t.onSort,l=t.onTransform,f=t.onToggleSearch,h=t.onUndo,d=t.onRedo,v=t.canUndo,p=t.canRedo,m=t.canFormat,g=t.canCompact,y=t.canSort,b=t.canTransform,w=t.onRenderMenu,j={type:"button",icon:Gg,title:"Search (Ctrl+F)",className:"jse-search",onClick:f};return e.$$set=function(x){"readOnly"in x&&n(1,a=x.readOnly),"onFormat"in x&&n(2,s=x.onFormat),"onCompact"in x&&n(3,u=x.onCompact),"onSort"in x&&n(4,c=x.onSort),"onTransform"in x&&n(5,l=x.onTransform),"onToggleSearch"in x&&n(6,f=x.onToggleSearch),"onUndo"in x&&n(7,h=x.onUndo),"onRedo"in x&&n(8,d=x.onRedo),"canUndo"in x&&n(9,v=x.canUndo),"canRedo"in x&&n(10,p=x.canRedo),"canFormat"in x&&n(11,m=x.canFormat),"canCompact"in x&&n(12,g=x.canCompact),"canSort"in x&&n(13,y=x.canSort),"canTransform"in x&&n(14,b=x.canTransform),"onRenderMenu"in x&&n(15,w=x.onRenderMenu)},e.$$.update=function(){32702&e.$$.dirty&&n(16,i=a?[j,{type:"space"}]:[{type:"button",icon:d0,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:s,disabled:a||!m},{type:"button",icon:jK,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:u,disabled:a||!g},{type:"separator"},{type:"button",icon:Lh,title:"Sort",className:"jse-sort",onClick:c,disabled:a||!y},{type:"button",icon:Nh,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:l,disabled:a||!b},j,{type:"separator"},{type:"button",icon:Kg,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!v},{type:"button",icon:Jg,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:d,disabled:!p},{type:"space"}]),98304&e.$$.dirty&&n(0,r=w(i)||i)},[r,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,i]}var WG=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,VG,FG,Be,{readOnly:1,onFormat:2,onCompact:3,onSort:4,onTransform:5,onToggleSearch:6,onUndo:7,onRedo:8,canUndo:9,canRedo:10,canFormat:11,canCompact:12,canSort:13,canTransform:14,onRenderMenu:15}),i}return tt(n)}(),Tn=function(){function e(){X(this,e)}return tt(e,[{key:"lineAt",value:function(t){if(t<0||t>this.length)throw new RangeError("Invalid position ".concat(t," in document of length ").concat(this.length));return this.lineInner(t,!1,1,0)}},{key:"line",value:function(t){if(t<1||t>this.lines)throw new RangeError("Invalid line number ".concat(t," in ").concat(this.lines,"-line document"));return this.lineInner(t,!0,1,0)}},{key:"replace",value:function(t,n,r){var i=[];return this.decompose(0,t,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),td.from(i,this.length-(n-t)+r.length)}},{key:"append",value:function(t){return this.replace(this.length,this.length,t)}},{key:"slice",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.length,r=[];return this.decompose(t,n,r,0),td.from(r,n-t)}},{key:"eq",value:function(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;for(var n=this.scanIdentical(t,1),r=this.length-this.scanIdentical(t,-1),i=new El(this),o=new El(t),a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}},{key:"iter",value:function(){return new El(this,arguments.length>0&&arguments[0]!==void 0?arguments[0]:1)}},{key:"iterRange",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.length;return new qE(this,t,n)}},{key:"iterLines",value:function(t,n){var r;if(t==null)r=this.iter();else{n==null&&(n=this.lines+1);var i=this.line(t).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new HE(r)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var t=[];return this.flatten(t),t}}],[{key:"of",value:function(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length!=1||t[0]?t.length<=32?new mo(t):td.from(mo.split(t,[])):e.empty}}]),e}(),mo=function(e){Ot(n,Tn);var t=Mt(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(a){var s,u=-1,c=at(a);try{for(c.s();!(s=c.n()).done;)u+=s.value.length+1}catch(l){c.e(l)}finally{c.f()}return u}(r);return X(this,n),(i=t.call(this)).text=r,i.length=o,i}return tt(n,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(r,i,o,a){for(var s=0;;s++){var u=this.text[s],c=a+u.length;if((i?o:c)>=r)return new qG(a,c,o,u);a=c+1,o++}}},{key:"decompose",value:function(r,i,o,a){var s=r<=0&&i>=this.length?this:new n(WE(this.text,r,i),Math.min(i,this.length)-Math.max(0,r));if(1&a){var u=o.pop(),c=ed(s.text,u.text.slice(),0,s.length);if(c.length<=32)o.push(new n(c,u.length+s.length));else{var l=c.length>>1;o.push(new n(c.slice(0,l)),new n(c.slice(l)))}}else o.push(s)}},{key:"replace",value:function(r,i,o){if(!(o instanceof n))return fn(Ke(n.prototype),"replace",this).call(this,r,i,o);var a=ed(this.text,ed(o.text,WE(this.text,0,r)),i),s=this.length+o.length-(i-r);return a.length<=32?new n(a,s):td.from(n.split(a,[]),s)}},{key:"sliceString",value:function(r){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.length,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`
|
|
`,a="",s=0,u=0;s<=i&&u<this.text.length;u++){var c=this.text[u],l=s+c.length;s>r&&u&&(a+=o),r<l&&i>s&&(a+=c.slice(Math.max(0,r-s),i-s)),s=l+1}return a}},{key:"flatten",value:function(r){var i,o=at(this.text);try{for(o.s();!(i=o.n()).done;){var a=i.value;r.push(a)}}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(r,i){var o,a=[],s=-1,u=at(r);try{for(u.s();!(o=u.n()).done;){var c=o.value;a.push(c),s+=c.length+1,a.length==32&&(i.push(new n(a,s)),a=[],s=-1)}}catch(l){u.e(l)}finally{u.f()}return s>-1&&i.push(new n(a,s)),i}}]),n}(),td=function(e){Ot(n,Tn);var t=Mt(n);function n(r,i){var o;X(this,n),(o=t.call(this)).children=r,o.length=i,o.lines=0;var a,s=at(r);try{for(s.s();!(a=s.n()).done;){var u=a.value;o.lines+=u.lines}}catch(c){s.e(c)}finally{s.f()}return o}return tt(n,[{key:"lineInner",value:function(r,i,o,a){for(var s=0;;s++){var u=this.children[s],c=a+u.length,l=o+u.lines-1;if((i?l:c)>=r)return u.lineInner(r,i,o,a);a=c+1,o=l+1}}},{key:"decompose",value:function(r,i,o,a){for(var s=0,u=0;u<=i&&s<this.children.length;s++){var c=this.children[s],l=u+c.length;if(r<=l&&i>=u){var f=a&((u<=r?1:0)|(l>=i?2:0));u>=r&&l<=i&&!f?o.push(c):c.decompose(r-u,i-u,o,f)}u=l+1}}},{key:"replace",value:function(r,i,o){if(o.lines<this.lines)for(var a=0,s=0;a<this.children.length;a++){var u=this.children[a],c=s+u.length;if(r>=s&&i<=c){var l=u.replace(r-s,i-s,o),f=this.lines-u.lines+l.lines;if(l.lines<f>>4&&l.lines>f>>6){var h=this.children.slice();return h[a]=l,new n(h,this.length-(i-r)+o.length)}return fn(Ke(n.prototype),"replace",this).call(this,s,c,l)}s=c+1}return fn(Ke(n.prototype),"replace",this).call(this,r,i,o)}},{key:"sliceString",value:function(r){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.length,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`
|
|
`,a="",s=0,u=0;s<this.children.length&&u<=i;s++){var c=this.children[s],l=u+c.length;u>r&&s&&(a+=o),r<l&&i>u&&(a+=c.sliceString(r-u,i-u,o)),u=l+1}return a}},{key:"flatten",value:function(r){var i,o=at(this.children);try{for(o.s();!(i=o.n()).done;)i.value.flatten(r)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(r,i){if(!(r instanceof n))return 0;for(var o=0,a=ke(i>0?[0,0,this.children.length,r.children.length]:[this.children.length-1,r.children.length-1,-1,-1],4),s=a[0],u=a[1],c=a[2],l=a[3];;s+=i,u+=i){if(s==c||u==l)return o;var f=this.children[s],h=r.children[u];if(f!=h)return o+f.scanIdentical(h,i);o+=f.length+1}}}],[{key:"from",value:function(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.reduce(function(x,R){return x+R.length+1},-1),a=0,s=at(r);try{for(s.s();!(i=s.n()).done;)a+=i.value.lines}catch(x){s.e(x)}finally{s.f()}if(a<32){var u,c=[],l=at(r);try{for(l.s();!(u=l.n()).done;)u.value.flatten(c)}catch(x){l.e(x)}finally{l.f()}return new mo(c,o)}var f=Math.max(32,a>>5),h=f<<1,d=f>>1,v=[],p=0,m=-1,g=[];function y(x){var R;if(x.lines>h&&x instanceof n){var M,E=at(x.children);try{for(E.s();!(M=E.n()).done;)y(M.value)}catch(N){E.e(N)}finally{E.f()}}else x.lines>d&&(p>d||!p)?(b(),v.push(x)):x instanceof mo&&p&&(R=g[g.length-1])instanceof mo&&x.lines+R.lines<=32?(p+=x.lines,m+=x.length+1,g[g.length-1]=new mo(R.text.concat(x.text),R.length+1+x.length)):(p+x.lines>f&&b(),p+=x.lines,m+=x.length+1,g.push(x))}function b(){p!=0&&(v.push(g.length==1?g[0]:n.from(g,m)),m=-1,p=g.length=0)}var w,j=at(r);try{for(j.s();!(w=j.n()).done;)y(w.value)}catch(x){j.e(x)}finally{j.f()}return b(),v.length==1?v[0]:new n(v,o)}}]),n}();function ed(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1e9,i=0,o=0,a=!0;o<e.length&&i<=r;o++){var s=e[o],u=i+s.length;u>=n&&(u>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(t[t.length-1]+=s,a=!1):t.push(s)),i=u+1}return t}function WE(e,t,n){return ed(e,[""],t,n)}Tn.empty=new mo([""],0);var El=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;X(this,e),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof mo?t.text.length:t.children.length)<<1]}return tt(e,[{key:"nextInner",value:function(t,n){for(this.done=this.lineBreak=!1;;){var r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof mo?i.text.length:i.children.length;if(a==(n>0?s: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((1&o)==(n>0?0:1)){if(this.offsets[r]+=n,t==0)return this.lineBreak=!0,this.value=`
|
|
`,this;t--}else if(i instanceof mo){var u=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,u.length>Math.max(0,t))return this.value=t==0?u:n>0?u.slice(t):u.slice(0,u.length-t),this;t-=u.length}else{var c=i.children[a+(n<0?-1:0)];t>c.length?(t-=c.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof mo?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}]),e}(),qE=function(){function e(t,n,r){X(this,e),this.value="",this.done=!1,this.cursor=new El(t,n>r?-1:1),this.pos=n>r?t.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}return tt(e,[{key:"nextInner",value:function(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);var r=n<0?this.pos-this.from:this.to-this.pos;t>r&&(t=r),r-=t;var i=this.cursor.next(t).value;return this.pos+=(i.length+t)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}},{key:"next",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&this.value!=""}}]),e}(),HE=function(){function e(t){X(this,e),this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}return tt(e,[{key:"next",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=this.inner.next(t),r=n.done,i=n.lineBreak,o=n.value;return r?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),e}();typeof Symbol!="undefined"&&(Tn.prototype[Symbol.iterator]=function(){return this.iter()},El.prototype[Symbol.iterator]=qE.prototype[Symbol.iterator]=HE.prototype[Symbol.iterator]=function(){return this});for(var qG=function(){function e(t,n,r,i){X(this,e),this.from=t,this.to=n,this.number=r,this.text=i}return tt(e,[{key:"length",get:function(){return this.to-this.from}}]),e}(),ac="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(function(e){return e?parseInt(e,36):1}),nd=1;nd<ac.length;nd++)ac[nd]+=ac[nd-1];function HG(e){for(var t=1;t<ac.length;t+=2)if(ac[t]>e)return ac[t-1]<=e;return!1}function UE(e){return e>=127462&&e<=127487}var JE=8205;function si(e,t){return(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?KE:UG)(e,t,!(arguments.length>3&&arguments[3]!==void 0)||arguments[3])}function KE(e,t,n){if(t==e.length)return t;t&&GE(e.charCodeAt(t))&&QE(e.charCodeAt(t-1))&&t--;var r=Vr(e,t);for(t+=_i(r);t<e.length;){var i=Vr(e,t);if(r==JE||i==JE||n&&HG(i))t+=_i(i),r=i;else{if(!UE(i))break;for(var o=0,a=t-2;a>=0&&UE(Vr(e,a));)o++,a-=2;if(o%2==0)break;t+=2}}return t}function UG(e,t,n){for(;t>0;){var r=KE(e,t-2,n);if(r<t)return r;t--}return 0}function GE(e){return e>=56320&&e<57344}function QE(e){return e>=55296&&e<56320}function Vr(e,t){var n=e.charCodeAt(t);if(!QE(n)||t+1==e.length)return n;var r=e.charCodeAt(t+1);return GE(r)?r-56320+(n-55296<<10)+65536:n}function k0(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function _i(e){return e<65536?1:2}var j0=/\r\n?|\n/,ui=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(ui||(ui={})),sc=function(){function e(t){X(this,e),this.sections=t}return tt(e,[{key:"length",get:function(){for(var t=0,n=0;n<this.sections.length;n+=2)t+=this.sections[n];return t}},{key:"newLength",get:function(){for(var t=0,n=0;n<this.sections.length;n+=2){var r=this.sections[n+1];t+=r<0?this.sections[n]:r}return t}},{key:"empty",get:function(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}},{key:"iterGaps",value:function(t){for(var n=0,r=0,i=0;n<this.sections.length;){var o=this.sections[n++],a=this.sections[n++];a<0?(t(r,i,o),i+=o):i+=a,r+=o}}},{key:"iterChangedRanges",value:function(t){S0(this,t,arguments.length>1&&arguments[1]!==void 0&&arguments[1])}},{key:"invertedDesc",get:function(){for(var t=[],n=0;n<this.sections.length;){var r=this.sections[n++],i=this.sections[n++];i<0?t.push(r,i):t.push(i,r)}return new e(t)}},{key:"composeDesc",value:function(t){return this.empty?t:t.empty?this:YE(this,t)}},{key:"mapDesc",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return t.empty?this:C0(this,t,n)}},{key:"mapPos",value:function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ui.Simple,i=0,o=0,a=0;a<this.sections.length;){var s=this.sections[a++],u=this.sections[a++],c=i+s;if(u<0){if(c>t)return o+(t-i);o+=s}else{if(r!=ui.Simple&&c>=t&&(r==ui.TrackDel&&i<t&&c>t||r==ui.TrackBefore&&i<t||r==ui.TrackAfter&&c>t))return null;if(c>t||c==t&&n<0&&!s)return t==i||n<0?o:o+u;o+=u}i=c}if(t>i)throw new RangeError("Position ".concat(t," is out of range for changeset of length ").concat(i));return o}},{key:"touchesRange",value:function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=0,i=0;r<this.sections.length&&i<=n;){var o=i+this.sections[r++];if(this.sections[r++]>=0&&i<=n&&o>=t)return!(i<t&&o>n)||"cover";i=o}return!1}},{key:"toString",value:function(){for(var t="",n=0;n<this.sections.length;){var r=this.sections[n++],i=this.sections[n++];t+=(t?" ":"")+r+(i>=0?":"+i:"")}return t}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(t){if(!Array.isArray(t)||t.length%2||t.some(function(n){return typeof n!="number"}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new e(t)}},{key:"create",value:function(t){return new e(t)}}]),e}(),go=function(e){Ot(n,sc);var t=Mt(n);function n(r,i){var o;return X(this,n),(o=t.call(this,r)).inserted=i,o}return tt(n,[{key:"apply",value:function(r){if(this.length!=r.length)throw new RangeError("Applying change set to a document with the wrong length");return S0(this,function(i,o,a,s,u){return r=r.replace(a,a+(o-i),u)},!1),r}},{key:"mapDesc",value:function(r){return C0(this,r,arguments.length>1&&arguments[1]!==void 0&&arguments[1],!0)}},{key:"invert",value:function(r){for(var i=this.sections.slice(),o=[],a=0,s=0;a<i.length;a+=2){var u=i[a],c=i[a+1];if(c>=0){i[a]=c,i[a+1]=u;for(var l=a>>1;o.length<l;)o.push(Tn.empty);o.push(u?r.slice(s,s+u):Tn.empty)}s+=u}return new n(i,o)}},{key:"compose",value:function(r){return this.empty?r:r.empty?this:YE(this,r,!0)}},{key:"map",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return r.empty?this:C0(this,r,i,!0)}},{key:"iterChanges",value:function(r){S0(this,r,arguments.length>1&&arguments[1]!==void 0&&arguments[1])}},{key:"desc",get:function(){return sc.create(this.sections)}},{key:"filter",value:function(r){var i=[],o=[],a=[],s=new Al(this);t:for(var u=0,c=0;;){for(var l=u==r.length?1e9:r[u++];c<l||c==l&&s.len==0;){if(s.done)break t;var f=Math.min(s.len,l-c);Xr(a,f,-1);var h=s.ins==-1?-1:s.off==0?s.ins:0;Xr(i,f,h),h>0&&ns(o,i,s.text),s.forward(f),c+=f}for(var d=r[u++];c<d;){if(s.done)break t;var v=Math.min(s.len,d-c);Xr(i,v,-1),Xr(a,v,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(v),c+=v}}return{changes:new n(i,o),filtered:sc.create(a)}}},{key:"toJSON",value:function(){for(var r=[],i=0;i<this.sections.length;i+=2){var o=this.sections[i],a=this.sections[i+1];a<0?r.push(o):a==0?r.push([o]):r.push([o].concat(this.inserted[i>>1].toJSON()))}return r}}],[{key:"of",value:function(r,i,o){var a=[],s=[],u=0,c=null;function l(){if(arguments.length>0&&arguments[0]!==void 0&&arguments[0]||a.length){u<i&&Xr(a,i-u,-1);var f=new n(a,s);c=c?c.compose(f.map(c)):f,a=[],s=[],u=0}}return function f(h){if(Array.isArray(h)){var d,v=at(h);try{for(v.s();!(d=v.n()).done;)f(d.value)}catch(j){v.e(j)}finally{v.f()}}else if(h instanceof n){if(h.length!=i)throw new RangeError("Mismatched change set length (got ".concat(h.length,", expected ").concat(i,")"));l(),c=c?c.compose(h.map(c)):h}else{var p=h.from,m=h.to,g=m===void 0?p:m,y=h.insert;if(p>g||p<0||g>i)throw new RangeError("Invalid change range ".concat(p," to ").concat(g," (in doc of length ").concat(i,")"));var b=y?typeof y=="string"?Tn.of(y.split(o||j0)):y:Tn.empty,w=b.length;if(p==g&&w==0)return;p<u&&l(),p>u&&Xr(a,p-u,-1),Xr(a,g-p,w),ns(s,a,b),u=g}}(r),l(!c),c}},{key:"empty",value:function(r){return new n(r?[r,-1]:[],[])}},{key:"fromJSON",value:function(r){if(!Array.isArray(r))throw new RangeError("Invalid JSON representation of ChangeSet");for(var i=[],o=[],a=0;a<r.length;a++){var s=r[a];if(typeof s=="number")i.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some(function(u,c){return c&&typeof u!="string"}))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)i.push(s[0],0);else{for(;o.length<a;)o.push(Tn.empty);o[a]=Tn.of(s.slice(1)),i.push(s[0],o[a].length)}}}return new n(i,o)}},{key:"createSet",value:function(r,i){return new n(r,i)}}]),n}();function Xr(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!(t==0&&n<=0)){var i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}}function ns(e,t,n){if(n.length!=0){var r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Tn.empty);e.push(n)}}}function S0(e,t,n){for(var r=e.inserted,i=0,o=0,a=0;a<e.sections.length;){var s=e.sections[a++],u=e.sections[a++];if(u<0)i+=s,o+=s;else{for(var c=i,l=o,f=Tn.empty;c+=s,l+=u,u&&r&&(f=f.append(r[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],u=e.sections[a++];t(i,c,o,l,f),i=c,o=l}}}function C0(e,t,n){for(var r=[],i=arguments.length>3&&arguments[3]!==void 0&&arguments[3]?[]:null,o=new Al(e),a=new Al(t),s=-1;;)if(o.ins==-1&&a.ins==-1){var u=Math.min(o.len,a.len);Xr(r,u,-1),o.forward(u),a.forward(u)}else if(a.ins>=0&&(o.ins<0||s==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!n))){var c=a.len;for(Xr(r,a.ins,-1);c;){var l=Math.min(o.len,c);o.ins>=0&&s<o.i&&o.len<=l&&(Xr(r,0,o.ins),i&&ns(i,r,o.text),s=o.i),o.forward(l),c-=l}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return i?go.createSet(r,i):sc.create(r);throw new Error("Mismatched change set lengths")}for(var f=0,h=o.len;h;)if(a.ins==-1){var d=Math.min(h,a.len);f+=d,h-=d,a.forward(d)}else{if(!(a.ins==0&&a.len<h))break;h-=a.len,a.next()}Xr(r,f,s<o.i?o.ins:0),i&&s<o.i&&ns(i,r,o.text),s=o.i,o.forward(o.len-h)}}function YE(e,t){for(var n=[],r=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?[]:null,i=new Al(e),o=new Al(t),a=!1;;){if(i.done&&o.done)return r?go.createSet(n,r):sc.create(n);if(i.ins==0)Xr(n,i.len,0,a),i.next();else if(o.len!=0||o.done){if(i.done||o.done)throw new Error("Mismatched change set lengths");var s=Math.min(i.len2,o.len),u=n.length;if(i.ins==-1){var c=o.ins==-1?-1:o.off?0:o.ins;Xr(n,s,c,a),r&&c&&ns(r,n,o.text)}else o.ins==-1?(Xr(n,i.off?0:i.len,s,a),r&&ns(r,n,i.textBit(s))):(Xr(n,i.off?0:i.len,o.off?0:o.ins,a),r&&!o.off&&ns(r,n,o.text));a=(i.ins>s||o.ins>=0&&o.len>s)&&(a||n.length>u),i.forward2(s),o.forward(s)}else Xr(n,0,o.ins,a),r&&ns(r,n,o.text),o.next()}}var Al=function(){function e(t){X(this,e),this.set=t,this.i=0,this.next()}return tt(e,[{key:"next",value:function(){var t=this.set.sections;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}},{key:"done",get:function(){return this.ins==-2}},{key:"len2",get:function(){return this.ins<0?this.len:this.ins}},{key:"text",get:function(){var t=this.set.inserted,n=this.i-2>>1;return n>=t.length?Tn.empty:t[n]}},{key:"textBit",value:function(t){var n=this.set.inserted,r=this.i-2>>1;return r>=n.length&&!t?Tn.empty:n[r].slice(this.off,t==null?void 0:this.off+t)}},{key:"forward",value:function(t){t==this.len?this.next():(this.len-=t,this.off+=t)}},{key:"forward2",value:function(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}]),e}(),rd=function(){function e(t,n,r){X(this,e),this.from=t,this.to=n,this.flags=r}return tt(e,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var t=3&this.flags;return t==3?null:t}},{key:"goalColumn",get:function(){var t=this.flags>>5;return t==33554431?void 0:t}},{key:"map",value:function(t){var n,r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1;return this.empty?n=r=t.mapPos(this.from,i):(n=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new e(n,r,this.flags)}},{key:"extend",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;if(t<=this.anchor&&n>=this.anchor)return Ht.range(t,n);var r=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ht.range(this.anchor,r)}},{key:"eq",value:function(t){return this.anchor==t.anchor&&this.head==t.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ht.range(t.anchor,t.head)}},{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),Ht=function(){function e(t,n){X(this,e),this.ranges=t,this.mainIndex=n}return tt(e,[{key:"map",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1;return t.empty?this:e.create(this.ranges.map(function(r){return r.map(t,n)}),this.mainIndex)}},{key:"eq",value:function(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(var n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n]))return!1;return!0}},{key:"main",get:function(){return this.ranges[this.mainIndex]}},{key:"asSingle",value:function(){return this.ranges.length==1?this:new e([this.main],0)}},{key:"addRange",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.mainIndex,r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(t){return t.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new e(t.ranges.map(function(n){return rd.fromJSON(n)}),t.main)}},{key:"single",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return new e([e.range(t,n)],0)}},{key:"create",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(t.length==0)throw new RangeError("A selection needs at least one range");for(var r=0,i=0;i<t.length;i++){var o=t[i];if(o.empty?o.from<=r:o.from<r)return e.normalized(t.slice(),n);r=o.to}return new e(t,n)}},{key:"cursor",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return rd.create(t,t,(n==0?0:n<0?4:8)|(r==null?3:Math.min(2,r))|(i!=null?i:33554431)<<5)}},{key:"range",value:function(t,n,r,i){var o=(r!=null?r:33554431)<<5|(i==null?3:Math.min(2,i));return n<t?rd.create(n,t,24|o):rd.create(t,n,(n>t?4:0)|o)}},{key:"normalized",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=t[n];t.sort(function(c,l){return c.from-l.from}),n=t.indexOf(r);for(var i=1;i<t.length;i++){var o=t[i],a=t[i-1];if(o.empty?o.from<=a.to:o.from<a.to){var s=a.from,u=Math.max(o.to,a.to);i<=n&&n--,t.splice(--i,2,o.anchor>o.head?e.range(u,s):e.range(s,u))}}return new e(t,n)}}]),e}();function ZE(e,t){var n,r=at(e.ranges);try{for(r.s();!(n=r.n()).done;)if(n.value.to>t)throw new RangeError("Selection points outside of document")}catch(i){r.e(i)}finally{r.f()}}var $0=0,Se=function(){function e(t,n,r,i,o){X(this,e),this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=$0++,this.default=t([]),this.extensions=typeof o=="function"?o(this):o}return tt(e,[{key:"of",value:function(t){return new id([],this,0,t)}},{key:"compute",value:function(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new id(t,this,1,n)}},{key:"computeN",value:function(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new id(t,this,2,n)}},{key:"from",value:function(t,n){return n||(n=function(r){return r}),this.compute([t],function(r){return n(r.field(t))})}}],[{key:"define",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new e(t.combine||function(n){return n},t.compareInput||function(n,r){return n===r},t.compare||(t.combine?function(n,r){return n===r}:_0),!!t.static,t.enables)}}]),e}();function _0(e,t){return e==t||e.length==t.length&&e.every(function(n,r){return n===t[r]})}var id=function(){function e(t,n,r,i){X(this,e),this.dependencies=t,this.facet=n,this.type=r,this.value=i,this.id=$0++}return tt(e,[{key:"dynamicSlot",value:function(t){var n,r,i=this,o=this.value,a=this.facet.compareInput,s=this.id,u=t[s]>>1,c=this.type==2,l=!1,f=!1,h=[],d=at(this.dependencies);try{for(d.s();!(r=d.n()).done;){var v=r.value;v=="doc"?l=!0:v=="selection"?f=!0:!(1&((n=t[v.id])!==null&&n!==void 0?n:1))&&h.push(t[v.id])}}catch(p){d.e(p)}finally{d.f()}return{create:function(p){return p.values[u]=o(p),1},update:function(p,m){if(l&&m.docChanged||f&&(m.docChanged||m.selection)||O0(p,h)){var g=o(p);if(c?!XE(g,p.values[u],a):!a(g,p.values[u]))return p.values[u]=g,1}return 0},reconfigure:function(p,m){var g,y=m.config.address[s];if(y!=null){var b=od(m,y);if(i.dependencies.every(function(w){return w instanceof Se?m.facet(w)===p.facet(w):!(w instanceof Wr)||m.field(w,!1)==p.field(w,!1)})||(c?XE(g=o(p),b,a):a(g=o(p),b)))return p.values[u]=b,0}else g=o(p);return p.values[u]=g,1}}}}]),e}();function XE(e,t,n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function O0(e,t){var n,r=!1,i=at(t);try{for(i.s();!(n=i.n()).done;)1&Tl(e,n.value)&&(r=!0)}catch(o){i.e(o)}finally{i.f()}return r}var tA=Se.define({static:!0}),Wr=function(){function e(t,n,r,i,o){X(this,e),this.id=t,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}return tt(e,[{key:"create",value:function(t){var n=this,r=t.facet(tA).find(function(i){return i.field==n});return((r==null?void 0:r.create)||this.createF)(t)}},{key:"slot",value:function(t){var n=this,r=t[this.id]>>1;return{create:function(i){return i.values[r]=n.create(i),1},update:function(i,o){var a=i.values[r],s=n.updateF(a,o);return n.compareF(a,s)?0:(i.values[r]=s,1)},reconfigure:function(i,o){return o.config.address[n.id]!=null?(i.values[r]=o.field(n),0):(i.values[r]=n.create(i),1)}}}},{key:"init",value:function(t){return[this,tA.of({field:this,create:t})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(t){var n=new e($0++,t.create,t.update,t.compare||function(r,i){return r===i},t);return t.provide&&(n.provides=t.provide(n)),n}}]),e}(),JG=4,KG=3,M0=2,GG=1;function Pl(e){return function(t){return new eA(t,e)}}var uc={highest:Pl(0),high:Pl(GG),default:Pl(M0),low:Pl(KG),lowest:Pl(JG)},eA=tt(function e(t,n){X(this,e),this.inner=t,this.prec=n}),Us=function(){function e(){X(this,e)}return tt(e,[{key:"of",value:function(t){return new E0(this,t)}},{key:"reconfigure",value:function(t){return e.reconfigure.of({compartment:this,extension:t})}},{key:"get",value:function(t){return t.config.compartments.get(this)}}]),e}(),E0=tt(function e(t,n){X(this,e),this.compartment=t,this.inner=n}),nA=function(){function e(t,n,r,i,o,a){for(X(this,e),this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}return tt(e,[{key:"staticFacet",value:function(t){var n=this.address[t.id];return n==null?t.default:this.staticValues[n>>1]}}],[{key:"resolve",value:function(t,n,r){var i,o=[],a=Object.create(null),s=new Map,u=at(function(w,j,x){var R=[[],[],[],[],[]],M=new Map;function E(N,A){var L=M.get(N);if(L!=null){if(L<=A)return;var W=R[L].indexOf(N);W>-1&&R[L].splice(W,1),N instanceof E0&&x.delete(N.compartment)}if(M.set(N,A),Array.isArray(N)){var O,I=at(N);try{for(I.s();!(O=I.n()).done;)E(O.value,A)}catch(_){I.e(_)}finally{I.f()}}else if(N instanceof E0){if(x.has(N.compartment))throw new RangeError("Duplicate use of compartment in extensions");var q=j.get(N.compartment)||N.inner;x.set(N.compartment,q),E(q,A)}else if(N instanceof eA)E(N.inner,N.prec);else if(N instanceof Wr)R[A].push(N),N.provides&&E(N.provides,A);else if(N instanceof id)R[A].push(N),N.facet.extensions&&E(N.facet.extensions,M0);else{var P=N.extension;if(!P)throw new Error("Unrecognized extension value in extension set (".concat(N,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));E(P,A)}}return E(w,M0),R.reduce(function(N,A){return N.concat(A)})}(t,n,s));try{for(u.s();!(i=u.n()).done;){var c=i.value;c instanceof Wr?o.push(c):(a[c.facet.id]||(a[c.facet.id]=[])).push(c)}}catch(w){u.e(w)}finally{u.f()}for(var l=Object.create(null),f=[],h=[],d=function(){var w=p[v];l[w.id]=h.length<<1,h.push(function(j){return w.slot(j)})},v=0,p=o;v<p.length;v++)d();var m=r==null?void 0:r.config.facets,g=function(){var w=a[y],j=w[0].facet,x=m&&m[y]||[];if(w.every(function(A){return A.type==0}))if(l[j.id]=f.length<<1|1,_0(x,w))f.push(r.facet(j));else{var R=j.combine(w.map(function(A){return A.value}));f.push(r&&j.compare(R,r.facet(j))?r.facet(j):R)}else{var M,E=at(w);try{var N=function(){var A=M.value;A.type==0?(l[A.id]=f.length<<1|1,f.push(A.value)):(l[A.id]=h.length<<1,h.push(function(L){return A.dynamicSlot(L)}))};for(E.s();!(M=E.n()).done;)N()}catch(A){E.e(A)}finally{E.f()}l[j.id]=h.length<<1,h.push(function(A){return function(L,W,O){var I=O.map(function($){return L[$.id]}),q=O.map(function($){return $.type}),P=I.filter(function($){return!(1&$)}),_=L[W.id]>>1;function S($){for(var D=[],B=0;B<I.length;B++){var k=od($,I[B]);if(q[B]==2){var H,U=at(k);try{for(U.s();!(H=U.n()).done;){var st=H.value;D.push(st)}}catch(ut){U.e(ut)}finally{U.f()}}else D.push(k)}return W.combine(D)}return{create:function($){var D,B=at(I);try{for(B.s();!(D=B.n()).done;)Tl($,D.value)}catch(k){B.e(k)}finally{B.f()}return $.values[_]=S($),1},update:function($,D){if(!O0($,P))return 0;var B=S($);return W.compare(B,$.values[_])?0:($.values[_]=B,1)},reconfigure:function($,D){var B=O0($,I),k=D.config.facets[W.id],H=D.facet(W);if(k&&!B&&_0(O,k))return $.values[_]=H,0;var U=S($);return W.compare(U,H)?($.values[_]=H,0):($.values[_]=U,1)}}}(A,j,w)})}};for(var y in a)g();var b=h.map(function(w){return w(l)});return new e(t,s,b,l,f,a)}}]),e}();function Tl(e,t){if(1&t)return 2;var n=t>>1,r=e.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;var i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function od(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}var rA=Se.define(),iA=Se.define({combine:function(e){return e.some(function(t){return t})},static:!0}),oA=Se.define({combine:function(e){return e.length?e[0]:void 0},static:!0}),aA=Se.define(),sA=Se.define(),uA=Se.define(),cA=Se.define({combine:function(e){return!!e.length&&e[0]}}),rs=function(){function e(t,n){X(this,e),this.type=t,this.value=n}return tt(e,null,[{key:"define",value:function(){return new QG}}]),e}(),QG=function(){function e(){X(this,e)}return tt(e,[{key:"of",value:function(t){return new rs(this,t)}}]),e}(),YG=function(){function e(t){X(this,e),this.map=t}return tt(e,[{key:"of",value:function(t){return new cn(this,t)}}]),e}(),cn=function(){function e(t,n){X(this,e),this.type=t,this.value=n}return tt(e,[{key:"map",value:function(t){var n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}},{key:"is",value:function(t){return this.type==t}}],[{key:"define",value:function(){return new YG((arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).map||function(t){return t})}},{key:"mapEffects",value:function(t,n){if(!t.length)return t;var r,i=[],o=at(t);try{for(o.s();!(r=o.n()).done;){var a=r.value.map(n);a&&i.push(a)}}catch(s){o.e(s)}finally{o.f()}return i}}]),e}();cn.reconfigure=cn.define(),cn.appendConfig=cn.define();var mi=function(){function e(t,n,r,i,o,a){X(this,e),this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&ZE(r,n.newLength),o.some(function(s){return s.type==e.time})||(this.annotations=o.concat(e.time.of(Date.now())))}return tt(e,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(t){var n,r=at(this.annotations);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.type==t)return i.value}}catch(o){r.e(o)}finally{r.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(t){var n=this.annotation(e.userEvent);return!(!n||!(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}}],[{key:"create",value:function(t,n,r,i,o,a){return new e(t,n,r,i,o,a)}}]),e}();function ZG(e,t){for(var n=[],r=0,i=0;;){var o=void 0,a=void 0;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],a=e[r++];else{if(!(i<t.length))return n;o=t[i++],a=t[i++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function lA(e,t,n){var r,i,o,a;return n?(i=t.changes,o=go.empty(t.changes.length),a=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(i)),{changes:a,selection:t.selection?t.selection.map(o):(r=e.selection)===null||r===void 0?void 0:r.map(i),effects:cn.mapEffects(e.effects,i).concat(cn.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function A0(e,t,n){var r=t.selection,i=cc(t.annotations);return t.userEvent&&(i=i.concat(mi.userEvent.of(t.userEvent))),{changes:t.changes instanceof go?t.changes:go.of(t.changes||[],n,e.facet(oA)),selection:r&&(r instanceof Ht?r:Ht.single(r.anchor,r.head)),effects:cc(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function fA(e,t,n){var r=A0(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(var i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);var o=!!t[i].sequential;r=lA(r,A0(e,t[i],o?r.changes.newLength:e.doc.length),o)}var a=mi.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(s){for(var u=s.startState,c=u.facet(uA),l=s,f=c.length-1;f>=0;f--){var h=c[f](s);h&&Object.keys(h).length&&(l=lA(l,A0(u,h,s.changes.newLength),!0))}return l==s?s:mi.create(u,s.changes,s.selection,l.effects,l.annotations,l.scrollIntoView)}(n?function(s){var u,c=s.startState,l=!0,f=at(c.facet(aA));try{for(f.s();!(u=f.n()).done;){var h=(0,u.value)(s);if(h===!1){l=!1;break}Array.isArray(h)&&(l=l===!0?h:ZG(l,h))}}catch(b){f.e(b)}finally{f.f()}if(l!==!0){var d,v;if(l===!1)v=s.changes.invertedDesc,d=go.empty(c.doc.length);else{var p=s.changes.filter(l);d=p.changes,v=p.filtered.mapDesc(p.changes).invertedDesc}s=mi.create(c,d,s.selection&&s.selection.map(v),cn.mapEffects(s.effects,v),s.annotations,s.scrollIntoView)}for(var m=c.facet(sA),g=m.length-1;g>=0;g--){var y=m[g](s);s=y instanceof mi?y:Array.isArray(y)&&y.length==1&&y[0]instanceof mi?y[0]:fA(c,cc(y),!1)}return s}(a):a)}mi.time=rs.define(),mi.userEvent=rs.define(),mi.addToHistory=rs.define(),mi.remote=rs.define();var XG=[];function cc(e){return e==null?XG:Array.isArray(e)?e:[e]}var P0,lr=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(lr||(lr={})),tQ=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{P0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function eQ(e){return function(t){if(!/\S/.test(t))return lr.Space;if(function(r){if(P0)return P0.test(r);for(var i=0;i<r.length;i++){var o=r[i];if(/\w/.test(o)||o>"\x80"&&(o.toUpperCase()!=o.toLowerCase()||tQ.test(o)))return!0}return!1}(t))return lr.Word;for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return lr.Word;return lr.Other}}var Hn=function(){function e(t,n,r,i,o,a){X(this,e),this.config=t,this.doc=n,this.selection=r,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(var s=0;s<this.config.dynamicSlots.length;s++)Tl(this,s<<1);this.computeSlot=null}return tt(e,[{key:"field",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.config.address[t.id];if(r!=null)return Tl(this,r),od(this,r);if(n)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fA(this,n,!0)}},{key:"applyTransaction",value:function(t){var n,r,i=this,o=this.config,a=o,s=a.base,u=a.compartments,c=at(t.effects);try{for(c.s();!(n=c.n()).done;){var l=n.value;l.is(Us.reconfigure)?(o&&(u=new Map,o.compartments.forEach(function(f,h){return u.set(h,f)}),o=null),u.set(l.value.compartment,l.value.extension)):l.is(cn.reconfigure)?(o=null,s=l.value):l.is(cn.appendConfig)&&(o=null,s=cc(s).concat(l.value))}}catch(f){c.e(f)}finally{c.f()}o?r=t.startState.values.slice():r=new e(o=nA.resolve(s,u,this),this.doc,this.selection,o.dynamicSlots.map(function(){return null}),function(f,h){return h.reconfigure(f,i)},null).values,new e(o,t.newDoc,t.newSelection,r,function(f,h){return h.update(f,t)},t)}},{key:"replaceSelection",value:function(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(function(n){return{changes:{from:n.from,to:n.to,insert:t},range:Ht.cursor(n.from+t.length)}})}},{key:"changeByRange",value:function(t){for(var n=this.selection,r=t(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=cc(r.effects),s=1;s<n.ranges.length;s++){for(var u=t(n.ranges[s]),c=this.changes(u.changes),l=c.map(i),f=0;f<s;f++)o[f]=o[f].map(l);var h=i.mapDesc(c,!0);o.push(u.range.map(h)),i=i.compose(l),a=cn.mapEffects(a,l).concat(cn.mapEffects(cc(u.effects),h))}return{changes:i,selection:Ht.create(o,n.mainIndex),effects:a}}},{key:"changes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t instanceof go?t:go.of(t,this.doc.length,this.facet(e.lineSeparator))}},{key:"toText",value:function(t){return Tn.of(t.split(this.facet(e.lineSeparator)||j0))}},{key:"sliceDoc",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.doc.length;return this.doc.sliceString(t,n,this.lineBreak)}},{key:"facet",value:function(t){var n=this.config.address[t.id];return n==null?t.default:(Tl(this,n),od(this,n))}},{key:"toJSON",value:function(t){var n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(var r in t){var i=t[r];i instanceof Wr&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(t[r]),this))}return n}},{key:"tabSize",get:function(){return this.facet(e.tabSize)}},{key:"lineBreak",get:function(){return this.facet(e.lineSeparator)||`
|
|
`}},{key:"readOnly",get:function(){return this.facet(cA)}},{key:"phrase",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o,a=at(this.facet(e.phrases));try{for(a.s();!(o=a.n()).done;){var s=o.value;if(Object.prototype.hasOwnProperty.call(s,t)){t=s[t];break}}}catch(u){a.e(u)}finally{a.f()}return r.length&&(t=t.replace(/\$(\$|\d*)/g,function(u,c){if(c=="$")return"$";var l=+(c||1);return!l||l>r.length?u:r[l-1]})),t}},{key:"languageDataAt",value:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,o=[],a=at(this.facet(rA));try{for(a.s();!(r=a.n()).done;){var s,u=at((0,r.value)(this,n,i));try{for(u.s();!(s=u.n()).done;){var c=s.value;Object.prototype.hasOwnProperty.call(c,t)&&o.push(c[t])}}catch(l){u.e(l)}finally{u.f()}}}catch(l){a.e(l)}finally{a.f()}return o}},{key:"charCategorizer",value:function(t){return eQ(this.languageDataAt("wordChars",t).join(""))}},{key:"wordAt",value:function(t){for(var n=this.doc.lineAt(t),r=n.text,i=n.from,o=n.length,a=this.charCategorizer(t),s=t-i,u=t-i;s>0;){var c=si(r,s,!1);if(a(r.slice(c,s))!=lr.Word)break;s=c}for(;u<o;){var l=si(r,u);if(a(r.slice(u,l))!=lr.Word)break;u=l}return s==u?null:Ht.range(s+i,u+i)}}],[{key:"fromJSON",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");var i=[];if(r){var o=function(){if(Object.prototype.hasOwnProperty.call(t,a)){var s=r[a],u=t[a];i.push(s.init(function(c){return s.spec.fromJSON(u,c)}))}};for(var a in r)o()}return e.create({doc:t.doc,selection:Ht.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}},{key:"create",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=nA.resolve(t.extensions||[],new Map),r=t.doc instanceof Tn?t.doc:Tn.of((t.doc||"").split(n.staticFacet(e.lineSeparator)||j0)),i=t.selection?t.selection instanceof Ht?t.selection:Ht.single(t.selection.anchor,t.selection.head):Ht.single(0);return ZE(i,r.length),n.staticFacet(iA)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(function(){return null}),function(o,a){return a.create(o)},null)}}]),e}();function Ui(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i={},o=at(e);try{for(o.s();!(n=o.n()).done;)for(var a=n.value,s=0,u=Object.keys(a);s<u.length;s++){var c=u[s],l=a[c],f=i[c];if(f===void 0)i[c]=l;else if(!(f===l||l===void 0)){if(!Object.hasOwnProperty.call(r,c))throw new Error("Config merge conflict for field "+c);i[c]=r[c](f,l)}}}catch(d){o.e(d)}finally{o.f()}for(var h in t)i[h]===void 0&&(i[h]=t[h]);return i}Hn.allowMultipleSelections=iA,Hn.tabSize=Se.define({combine:function(e){return e.length?e[0]:4}}),Hn.lineSeparator=oA,Hn.readOnly=cA,Hn.phrases=Se.define({compare:function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(function(i){return e[i]==t[i]})}}),Hn.languageData=rA,Hn.changeFilter=aA,Hn.transactionFilter=sA,Hn.transactionExtender=uA,Us.reconfigure=cn.define();var Js=function(){function e(){X(this,e)}return tt(e,[{key:"eq",value:function(t){return this==t}},{key:"range",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return T0.create(t,n,this)}}]),e}();Js.prototype.startSide=Js.prototype.endSide=0,Js.prototype.point=!1,Js.prototype.mapMode=ui.TrackDel;var T0=function(){function e(t,n,r){X(this,e),this.from=t,this.to=n,this.value=r}return tt(e,null,[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}();function R0(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var nQ=function(){function e(t,n,r,i){X(this,e),this.from=t,this.to=n,this.value=r,this.maxPoint=i}return tt(e,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(t,n,r){for(var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=r?this.to:this.from,a=i,s=o.length;;){if(a==s)return a;var u=a+s>>1,c=o[u]-t||(r?this.value[u].endSide:this.value[u].startSide)-n;if(u==a)return c>=0?a:s;c>=0?s=u:a=u+1}}},{key:"between",value:function(t,n,r,i){for(var o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);o<a;o++)if(i(this.from[o]+t,this.to[o]+t,this.value[o])===!1)return!1}},{key:"map",value:function(t,n){for(var r=[],i=[],o=[],a=-1,s=-1,u=0;u<this.value.length;u++){var c=this.value[u],l=this.from[u]+t,f=this.to[u]+t,h=void 0,d=void 0;if(l==f){var v=n.mapPos(l,c.startSide,c.mapMode);if(v==null||(h=d=v,c.startSide!=c.endSide&&(d=n.mapPos(l,c.endSide))<h))continue}else if((h=n.mapPos(l,c.startSide))>(d=n.mapPos(f,c.endSide))||h==d&&c.startSide>0&&c.endSide<=0)continue;(d-h||c.endSide-c.startSide)<0||(a<0&&(a=h),c.point&&(s=Math.max(s,d-h)),r.push(c),i.push(h-a),o.push(d-a))}return{mapped:r.length?new e(i,o,r,s):null,pos:a}}}]),e}(),Qn=function(){function e(t,n,r,i){X(this,e),this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=i}return tt(e,[{key:"length",get:function(){var t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var t,n=this.nextLayer.size,r=at(this.chunk);try{for(r.s();!(t=r.n()).done;)n+=t.value.value.length}catch(i){r.e(i)}finally{r.f()}return n}},{key:"chunkEnd",value:function(t){return this.chunkPos[t]+this.chunk[t].length}},{key:"update",value:function(t){var n=t.add,r=n===void 0?[]:n,i=t.sort,o=i!==void 0&&i,a=t.filterFrom,s=a===void 0?0:a,u=t.filterTo,c=u===void 0?this.length:u,l=t.filter;if(r.length==0&&!l)return this;if(o&&(r=r.slice().sort(R0)),this.isEmpty)return r.length?e.of(r):this;for(var f=new dA(this,null,-1).goto(0),h=0,d=[],v=new Ks;f.value||h<r.length;)if(h<r.length&&(f.from-r[h].from||f.startSide-r[h].value.startSide)>=0){var p=r[h++];v.addInner(p.from,p.to,p.value)||d.push(p)}else f.rangeIndex==1&&f.chunkIndex<this.chunk.length&&(h==r.length||this.chunkEnd(f.chunkIndex)<r[h].from)&&(!l||s>this.chunkEnd(f.chunkIndex)||c<this.chunkPos[f.chunkIndex])&&v.addChunk(this.chunkPos[f.chunkIndex],this.chunk[f.chunkIndex])?f.nextChunk():((!l||s>f.to||c<f.from||l(f.from,f.to,f.value))&&(v.addInner(f.from,f.to,f.value)||d.push(T0.create(f.from,f.to,f.value))),f.next());return v.finishInner(this.nextLayer.isEmpty&&!d.length?e.empty:this.nextLayer.update({add:d,filter:l,filterFrom:s,filterTo:c}))}},{key:"map",value:function(t){if(t.empty||this.isEmpty)return this;for(var n=[],r=[],i=-1,o=0;o<this.chunk.length;o++){var a=this.chunkPos[o],s=this.chunk[o],u=t.touchesRange(a,a+s.length);if(u===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(u===!0){var c=s.map(a,t),l=c.mapped,f=c.pos;l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(f))}}var h=this.nextLayer.map(t);return n.length==0?h:new e(r,n,h||e.empty,i)}},{key:"between",value:function(t,n,r){if(!this.isEmpty){for(var i=0;i<this.chunk.length;i++){var o=this.chunkPos[i],a=this.chunk[i];if(n>=o&&t<=o+a.length&&a.between(o,t-o,n-o,r)===!1)return}this.nextLayer.between(t,n,r)}}},{key:"iter",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return N0.from([this]).goto(t)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(t,n,r,i){return new e(t,n,r,i)}},{key:"iter",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return N0.from(t).goto(n)}},{key:"compare",value:function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,a=t.filter(function(f){return f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o}),s=n.filter(function(f){return f.maxPoint>0||!f.isEmpty&&f.maxPoint>=o}),u=hA(a,s,r),c=new Rl(a,u,o),l=new Rl(s,u,o);r.iterGaps(function(f,h,d){return vA(c,f,l,h,d,i)}),r.empty&&r.length==0&&vA(c,0,l,0,0,i)}},{key:"eq",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0;i==null&&(i=999999999);var o=t.filter(function(l){return!l.isEmpty&&n.indexOf(l)<0}),a=n.filter(function(l){return!l.isEmpty&&t.indexOf(l)<0});if(o.length!=a.length)return!1;if(!o.length)return!0;for(var s=hA(o,a),u=new Rl(o,s,0).goto(r),c=new Rl(a,s,0).goto(r);;){if(u.to!=c.to||!D0(u.active,c.active)||u.point&&(!c.point||!u.point.eq(c.point)))return!1;if(u.to>i)return!0;u.next(),c.next()}}},{key:"spans",value:function(t,n,r,i){for(var o=new Rl(t,null,arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1).goto(n),a=n,s=o.openStart;;){var u=Math.min(o.to,r);if(o.point){var c=o.activeForPoint(o.to),l=o.pointFrom<n?c.length+1:Math.min(c.length,s);i.point(a,u,o.point,c,l,o.pointRank),s=Math.min(o.openEnd(u),c.length)}else u>a&&(i.span(a,u,o.active,s),s=o.openEnd(u));if(o.to>r)return s+(o.point&&o.to>r?1:0);a=o.to,o.next()}}},{key:"of",value:function(t){var n,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=new Ks,o=at(t instanceof T0?[t]:r?function(s){if(s.length>1)for(var u=s[0],c=1;c<s.length;c++){var l=s[c];if(R0(u,l)>0)return s.slice().sort(R0);u=l}return s}(t):t);try{for(o.s();!(n=o.n()).done;){var a=n.value;i.add(a.from,a.to,a.value)}}catch(s){o.e(s)}finally{o.f()}return i.finish()}}]),e}();Qn.empty=new Qn([],[],null,-1),Qn.empty.nextLayer=Qn.empty;var Ks=function(){function e(){X(this,e),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}return tt(e,[{key:"finishChunk",value:function(t){this.chunks.push(new nQ(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,t&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(t,n,r){this.addInner(t,n,r)||(this.nextLayer||(this.nextLayer=new e)).add(t,n,r)}},{key:"addInner",value:function(t,n,r){var i=t-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=t,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}},{key:"addChunk",value:function(t,n){if((t-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(t);var r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+t,this.lastTo=n.to[r]+t,!0}},{key:"finish",value:function(){return this.finishInner(Qn.empty)}},{key:"finishInner",value:function(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;var n=Qn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}}]),e}();function hA(e,t,n){var r,i=new Map,o=at(e);try{for(o.s();!(r=o.n()).done;)for(var a=r.value,s=0;s<a.chunk.length;s++)a.chunk[s].maxPoint<=0&&i.set(a.chunk[s],a.chunkPos[s])}catch(v){o.e(v)}finally{o.f()}var u,c=new Set,l=at(t);try{for(l.s();!(u=l.n()).done;)for(var f=u.value,h=0;h<f.chunk.length;h++){var d=i.get(f.chunk[h]);d==null||(n?n.mapPos(d):d)!=f.chunkPos[h]||n!=null&&n.touchesRange(d,d+f.chunk[h].length)||c.add(f.chunk[h])}}catch(v){l.e(v)}finally{l.f()}return c}var dA=function(){function e(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;X(this,e),this.layer=t,this.skip=n,this.minPoint=r,this.rank=i}return tt(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,n,!1),this}},{key:"gotoInner",value:function(t,n,r){for(;this.chunkIndex<this.layer.chunk.length;){var i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<t||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){var o=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<o)&&this.setRangeIndex(o)}this.next()}},{key:"forward",value:function(t,n){(this.to-t||this.endSide-n)<0&&this.gotoInner(t,n,!0)}},{key:"next",value:function(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}var t=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=t+n.from[this.rangeIndex];if(this.from=r,this.to=t+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}},{key:"setRangeIndex",value:function(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}},{key:"nextChunk",value:function(){this.chunkIndex++,this.rangeIndex=0,this.next()}},{key:"compare",value:function(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}]),e}(),N0=function(){function e(t){X(this,e),this.heap=t}return tt(e,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"goto",value:function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1e9,i=at(this.heap);try{for(i.s();!(n=i.n()).done;)n.value.goto(t,r)}catch(a){i.e(a)}finally{i.f()}for(var o=this.heap.length>>1;o>=0;o--)I0(this.heap,o);return this.next(),this}},{key:"forward",value:function(t,n){var r,i=at(this.heap);try{for(i.s();!(r=i.n()).done;)r.value.forward(t,n)}catch(a){i.e(a)}finally{i.f()}for(var o=this.heap.length>>1;o>=0;o--)I0(this.heap,o);(this.to-t||this.value.endSide-n)<0&&this.next()}},{key:"next",value:function(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),I0(this.heap,0)}}}],[{key:"from",value:function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,i=[],o=0;o<t.length;o++)for(var a=t[o];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new dA(a,n,r,o));return i.length==1?i[0]:new e(i)}}]),e}();function I0(e,t){for(var n=e[t];;){var r=1+(t<<1);if(r>=e.length)break;var i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var Rl=function(){function e(t,n,r){X(this,e),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=N0.from(t,n,r)}return tt(e,[{key:"goto",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1e9;return this.cursor.goto(t,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=n,this.openStart=-1,this.next(),this}},{key:"forward",value:function(t,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(t,n)}},{key:"removeActive",value:function(t){ad(this.active,t),ad(this.activeTo,t),ad(this.activeRank,t),this.minActive=pA(this.active,this.activeTo)}},{key:"addActive",value:function(t){for(var n=0,r=this.cursor,i=r.value,o=r.to,a=r.rank;n<this.activeRank.length&&this.activeRank[n]<=a;)n++;sd(this.active,n,i),sd(this.activeTo,n,o),sd(this.activeRank,n,a),t&&sd(t,n,this.cursor.from),this.minActive=pA(this.active,this.activeTo)}},{key:"next",value:function(){var t=this.to,n=this.point;this.point=null;for(var r=this.openStart<0?[]:null;;){var i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&ad(r,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(r),this.cursor.next()}}if(r){this.openStart=0;for(var a=r.length-1;a>=0&&r[a]<t;a--)this.openStart++}}},{key:"activeForPoint",value:function(t){if(!this.active.length)return this.active;for(var n=[],r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>t||this.activeTo[r]==t&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}},{key:"openEnd",value:function(t){for(var n=0,r=this.activeTo.length-1;r>=0&&this.activeTo[r]>t;r--)n++;return n}}]),e}();function vA(e,t,n,r,i,o){e.goto(t),n.goto(r);for(var a=r+i,s=r,u=r-t;;){var c=e.to+u-n.to||e.endSide-n.endSide,l=c<0?e.to+u:n.to,f=Math.min(l,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&D0(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(s,f,e.point,n.point):f>s&&!D0(e.active,n.active)&&o.compareRange(s,f,e.active,n.active),l>a)break;s=l,c<=0&&e.next(),c>=0&&n.next()}}function D0(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function ad(e,t){for(var n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function sd(e,t,n){for(var r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function pA(e,t){for(var n=-1,r=1e9,i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Nl(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=0,i=0;i<n;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=si(e,i));return r}function L0(e,t,n,r){for(var i=0,o=0;;){if(o>=t)return i;if(i==e.length)break;o+=e.charCodeAt(i)==9?n-o%n:1,i=si(e,i)}return r===!0?-1:e.length}for(var mA=typeof Symbol=="undefined"?"__\u037C":Symbol.for("\u037C"),B0=typeof Symbol=="undefined"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),gA=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},is=function(){function e(t,n){X(this,e),this.rules=[];var r=(n||{}).finish;function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,u,c,l){var f=[],h=/^@(\w+)\b/.exec(s[0]),d=h&&h[1]=="keyframes";if(h&&u==null)return c.push(s[0]+";");for(var v in u){var p=u[v];if(/&/.test(v))o(v.split(/,\s*/).map(function(m){return s.map(function(g){return m.replace(/&/,g)})}).reduce(function(m,g){return m.concat(g)}),p,c);else if(p&&ee(p)=="object"){if(!h)throw new RangeError("The value of a property ("+v+") should be a primitive value.");o(i(v),p,f,d)}else p!=null&&f.push(v.replace(/_.*/,"").replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()})+": "+p+";")}(f.length||d)&&c.push((!r||h||l?s:s.map(r)).join(", ")+" {"+f.join(" ")+"}")}for(var a in t)o(i(a),t[a],this.rules)}return tt(e,[{key:"getRules",value:function(){return this.rules.join(`
|
|
`)}}],[{key:"newName",value:function(){var t=gA[mA]||1;return gA[mA]=t+1,"\u037C"+t.toString(36)}},{key:"mount",value:function(t,n){(t[B0]||new rQ(t)).mount(Array.isArray(n)?n:[n])}}]),e}(),ud=null,rQ=function(){function e(t){if(X(this,e),!t.head&&t.adoptedStyleSheets&&typeof CSSStyleSheet!="undefined"){if(ud)return t.adoptedStyleSheets=[ud.sheet].concat(t.adoptedStyleSheets),t[B0]=ud;this.sheet=new CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(t.adoptedStyleSheets),ud=this}else{this.styleTag=(t.ownerDocument||t).createElement("style");var n=t.head||t;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],t[B0]=this}return tt(e,[{key:"mount",value:function(t){for(var n=this.sheet,r=0,i=0,o=0;o<t.length;o++){var a=t[o],s=this.modules.indexOf(a);if(s<i&&s>-1&&(this.modules.splice(s,1),i--,s=-1),s==-1){if(this.modules.splice(i++,0,a),n)for(var u=0;u<a.rules.length;u++)n.insertRule(a.rules[u],r++)}else{for(;i<s;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(!n){for(var c="",l=0;l<this.modules.length;l++)c+=this.modules[l].getRules()+`
|
|
`;this.styleTag.textContent=c}}}]),e}(),os={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Il={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},yA=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent),iQ=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),oQ=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),aQ=iQ||yA&&+yA[1]<57,qr=0;qr<10;qr++)os[48+qr]=os[96+qr]=String(qr);for(qr=1;qr<=24;qr++)os[qr+111]="F"+qr;for(qr=65;qr<=90;qr++)os[qr]=String.fromCharCode(qr+32),Il[qr]=String.fromCharCode(qr);for(var z0 in os)Il.hasOwnProperty(z0)||(Il[z0]=os[z0]);function cd(e){return(e.nodeType==11?e.getSelection?e:e.ownerDocument:e).getSelection()}function lc(e,t){return!!t&&(e==t||e.contains(t.nodeType!=1?t.parentNode:t))}function ld(e,t){if(!t.anchorNode)return!1;try{return lc(e,t.anchorNode)}catch(n){return!1}}function Dl(e){return e.nodeType==3?hc(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function fd(e,t,n,r){return!!n&&(bA(e,t,n,r,-1)||bA(e,t,n,r,1))}function hd(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function bA(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:as(e))){if(e.nodeName=="DIV")return!1;var o=e.parentNode;if(!o||o.nodeType!=1)return!1;t=hd(e)+(i<0?0:1),e=o}else{if(e.nodeType!=1||(e=e.childNodes[t+(i<0?-1:0)]).nodeType==1&&e.contentEditable=="false")return!1;t=i<0?as(e):0}}}function as(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function F0(e,t){var n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function sQ(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}var wA,uQ=function(){function e(){X(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return tt(e,[{key:"eq",value:function(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}},{key:"setRange",value:function(t){var n=t.anchorNode,r=t.focusNode;this.set(n,Math.min(t.anchorOffset,n?as(n):0),r,Math.min(t.focusOffset,r?as(r):0))}},{key:"set",value:function(t,n,r,i){this.anchorNode=t,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}]),e}(),fc=null;function xA(e){if(e.setActive)return e.setActive();if(fc)return e.focus(fc);for(var t=[],n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(fc==null?{get preventScroll(){return fc={preventScroll:!0},!0}}:void 0),!fc){fc=!1;for(var r=0;r<t.length;){var i=t[r++],o=t[r++],a=t[r++];i.scrollTop!=o&&(i.scrollTop=o),i.scrollLeft!=a&&(i.scrollLeft=a)}}}function hc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,r=wA||(wA=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function dc(e,t,n){var r={key:t,code:t,keyCode:n,which:n,cancelable:!0},i=new KeyboardEvent("keydown",r);i.synthetic=!0,e.dispatchEvent(i);var o=new KeyboardEvent("keyup",r);return o.synthetic=!0,e.dispatchEvent(o),i.defaultPrevented||o.defaultPrevented}function kA(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}var gi=function(){function e(t,n){var r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];X(this,e),this.node=t,this.offset=n,this.precise=r}return tt(e,null,[{key:"before",value:function(t,n){return new e(t.parentNode,hd(t),n)}},{key:"after",value:function(t,n){return new e(t.parentNode,hd(t)+1,n)}}]),e}(),V0=[],fr=function(){function e(){X(this,e),this.parent=null,this.dom=null,this.dirty=2}return tt(e,[{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(t){var n,r=this.posAtStart,i=at(this.children);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o==t)return r;r+=o.length+o.breakAfter}}catch(a){i.e(a)}finally{i.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(t){return this.posBefore(t)+t.length}},{key:"sync",value:function(t,n){if(2&this.dirty){var r,i,o=this.dom,a=null,s=at(this.children);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(u.dirty){if(!u.dom&&(r=a?a.nextSibling:o.firstChild)){var c=e.get(r);(!c||!c.parent&&c.canReuseDOM(u))&&u.reuseDOM(r)}u.sync(t,n),u.dirty=0}if(r=a?a.nextSibling:o.firstChild,n&&!n.written&&n.node==o&&r!=u.dom&&(n.written=!0),u.dom.parentNode==o)for(;r&&r!=u.dom;)r=jA(r);else o.insertBefore(u.dom,r);a=u.dom}}catch(d){s.e(d)}finally{s.f()}for((r=a?a.nextSibling:o.firstChild)&&n&&n.node==o&&(n.written=!0);r;)r=jA(r)}else if(1&this.dirty){var l,f=at(this.children);try{for(f.s();!(l=f.n()).done;){var h=l.value;h.dirty&&(h.sync(t,n),h.dirty=0)}}catch(d){f.e(d)}finally{f.f()}}}},{key:"reuseDOM",value:function(t){}},{key:"localPosFromDOM",value:function(t,n){var r;if(t==this.dom)r=this.dom.childNodes[n];else{for(var i=as(t)==0?0:n==0?-1:1;;){var o=t.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(i=t==o.firstChild?-1:1),t=o}r=i<0?t:t.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!e.get(r);)r=r.nextSibling;if(!r)return this.length;for(var a=0,s=0;;a++){var u=this.children[a];if(u.dom==r)return s;s+=u.length+u.breakAfter}}},{key:"domBoundsAround",value:function(t,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=-1,o=-1,a=-1,s=-1,u=0,c=r,l=r;u<this.children.length;u++){var f=this.children[u],h=c+f.length;if(c<t&&h>n)return f.domBoundsAround(t,n,c);if(h>=t&&i==-1&&(i=u,o=c),c>n&&f.dom.parentNode==this.dom){a=u,s=l;break}l=h,c=h+f.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a<this.children.length&&a>=0?this.children[a].dom:null}}},{key:"markDirty",value:function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.dirty|=2,this.markParentsDirty(t)}},{key:"markParentsDirty",value:function(t){for(var n=this.parent;n;n=n.parent){if(t&&(n.dirty|=2),1&n.dirty)return;n.dirty|=1,t=!1}}},{key:"setParent",value:function(t){this.parent!=t&&(this.parent=t,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(t){this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this}},{key:"rootView",get:function(){for(var t=this;;){var n=t.parent;if(!n)return t;t=n}}},{key:"replaceChildren",value:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:V0;this.markDirty();for(var o=t;o<n;o++){var a=this.children[o];a.parent==this&&a.destroy()}(r=this.children).splice.apply(r,[t,n-t].concat(Oe(i)));for(var s=0;s<i.length;s++)i[s].setParent(this)}},{key:"ignoreMutation",value:function(t){return!1}},{key:"ignoreEvent",value:function(t){return!1}},{key:"childCursor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.length;return new SA(this.children,t,this.children.length)}},{key:"childPos",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this.childCursor().findPos(t,n)}},{key:"toString",value:function(){var t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+(t=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"isHidden",get:function(){return!1}},{key:"merge",value:function(t,n,r,i,o,a){return!1}},{key:"become",value:function(t){return!1}},{key:"canReuseDOM",value:function(t){return t.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(t){return t.cmView}}]),e}();function jA(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}fr.prototype.breakAfter=0;var SA=function(){function e(t,n,r){X(this,e),this.children=t,this.pos=n,this.i=r,this.off=0}return tt(e,[{key:"findPos",value:function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;;){if(t>this.pos||t==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;var r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}]),e}();function CA(e,t,n,r,i,o,a,s,u){var c=e.children,l=c.length?c[t]:null,f=o.length?o[o.length-1]:null,h=f?f.breakAfter:a;if(!(t==r&&l&&!a&&!h&&o.length<2&&l.merge(n,i,o.length?f:null,n==0,s,u))){if(r<c.length){var d=c[r];d&&i<d.length?(t==r&&(d=d.split(i),i=0),!h&&f&&d.merge(0,i,f,!0,0,u)?o[o.length-1]=d:(i&&d.merge(0,i,null,!1,0,u),o.push(d))):d!=null&&d.breakAfter&&(f?f.breakAfter=1:a=1),r++}for(l&&(l.breakAfter=a,n>0&&(!a&&o.length&&l.merge(n,l.length,o[0],!1,s,0)?l.breakAfter=o.shift().breakAfter:(n<l.length||l.children.length&&l.children[l.children.length-1].length==0)&&l.merge(n,l.length,null,!1,s,0),t++));t<r&&o.length;)if(c[r-1].become(o[o.length-1]))r--,o.pop(),u=o.length?0:s;else{if(!c[t].become(o[0]))break;t++,o.shift(),s=o.length?0:u}!o.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,s,u)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function $A(e,t,n,r,i,o){var a,s=e.childCursor(),u=s.findPos(n,1),c=u.i,l=u.off,f=s.findPos(t,-1),h=f.i,d=f.off,v=t-n,p=at(r);try{for(p.s();!(a=p.n()).done;)v+=a.value.length}catch(m){p.e(m)}finally{p.f()}e.length+=v,CA(e,h,d,c,l,r,0,i,o)}var Oi=typeof navigator!="undefined"?navigator:{userAgent:"",vendor:"",platform:""},W0=typeof document!="undefined"?document:{documentElement:{style:{}}},q0=/Edge\/(\d+)/.exec(Oi.userAgent),_A=/MSIE \d/.test(Oi.userAgent),H0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Oi.userAgent),dd=!!(_A||H0||q0),OA=!dd&&/gecko\/(\d+)/i.test(Oi.userAgent),U0=!dd&&/Chrome\/(\d+)/.exec(Oi.userAgent),MA="webkitFontSmoothing"in W0.documentElement.style,EA=!dd&&/Apple Computer/.test(Oi.vendor),AA=EA&&(/Mobile\/\w+/.test(Oi.userAgent)||Oi.maxTouchPoints>2),Ce={mac:AA||/Mac/.test(Oi.platform),windows:/Win/.test(Oi.platform),linux:/Linux|X11/.test(Oi.platform),ie:dd,ie_version:_A?W0.documentMode||6:H0?+H0[1]:q0?+q0[1]:0,gecko:OA,gecko_version:OA?+(/Firefox\/(\d+)/.exec(Oi.userAgent)||[0,0])[1]:0,chrome:!!U0,chrome_version:U0?+U0[1]:0,ios:AA,android:/Android\b/.test(Oi.userAgent),webkit:MA,safari:EA,webkit_version:MA?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:W0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},vd=function(e){Ot(n,fr);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).text=r,i}return tt(n,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(r){this.setDOM(r||document.createTextNode(this.text))}},{key:"sync",value:function(r,i){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(i&&i.node==this.dom&&(i.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(r){r.nodeType==3&&this.createDOM(r)}},{key:"merge",value:function(r,i,o){return(!o||o instanceof n&&!(this.length-(i-r)+o.length>256))&&(this.text=this.text.slice(0,r)+(o?o.text:"")+this.text.slice(i),this.markDirty(),!0)}},{key:"split",value:function(r){var i=new n(this.text.slice(r));return this.text=this.text.slice(0,r),this.markDirty(),i}},{key:"localPosFromDOM",value:function(r,i){return r==this.dom?i:i?this.text.length:0}},{key:"domAtPos",value:function(r){return new gi(this.dom,r)}},{key:"domBoundsAround",value:function(r,i,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(r,i){return J0(this.dom,r,i)}}]),n}(),vc=function(e){Ot(n,fr);var t=Mt(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;X(this,n),(i=t.call(this)).mark=r,i.children=o,i.length=a;var s,u=at(o);try{for(u.s();!(s=u.n()).done;)s.value.setParent(ce(i))}catch(c){u.e(c)}finally{u.f()}return i}return tt(n,[{key:"setAttrs",value:function(r){if(kA(r),this.mark.class&&(r.className=this.mark.class),this.mark.attrs)for(var i in this.mark.attrs)r.setAttribute(i,this.mark.attrs[i]);return r}},{key:"reuseDOM",value:function(r){r.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(r),this.dirty|=6)}},{key:"sync",value:function(r,i){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),fn(Ke(n.prototype),"sync",this).call(this,r,i)}},{key:"merge",value:function(r,i,o,a,s,u){return(!o||!(!(o instanceof n&&o.mark.eq(this.mark))||r&&s<=0||i<this.length&&u<=0))&&($A(this,r,i,o?o.children:[],s-1,u-1),this.markDirty(),!0)}},{key:"split",value:function(r){var i,o=[],a=0,s=-1,u=0,c=at(this.children);try{for(c.s();!(i=c.n()).done;){var l=i.value,f=a+l.length;f>r&&o.push(a<r?l.split(r-a):l),s<0&&a>=r&&(s=u),a=f,u++}}catch(d){c.e(d)}finally{c.f()}var h=this.length-r;return this.length=r,s>-1&&(this.children.length=s,this.markDirty()),new n(this.mark,o,h)}},{key:"domAtPos",value:function(r){return IA(this,r)}},{key:"coordsAt",value:function(r,i){return LA(this,r,i)}}]),n}();function J0(e,t,n){var r=e.nodeValue.length;t>r&&(t=r);var i=t,o=t,a=0;t==0&&n<0||t==r&&n>=0?Ce.chrome||Ce.gecko||(t?(i--,a=1):o<r&&(o++,a=-1)):n<0?i--:o<r&&o++;var s=hc(e,i,o).getClientRects();if(!s.length)return null;var u=s[(a?a<0:n>=0)?0:s.length-1];return Ce.safari&&!a&&u.width==0&&(u=Array.prototype.find.call(s,function(c){return c.width})||u),a?F0(u,a<0):u||null}var K0=function(e){Ot(n,fr);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this)).widget=r,a.length=i,a.side=o,a.prevWidget=null,a}return tt(n,[{key:"split",value:function(r){var i=n.create(this.widget,this.length-r,this.side);return this.length-=r,i}},{key:"sync",value:function(r){this.dom&&this.widget.updateDOM(this.dom,r)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(r)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(r,i,o,a,s,u){return!(o&&(!(o instanceof n&&this.widget.compare(o.widget))||r>0&&s<=0||i<this.length&&u<=0))&&(this.length=r+(o?o.length:0)+(this.length-i),!0)}},{key:"become",value:function(r){return r instanceof n&&r.side==this.side&&this.widget.constructor==r.widget.constructor&&(this.widget.compare(r.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=r.widget,this.length=r.length,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(r){return this.widget.ignoreEvent(r)}},{key:"overrideDOMText",get:function(){if(this.length==0)return Tn.empty;for(var r=this;r.parent;)r=r.parent;var i=r.view,o=i&&i.state.doc,a=this.posAtStart;return o?o.slice(a,a+this.length):Tn.empty}},{key:"domAtPos",value:function(r){return(this.length?r==0:this.side>0)?gi.before(this.dom):gi.after(this.dom,r==this.length)}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(r,i){var o=this.widget.coordsAt(this.dom,r,i);if(o)return o;var a=this.dom.getClientRects(),s=null;if(!a.length)return null;for(var u=this.side?this.side<0:r>0,c=u?a.length-1:0;s=a[c],!(r>0?c==0:c==a.length-1||s.top<s.bottom);c+=u?-1:1);return F0(s,!u)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"isHidden",get:function(){return this.widget.isHidden}},{key:"destroy",value:function(){fn(Ke(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(r,i,o){return new(r.customView||n)(r,i,o)}}]),n}(),PA=function(e){Ot(n,K0);var t=Mt(n);function n(){return X(this,n),t.apply(this,arguments)}return tt(n,[{key:"domAtPos",value:function(r){var i=this.widget,o=i.topView,a=i.text;return o?G0(r,0,o,a,this.length-o.length,function(s,u){return s.domAtPos(u)},function(s,u){return new gi(s,Math.min(u,s.nodeValue.length))}):new gi(a,Math.min(r,a.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(r,i){var o=this.widget,a=o.topView,s=o.text;return a?RA(r,i,a,s,this.length-a.length):Math.min(i,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(r,i){var o=this.widget,a=o.topView,s=o.text;return a?G0(r,i,a,s,this.length-a.length,function(u,c,l){return u.coordsAt(c,l)},function(u,c,l){return J0(u,c,l)}):J0(s,r,i)}},{key:"destroy",value:function(){var r;fn(Ke(n.prototype),"destroy",this).call(this),(r=this.widget.topView)===null||r===void 0||r.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),n}();function G0(e,t,n,r,i,o,a){if(n instanceof vc){for(var s=n.dom.firstChild;s;s=s.nextSibling){var u=fr.get(s);if(u){var c=lc(s,r),l=u.length+(c?i:0);if(e<l||e==l&&u.getSide()<=0)return c?G0(e,t,u,r,i,o,a):o(u,e,t);e-=l}else{var f=TA(e,t,s,a);if(typeof f!="number")return f;e=f}}return o(n,n.length,-1)}return n.dom==r?a(r,e,t):o(n,e,t)}function TA(e,t,n,r){if(n.nodeType==3){var i=n.nodeValue.length;if(e<=i)return r(n,e,t);e-=i}else if(n.nodeType==1&&n.contentEditable!="false")for(var o=n.firstChild;o;o=o.nextSibling){var a=TA(e,t,o,r);if(typeof a!="number")return a;e=a}return e}function RA(e,t,n,r,i){if(n instanceof vc)for(var o=0,a=n.dom.firstChild;a;a=a.nextSibling){var s=fr.get(a);if(s){var u=lc(a,r);if(lc(a,e))return o+(u?RA(e,t,s,r,i):s.localPosFromDOM(e,t));o+=s.length+(u?i:0)}else{var c=NA(e,t,a);if(c.result!=null)return o+c.result;o+=c.size}}else if(n.dom==r)return Math.min(t,r.nodeValue.length);return n.localPosFromDOM(e,t)}function NA(e,t,n){if(n.nodeType==3)return e==n?{result:t}:{size:n.nodeValue.length};if(n.nodeType!=1||n.contentEditable=="false")return n.contains(e)?{result:0}:{size:0};for(var r=0,i=n.firstChild,o=0;;i=i.nextSibling,o++){if(e==n&&o==t)return{result:r};if(!i)return{size:r};var a=NA(e,t,i);if(a.result!=null)return{result:t+a.result};r+=a.size}}var Q0=function(e){Ot(n,fr);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).side=r,i}return tt(n,[{key:"length",get:function(){return 0}},{key:"merge",value:function(){return!1}},{key:"become",value:function(r){return r instanceof n&&r.side==this.side}},{key:"split",value:function(){return new n(this.side)}},{key:"sync",value:function(){if(!this.dom){var r=document.createElement("img");r.className="cm-widgetBuffer",r.setAttribute("aria-hidden","true"),this.setDOM(r)}}},{key:"getSide",value:function(){return this.side}},{key:"domAtPos",value:function(r){return this.side>0?gi.before(this.dom):gi.after(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(r){return this.dom.getBoundingClientRect()}},{key:"overrideDOMText",get:function(){return Tn.empty}},{key:"isHidden",get:function(){return!0}}]),n}();function IA(e,t){for(var n=e.dom,r=e.children,i=0,o=0;i<r.length;i++){var a=r[i],s=o+a.length;if(!(s==o&&a.getSide()<=0)){if(t>o&&t<s&&a.dom.parentNode==n)return a.domAtPos(t-o);if(t<=o)break;o=s}}for(var u=i;u>0;u--){var c=r[u-1];if(c.dom.parentNode==n)return c.domAtPos(c.length)}for(var l=i;l<r.length;l++){var f=r[l];if(f.dom.parentNode==n)return f.domAtPos(0)}return new gi(n,0)}function DA(e,t,n){var r,i=e.children;n>0&&t instanceof vc&&i.length&&(r=i[i.length-1])instanceof vc&&r.mark.eq(t.mark)?DA(r,t.children[0],n-1):(i.push(t),t.setParent(e)),e.length+=t.length}function LA(e,t,n){var r=null,i=-1,o=null,a=-1;(function u(c,l){for(var f=0,h=0;f<c.children.length&&h<=l;f++){var d=c.children[f],v=h+d.length;v>=l&&(d.children.length?u(d,l-h):(!o||o.isHidden&&n>0)&&(v>l||h==v&&d.getSide()>0)?(o=d,a=l-h):(h<l||h==v&&d.getSide()<0&&!d.isHidden)&&(r=d,i=l-h)),h=v}})(e,t);var s=(n<0?r:o)||r||o;return s?s.coordsAt(Math.max(0,s==r?i:a),n):function(u){var c=u.dom.lastChild;if(!c)return u.dom.getBoundingClientRect();var l=Dl(c);return l[l.length-1]||null}(e)}function Y0(e,t){for(var n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}function Z0(e,t){if(e==t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if(r.indexOf(a)==-1||e[a]!==t[a])return!1}return!0}function X0(e,t,n){var r=null;if(t)for(var i in t)n&&i in n||e.removeAttribute(r=i);if(n)for(var o in n)t&&t[o]==n[o]||e.setAttribute(r=o,n[o]);return!!r}vd.prototype.children=K0.prototype.children=Q0.prototype.children=V0;var ss=function(){function e(){X(this,e)}return tt(e,[{key:"eq",value:function(t){return!1}},{key:"updateDOM",value:function(t,n){return!1}},{key:"compare",value:function(t){return this==t||this.constructor==t.constructor&&this.eq(t)}},{key:"estimatedHeight",get:function(){return-1}},{key:"lineBreaks",get:function(){return 0}},{key:"ignoreEvent",value:function(t){return!0}},{key:"coordsAt",value:function(t,n,r){return null}},{key:"customView",get:function(){return null}},{key:"isHidden",get:function(){return!1}},{key:"destroy",value:function(t){}}]),e}(),hr=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(hr||(hr={})),Te=function(e){Ot(n,Js);var t=Mt(n);function n(r,i,o,a){var s;return X(this,n),(s=t.call(this)).startSide=r,s.endSide=i,s.widget=o,s.spec=a,s}return tt(n,[{key:"heightRelevant",get:function(){return!1}},{key:"hasHeight",value:function(){return!!this.widget&&this.widget.estimatedHeight>-1}}],[{key:"mark",value:function(r){return new BA(r)}},{key:"widget",value:function(r){var i=Math.max(-1e4,Math.min(1e4,r.side||0)),o=!!r.block;return new pc(r,i+=o?i>0?3e8:-4e8:i>0?1e8:-1e8,i,o,r.widget||null,!1)}},{key:"replace",value:function(r){var i,o,a=!!r.block;if(r.isBlockGap)i=-5e8,o=4e8;else{var s=zA(r,a);i=(s.start?a?-3e8:-1:5e8)-1,o=1+(s.end?a?2e8:1:-6e8)}return new pc(r,i,o,a,r.widget||null,!0)}},{key:"line",value:function(r){return new t1(r)}},{key:"set",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return Qn.of(r,i)}}]),n}();Te.none=Qn.empty;var BA=function(e){Ot(n,Te);var t=Mt(n);function n(r){var i;X(this,n);var o=zA(r),a=o.start,s=o.end;return(i=t.call(this,a?-1:5e8,s?1:-6e8,null,r)).tagName=r.tagName||"span",i.class=r.class||"",i.attrs=r.attributes||null,i}return tt(n,[{key:"eq",value:function(r){return this==r||r instanceof n&&this.tagName==r.tagName&&this.class==r.class&&Z0(this.attrs,r.attrs)}},{key:"range",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r;if(r>=i)throw new RangeError("Mark decorations may not be empty");return fn(Ke(n.prototype),"range",this).call(this,r,i)}}]),n}();BA.prototype.point=!1;var t1=function(e){Ot(n,Te);var t=Mt(n);function n(r){return X(this,n),t.call(this,-2e8,-2e8,null,r)}return tt(n,[{key:"eq",value:function(r){return r instanceof n&&this.spec.class==r.spec.class&&Z0(this.spec.attributes,r.spec.attributes)}},{key:"range",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r;if(i!=r)throw new RangeError("Line decoration ranges must be zero-length");return fn(Ke(n.prototype),"range",this).call(this,r,i)}}]),n}();t1.prototype.mapMode=ui.TrackBefore,t1.prototype.point=!0;var pc=function(e){Ot(n,Te);var t=Mt(n);function n(r,i,o,a,s,u){var c;return X(this,n),(c=t.call(this,i,o,s,r)).block=a,c.isReplace=u,c.mapMode=a?i<=0?ui.TrackBefore:ui.TrackAfter:ui.TrackDel,c}return tt(n,[{key:"type",get:function(){return this.startSide<this.endSide?hr.WidgetRange:this.startSide<=0?hr.WidgetBefore:hr.WidgetAfter}},{key:"heightRelevant",get:function(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}},{key:"eq",value:function(r){return r instanceof n&&function(i,o){return i==o||!!(i&&o&&i.compare(o))}(this.widget,r.widget)&&this.block==r.block&&this.startSide==r.startSide&&this.endSide==r.endSide}},{key:"range",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r;if(this.isReplace&&(r>i||r==i&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&i!=r)throw new RangeError("Widget decorations can only have zero-length ranges");return fn(Ke(n.prototype),"range",this).call(this,r,i)}}]),n}();function zA(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.inclusiveStart,r=e.inclusiveEnd;return n==null&&(n=e.inclusive),r==null&&(r=e.inclusive),{start:n!=null?n:t,end:r!=null?r:t}}function e1(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}pc.prototype.point=!0;var Xo=function(e){Ot(n,fr);var t=Mt(n);function n(){var r;return X(this,n),(r=t.apply(this,arguments)).children=[],r.length=0,r.prevAttrs=void 0,r.attrs=null,r.breakAfter=0,r}return tt(n,[{key:"merge",value:function(r,i,o,a,s,u){if(o){if(!(o instanceof n))return!1;this.dom||o.transferDOM(this)}return a&&this.setDeco(o?o.attrs:null),$A(this,r,i,o?o.children:[],s,u),!0}},{key:"split",value:function(r){var i=new n;if(i.breakAfter=this.breakAfter,this.length==0)return i;var o=this.childPos(r),a=o.i,s=o.off;s&&(i.append(this.children[a].split(s),0),this.children[a].merge(s,this.children[a].length,null,!1,0,0),a++);for(var u=a;u<this.children.length;u++)i.append(this.children[u],0);for(;a>0&&this.children[a-1].length==0;)this.children[--a].destroy();return this.children.length=a,this.markDirty(),this.length=r,i}},{key:"transferDOM",value:function(r){this.dom&&(this.markDirty(),r.setDOM(this.dom),r.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(r){Z0(this.attrs,r)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=r)}},{key:"append",value:function(r,i){DA(this,r,i)}},{key:"addLineDeco",value:function(r){var i=r.spec.attributes,o=r.spec.class;i&&(this.attrs=Y0(i,this.attrs||{})),o&&(this.attrs=Y0({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(r){return IA(this,r)}},{key:"reuseDOM",value:function(r){r.nodeName=="DIV"&&(this.setDOM(r),this.dirty|=6)}},{key:"sync",value:function(r,i){var o;this.dom?4&this.dirty&&(kA(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&&(X0(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),fn(Ke(n.prototype),"sync",this).call(this,r,i);for(var a=this.dom.lastChild;a&&fr.get(a)instanceof vc;)a=a.lastChild;if(!(a&&this.length&&(a.nodeName=="BR"||((o=fr.get(a))===null||o===void 0?void 0:o.isEditable)!=0||Ce.ios&&this.children.some(function(u){return u instanceof vd})))){var s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}},{key:"measureTextSize",value:function(){if(this.children.length==0||this.length>20)return null;var r,i,o=0,a=at(this.children);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(!(s instanceof vd)||/[^ -~]/.test(s.text))return null;var u=Dl(s.dom);if(u.length!=1)return null;o+=u[0].width,r=u[0].height}}catch(c){a.e(c)}finally{a.f()}return o?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:o/this.length,textHeight:r}:null}},{key:"coordsAt",value:function(r,i){var o=LA(this,r,i);if(!this.children.length&&o&&this.parent){var a=this.parent.view.viewState.heightOracle,s=o.bottom-o.top;if(Math.abs(s-a.lineHeight)<2&&a.textHeight<s){var u=(s-a.textHeight)/2;return{top:o.top+u,bottom:o.bottom-u,left:o.left,right:o.left}}}return o}},{key:"become",value:function(r){return!1}},{key:"type",get:function(){return hr.Text}}],[{key:"find",value:function(r,i){for(var o=0,a=0;o<r.children.length;o++){var s=r.children[o],u=a+s.length;if(u>=i){if(s instanceof n)return s;if(u>i)break}a=u+s.breakAfter}return null}}]),n}(),n1=function(e){Ot(n,fr);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this)).widget=r,a.length=i,a.type=o,a.breakAfter=0,a.prevWidget=null,a}return tt(n,[{key:"merge",value:function(r,i,o,a,s,u){return!(o&&(!(o instanceof n&&this.widget.compare(o.widget))||r>0&&s<=0||i<this.length&&u<=0))&&(this.length=r+(o?o.length:0)+(this.length-i),!0)}},{key:"domAtPos",value:function(r){return r==0?gi.before(this.dom):gi.after(this.dom,r==this.length)}},{key:"split",value:function(r){var i=this.length-r;this.length=r;var o=new n(this.widget,i,this.type);return o.breakAfter=this.breakAfter,o}},{key:"children",get:function(){return V0}},{key:"sync",value:function(r){this.dom&&this.widget.updateDOM(this.dom,r)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(r)),this.dom.contentEditable="false")}},{key:"overrideDOMText",get:function(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Tn.empty}},{key:"domBoundsAround",value:function(){return null}},{key:"become",value:function(r){return r instanceof n&&r.widget.constructor==this.widget.constructor&&(r.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=r.widget,this.length=r.length,this.type=r.type,this.breakAfter=r.breakAfter,!0)}},{key:"ignoreMutation",value:function(){return!0}},{key:"ignoreEvent",value:function(r){return this.widget.ignoreEvent(r)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"coordsAt",value:function(r,i){return this.widget.coordsAt(this.dom,r,i)}},{key:"destroy",value:function(){fn(Ke(n.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}]),n}(),cQ=function(){function e(t,n,r,i){X(this,e),this.doc=t,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,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=t.iter(),this.skip=n}return tt(e,[{key:"posCovered",value:function(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;var t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof n1&&t.type==hr.WidgetBefore)}},{key:"getLine",value:function(){return this.curLine||(this.content.push(this.curLine=new Xo),this.atCursorPos=!0),this.curLine}},{key:"flushBuffer",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(pd(new Q0(-1),t),t.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}},{key:"finish",value:function(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(t,n,r){for(;t>0;){if(this.textOff==this.text.length){var i=this.cursor.next(this.skip),o=i.value,a=i.lineBreak,s=i.done;if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(a){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,t--;continue}this.text=o,this.textOff=0}var u=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(pd(new vd(this.text.slice(this.textOff,this.textOff+u)),n),r),this.atCursorPos=!0,this.textOff+=u,t-=u,r=0}}},{key:"span",value:function(t,n,r,i){this.buildText(n-t,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}},{key:"point",value:function(t,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof pc){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")}var s=n-t;if(r instanceof pc)if(r.block){var u=r.type;u!=hr.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new n1(r.widget||new FA("div"),s,u))}else{var c=K0.create(r.widget||new FA("span"),s,s?0:r.startSide),l=this.atCursorPos&&!c.isEditable&&o<=i.length&&(t<n||r.startSide>0),f=!c.isEditable&&(t<n||o>i.length||r.startSide<=0),h=this.getLine();this.pendingBuffer!=2||l||c.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),l&&(h.append(pd(new Q0(1),i),o),o=i.length+Math.max(0,o-i.length)),h.append(pd(c,i),o),this.atCursorPos=f,this.pendingBuffer=f?t<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(t,n,r,i,o){var a=new e(t,n,r,o);return a.openEnd=Qn.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}]),e}();function pd(e,t){var n,r=at(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;e=new vc(i,[e],e.length)}}catch(o){r.e(o)}finally{r.f()}return e}var FA=function(e){Ot(n,ss);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).tag=r,i}return tt(n,[{key:"eq",value:function(r){return r.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(r){return r.nodeName.toLowerCase()==this.tag}},{key:"isHidden",get:function(){return!0}}]),n}(),VA=Se.define(),WA=Se.define(),qA=Se.define(),HA=Se.define(),r1=Se.define(),UA=Se.define(),JA=Se.define(),KA=Se.define({combine:function(e){return e.some(function(t){return t})}}),GA=Se.define({combine:function(e){return e.some(function(t){return t})}}),QA=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"nearest",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"nearest",i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:5;X(this,e),this.range=t,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o}return tt(e,[{key:"map",value:function(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}]),e}(),YA=cn.define({map:function(e,t){return e.map(t)}});function Mi(e,t,n){var r=e.facet(HA);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}var md=Se.define({combine:function(e){return!e.length||e[0]}}),lQ=0,Ll=Se.define(),zr=function(){function e(t,n,r,i){X(this,e),this.id=t,this.create=n,this.domEventHandlers=r,this.extension=i(this)}return tt(e,null,[{key:"define",value:function(t,n){var r=n||{},i=r.eventHandlers,o=r.provide,a=r.decorations;return new e(lQ++,t,i,function(s){var u=[Ll.of(s)];return a&&u.push(Bl.of(function(c){var l=c.plugin(s);return l?a(l):Te.none})),o&&u.push(o(s)),u})}},{key:"fromClass",value:function(t,n){return e.define(function(r){return new t(r)},n)}}]),e}(),i1=function(){function e(t){X(this,e),this.spec=t,this.mustUpdate=null,this.value=null}return tt(e,[{key:"update",value:function(t){if(this.value){if(this.mustUpdate){var n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Mi(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(i){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(r){Mi(t.state,r,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(t){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Mi(t.state,r,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),e}(),ZA=Se.define(),o1=Se.define(),Bl=Se.define(),a1=Se.define(),XA=Se.define();function t7(e){var t,n=0,r=0,i=0,o=0,a=at(e.state.facet(XA));try{for(a.s();!(t=a.n()).done;){var s=(0,t.value)(e);s&&(s.left!=null&&(n=Math.max(n,s.left)),s.right!=null&&(r=Math.max(r,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(o=Math.max(o,s.bottom)))}}catch(u){a.e(u)}finally{a.f()}return{left:n,right:r,top:i,bottom:o}}var zl=Se.define(),mc=function(){function e(t,n,r,i){X(this,e),this.fromA=t,this.toA=n,this.fromB=r,this.toB=i}return tt(e,[{key:"join",value:function(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}},{key:"addToSet",value:function(t){for(var n=t.length,r=this;n>0;n--){var i=t[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),t.splice(n-1,1)}}return t.splice(n,0,r),t}}],[{key:"extendWithRanges",value:function(t,n){if(n.length==0)return t;for(var r=[],i=0,o=0,a=0,s=0;;i++){for(var u=i==t.length?null:t[i],c=a-s,l=u?u.fromB:1e9;o<n.length&&n[o]<l;){var f=n[o],h=n[o+1],d=Math.max(s,f),v=Math.min(l,h);if(d<=v&&new e(d+c,v+c,d,v).addToSet(r),h>l)break;o+=2}if(!u)return r;new e(u.fromA,u.toA,u.fromB,u.toB).addToSet(r),a=u.toA,s=u.toB}}}]),e}(),e7=function(){function e(t,n,r){X(this,e),this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=go.empty(this.startState.doc.length);var i,o=at(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.changes=this.changes.compose(a.changes)}}catch(u){o.e(u)}finally{o.f()}var s=[];this.changes.iterChangedRanges(function(u,c,l,f){return s.push(new mc(u,c,l,f))}),this.changedRanges=s}return tt(e,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some(function(t){return t.selection})}},{key:"empty",get:function(){return this.flags==0&&this.transactions.length==0}}],[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),dr=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(dr||(dr={})),s1=dr.LTR,fQ=dr.RTL;function n7(e){for(var t=[],n=0;n<e.length;n++)t.push(1<<+e[n]);return t}for(var hQ=n7("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),dQ=n7("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),u1=Object.create(null),ta=[],c1=0,r7=["()","[]","{}"];c1<r7.length;c1++){var i7=r7[c1],o7=i7.charCodeAt(0),a7=i7.charCodeAt(1);u1[o7]=a7,u1[a7]=-o7}function vQ(e){return e<=247?hQ[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?dQ[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8203?256:64336<=e&&e<=65023?4:e==8204?256:1}var pQ=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,gc=function(){function e(t,n,r){X(this,e),this.from=t,this.to=n,this.level=r}return tt(e,[{key:"dir",get:function(){return this.level%2?fQ:s1}},{key:"side",value:function(t,n){return this.dir==n==t?this.to:this.from}}],[{key:"find",value:function(t,n,r,i){for(var o=-1,a=0;a<t.length;a++){var s=t[a];if(s.from<=n&&s.to>=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.from<n:s.to>n:t[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}]),e}(),vr=[];function s7(e){return[new gc(0,e,0)]}var u7="";function mQ(e,t,n,r,i){var o,a=r.head-e.from,s=-1;if(a==0){if(!i||!e.length)return null;t[0].level!=n&&(a=t[0].side(!1,n),s=0)}else if(a==e.length){if(i)return null;var u=t[t.length-1];u.level!=n&&(a=u.side(!0,n),s=t.length-1)}s<0&&(s=gc.find(t,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc));var c=t[s];a==c.side(i,n)&&(a=(c=t[s+=i?1:-1]).side(!i,n));var l=i==(c.dir==n),f=si(e.text,a,l);if(u7=e.text.slice(Math.min(a,f),Math.max(a,f)),f!=c.side(i,n))return Ht.cursor(f+e.from,l?-1:1,c.level);var h=s==(i?t.length-1:0)?null:t[s+(i?1:-1)];return h||c.level==n?h&&h.level<c.level?Ht.cursor(h.side(!i,n)+e.from,i?1:-1,h.level):Ht.cursor(f+e.from,i?-1:1,c.level):Ht.cursor(i?e.to:e.from,i?-1:1,n)}var yc="\uFFFF",c7=function(){function e(t,n){X(this,e),this.points=t,this.text="",this.lineSeparator=n.facet(Hn.lineSeparator)}return tt(e,[{key:"append",value:function(t){this.text+=t}},{key:"lineBreak",value:function(){this.text+=yc}},{key:"readRange",value:function(t,n){if(!t)return this;for(var r=t.parentNode,i=t;;){this.findPointBefore(r,i);var o=this.text.length;this.readNode(i);var a=i.nextSibling;if(a==n)break;var s=fr.get(i),u=fr.get(a);(s&&u?s.breakAfter:(s?s.breakAfter:l7(i))||l7(a)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}},{key:"readTextNode",value:function(t){var n,r=t.nodeValue,i=at(this.points);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.node==t&&(o.pos=this.text.length+Math.min(o.offset,r.length))}}catch(v){i.e(v)}finally{i.f()}for(var a=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){var u=-1,c=1,l=void 0;if(this.lineSeparator?(u=r.indexOf(this.lineSeparator,a),c=this.lineSeparator.length):(l=s.exec(r))&&(u=l.index,c=l[0].length),this.append(r.slice(a,u<0?r.length:u)),u<0)break;if(this.lineBreak(),c>1){var f,h=at(this.points);try{for(h.s();!(f=h.n()).done;){var d=f.value;d.node==t&&d.pos>this.text.length&&(d.pos-=c-1)}}catch(v){h.e(v)}finally{h.f()}}a=u+c}}},{key:"readNode",value:function(t){if(!t.cmIgnore){var n=fr.get(t),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(t,r.length);for(var i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}}},{key:"findPointBefore",value:function(t,n){var r,i=at(this.points);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.node==t&&t.childNodes[o.offset]==n&&(o.pos=this.text.length)}}catch(a){i.e(a)}finally{i.f()}}},{key:"findPointInside",value:function(t,n){var r,i=at(this.points);try{for(i.s();!(r=i.n()).done;){var o=r.value;(t.nodeType==3?o.node==t:t.contains(o.node))&&(o.pos=this.text.length+Math.min(n,o.offset))}}catch(a){i.e(a)}finally{i.f()}}}]),e}();function l7(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}var f7=tt(function e(t,n){X(this,e),this.node=t,this.offset=n,this.pos=-1}),h7=function(e){Ot(n,fr);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).view=r,i.compositionDeco=Te.none,i.decorations=[],i.dynamicDecorationMap=[],i.minWidth=0,i.minWidthFrom=0,i.minWidthTo=0,i.impreciseAnchor=null,i.impreciseHead=null,i.forceSelection=!1,i.lastUpdate=Date.now(),i.setDOM(r.contentDOM),i.children=[new Xo],i.children[0].setParent(ce(i)),i.updateDeco(),i.updateInner([new mc(0,0,0,r.state.doc.length)],0),i}return tt(n,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(r){var i=this,o=r.changedRanges;this.minWidth>0&&o.length&&(o.every(function(s){var u=s.fromA;return s.toA<i.minWidthFrom||u>i.minWidthTo})?(this.minWidthFrom=r.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=r.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=Te.none:(r.transactions.length||this.dirty)&&(this.compositionDeco=function(s,u){var c=v7(s);if(!c)return Te.none;var l=c.from,f=c.to,h=c.node,d=c.text,v=u.mapPos(l,1),p=Math.max(v,u.mapPos(f,-1)),m=s.state,g=new c7([],m);h.nodeType==3?g.readTextNode(h):g.readRange(h.firstChild,null);var y=g.text;if(y.indexOf(yc)>-1)return Te.none;if(p-v<y.length)if(m.doc.sliceString(v,Math.min(m.doc.length,v+y.length))==y)p=v+y.length;else{if(m.doc.sliceString(Math.max(0,p-y.length),p)!=y)return Te.none;v=p-y.length}else if(m.doc.sliceString(v,p)!=y)return Te.none;var b=fr.get(h);return b instanceof PA?b=b.widget.topView:b&&(b.parent=null),Te.set(Te.replace({widget:new gQ(h,d,b),inclusive:!0}).range(v,p))}(this.view,r.changes)),(Ce.ie||Ce.chrome)&&!this.compositionDeco.size&&r&&r.state.doc.lines!=r.startState.doc.lines&&(this.forceSelection=!0);var a=function(s,u,c){var l=new yQ;return Qn.compare(s,u,c,l),l.changes}(this.decorations,this.updateDeco(),r.changes);return o=mc.extendWithRanges(o,a),(this.dirty!=0||o.length!=0)&&(this.updateInner(o,r.startState.doc.length),r.transactions.length&&(this.lastUpdate=Date.now()),!0)}},{key:"updateInner",value:function(r,i){var o=this;this.view.viewState.mustMeasureContent=!0,this.updateChildren(r,i);var a=this.view.observer;a.ignore(function(){o.dom.style.height=o.view.viewState.contentHeight+"px",o.dom.style.flexBasis=o.minWidth?o.minWidth+"px":"";var f=Ce.chrome||Ce.ios?{node:a.selectionRange.focusNode,written:!1}:void 0;o.sync(o.view,f),o.dirty=0,f&&(f.written||a.selectionRange.focusNode!=f.node)&&(o.forceSelection=!0),o.dom.style.height=""});var s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){var u,c=at(this.children);try{for(c.s();!(u=c.n()).done;){var l=u.value;l instanceof n1&&l.widget instanceof d7&&s.push(l.dom)}}catch(f){c.e(f)}finally{c.f()}}a.updateGaps(s)}},{key:"updateChildren",value:function(r,i){for(var o=this.childCursor(i),a=r.length-1;;a--){var s=a>=0?r[a]:null;if(!s)break;var u=s.fromA,c=s.toA,l=s.fromB,f=s.toB,h=cQ.build(this.view.state.doc,l,f,this.decorations,this.dynamicDecorationMap),d=h.content,v=h.breakAtStart,p=h.openStart,m=h.openEnd,g=o.findPos(c,1),y=g.i,b=g.off,w=o.findPos(u,-1);CA(this,w.i,w.off,y,b,d,v,p,m)}}},{key:"updateSelection",value:function(){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];!(arguments.length>0&&arguments[0]!==void 0&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();var o=this.view.root.activeElement,a=o==this.dom,s=!a&&ld(this.dom,this.view.observer.selectionRange)&&!(o&&this.dom.contains(o));if(a||i||s){var u=this.forceSelection;this.forceSelection=!1;var c,l=this.view.state.selection.main,f=this.domAtPos(l.anchor),h=l.empty?f:this.domAtPos(l.head);if(Ce.gecko&&l.empty&&!this.compositionDeco.size&&(c=f).node.nodeType==1&&c.node.firstChild&&(c.offset==0||c.node.childNodes[c.offset-1].contentEditable=="false")&&(c.offset==c.node.childNodes.length||c.node.childNodes[c.offset].contentEditable=="false")){var d=document.createTextNode("");this.view.observer.ignore(function(){return f.node.insertBefore(d,f.node.childNodes[f.offset]||null)}),f=h=new gi(d,0),u=!0}var v=this.view.observer.selectionRange;!u&&v.focusNode&&fd(f.node,f.offset,v.anchorNode,v.anchorOffset)&&fd(h.node,h.offset,v.focusNode,v.focusOffset)||(this.view.observer.ignore(function(){Ce.android&&Ce.chrome&&r.dom.contains(v.focusNode)&&function(x,R){for(var M=x;M&&M!=R;M=M.assignedSlot||M.parentNode)if(M.nodeType==1&&M.contentEditable=="false")return!0;return!1}(v.focusNode,r.dom)&&(r.dom.blur(),r.dom.focus({preventScroll:!0}));var p,m,g=cd(r.view.root);if(g)if(l.empty){if(Ce.gecko){var y=(p=f.node,m=f.offset,p.nodeType!=1?0:(m&&p.childNodes[m-1].contentEditable=="false"?1:0)|(m<p.childNodes.length&&p.childNodes[m].contentEditable=="false"?2:0));if(y&&y!=3){var b=p7(f.node,f.offset,y==1?1:-1);b&&(f=new gi(b,y==1?0:b.nodeValue.length))}}g.collapse(f.node,f.offset),l.bidiLevel!=null&&v.cursorBidiLevel!=null&&(v.cursorBidiLevel=l.bidiLevel)}else if(g.extend){g.collapse(f.node,f.offset);try{g.extend(h.node,h.offset)}catch(x){}}else{var w=document.createRange();if(l.anchor>l.head){var j=[h,f];f=j[0],h=j[1]}w.setEnd(h.node,h.offset),w.setStart(f.node,f.offset),g.removeAllRanges(),g.addRange(w)}s&&r.view.root.activeElement==r.dom&&(r.dom.blur(),o&&o.focus())}),this.view.observer.setSelectionRange(f,h)),this.impreciseAnchor=f.precise?null:new gi(v.anchorNode,v.anchorOffset),this.impreciseHead=h.precise?null:new gi(v.focusNode,v.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var r=this.view,i=r.state.selection.main,o=cd(r.root),a=r.observer.selectionRange,s=a.anchorNode,u=a.anchorOffset;if(o&&i.empty&&i.assoc&&o.modify){var c=Xo.find(this,i.head);if(c){var l=c.posAtStart;if(i.head!=l&&i.head!=l+c.length){var f=this.coordsAt(i.head,-1),h=this.coordsAt(i.head,1);if(f&&h&&!(f.bottom>h.top)){var d=this.domAtPos(i.head+i.assoc);o.collapse(d.node,d.offset),o.modify("move",i.assoc<0?"forward":"backward","lineboundary"),r.observer.readSelectionRange();var v=r.observer.selectionRange;r.docView.posFromDOM(v.anchorNode,v.anchorOffset)!=i.from&&o.collapse(s,u)}}}}}}},{key:"nearest",value:function(r){for(var i=r;i;){var o=fr.get(i);if(o&&o.rootView==this)return o;i=i.parentNode}return null}},{key:"posFromDOM",value:function(r,i){var o=this.nearest(r);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(r,i)+o.posAtStart}},{key:"domAtPos",value:function(r){for(var i=this.childCursor().findPos(r,-1),o=i.i,a=i.off;o<this.children.length-1;){var s=this.children[o];if(a<s.length||s instanceof Xo)break;o++,a=0}return this.children[o].domAtPos(a)}},{key:"coordsAt",value:function(r,i){for(var o=this.length,a=this.children.length-1;;a--){var s=this.children[a],u=o-s.breakAfter-s.length;if(r>u||r==u&&s.type!=hr.WidgetBefore&&s.type!=hr.WidgetAfter&&(!a||i==2||this.children[a-1].breakAfter||this.children[a-1].type==hr.WidgetBefore&&i>-2))return s.coordsAt(r-u,i);o=u}}},{key:"measureVisibleLineHeights",value:function(r){for(var i=[],o=r.from,a=r.to,s=this.view.contentDOM.clientWidth,u=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,l=this.view.textDirection==dr.LTR,f=0,h=0;h<this.children.length;h++){var d=this.children[h],v=f+d.length;if(v>a)break;if(f>=o){var p=d.dom.getBoundingClientRect();if(i.push(p.height),u){var m=d.dom.lastChild,g=m?Dl(m):[];if(g.length){var y=g[g.length-1],b=l?y.right-p.left:p.right-y.left;b>c&&(c=b,this.minWidth=s,this.minWidthFrom=f,this.minWidthTo=v)}}}f=v+d.breakAfter}return i}},{key:"textDirectionAt",value:function(r){var i=this.childPos(r,1).i;return getComputedStyle(this.children[i].dom).direction=="rtl"?dr.RTL:dr.LTR}},{key:"measureTextSize",value:function(){var r,i=this,o=at(this.children);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a instanceof Xo){var s=a.measureTextSize();if(s)return s}}}catch(h){o.e(h)}finally{o.f()}var u,c,l,f=document.createElement("div");return f.className="cm-line",f.style.width="99999px",f.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){i.dom.appendChild(f);var h=Dl(f.firstChild)[0];u=f.getBoundingClientRect().height,c=h?h.width/27:7,l=h?h.height:u,f.remove()}),{lineHeight:u,charWidth:c,textHeight:l}}},{key:"childCursor",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.length,i=this.children.length;return i&&(r-=this.children[--i].length),new SA(this.children,r,i)}},{key:"computeBlockGapDeco",value:function(){for(var r=[],i=this.view.viewState,o=0,a=0;;a++){var s=a==i.viewports.length?null:i.viewports[a],u=s?s.from-1:this.length;if(u>o){var c=i.lineBlockAt(u).bottom-i.lineBlockAt(o).top;r.push(Te.replace({widget:new d7(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,u))}if(!s)break;o=s.to+1}return Te.set(r)}},{key:"updateDeco",value:function(){for(var r=this,i=this.view.state.facet(Bl).map(function(a,s){return(r.dynamicDecorationMap[s]=typeof a=="function")?a(r.view):a}),o=i.length;o<i.length+3;o++)this.dynamicDecorationMap[o]=!1;return this.decorations=[].concat(Oe(i),[this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco])}},{key:"scrollIntoView",value:function(r){var i,o=r.range,a=this.coordsAt(o.head,o.empty?o.assoc:o.head>o.anchor?-1:1);if(a){!o.empty&&(i=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(a={left:Math.min(a.left,i.left),top:Math.min(a.top,i.top),right:Math.max(a.right,i.right),bottom:Math.max(a.bottom,i.bottom)});var s=t7(this.view),u={left:a.left-s.left,top:a.top-s.top,right:a.right+s.right,bottom:a.bottom+s.bottom};(function(c,l,f,h,d,v,p,m){for(var g=c.ownerDocument,y=g.defaultView||window,b=c;b;)if(b.nodeType==1){var w=void 0,j=b==g.body;if(j)w=sQ(y);else{if(b.scrollHeight<=b.clientHeight&&b.scrollWidth<=b.clientWidth){b=b.assignedSlot||b.parentNode;continue}var x=b.getBoundingClientRect();w={left:x.left,right:x.left+b.clientWidth,top:x.top,bottom:x.top+b.clientHeight}}var R=0,M=0;if(d=="nearest")l.top<w.top?(M=-(w.top-l.top+p),f>0&&l.bottom>w.bottom+M&&(M=l.bottom-w.bottom+M+p)):l.bottom>w.bottom&&(M=l.bottom-w.bottom+p,f<0&&l.top-M<w.top&&(M=-(w.top+M-l.top+p)));else{var E=l.bottom-l.top,N=w.bottom-w.top;M=(d=="center"&&E<=N?l.top+E/2-N/2:d=="start"||d=="center"&&f<0?l.top-p:l.bottom-N+p)-w.top}if(h=="nearest"?l.left<w.left?(R=-(w.left-l.left+v),f>0&&l.right>w.right+R&&(R=l.right-w.right+R+v)):l.right>w.right&&(R=l.right-w.right+v,f<0&&l.left<w.left+R&&(R=-(w.left+R-l.left+v))):R=(h=="center"?l.left+(l.right-l.left)/2-(w.right-w.left)/2:h=="start"==m?l.left-v:l.right-(w.right-w.left)+v)-w.left,R||M)if(j)y.scrollBy(R,M);else{var A=0,L=0;if(M){var W=b.scrollTop;b.scrollTop+=M,L=b.scrollTop-W}if(R){var O=b.scrollLeft;b.scrollLeft+=R,A=b.scrollLeft-O}l={left:l.left-A,top:l.top-L,right:l.right-A,bottom:l.bottom-L},A&&Math.abs(A-R)<1&&(h="nearest"),L&&Math.abs(L-M)<1&&(d="nearest")}if(j)break;b=b.assignedSlot||b.parentNode}else{if(b.nodeType!=11)break;b=b.host}})(this.view.scrollDOM,u,o.head<o.anchor?-1:1,r.x,r.y,r.xMargin,r.yMargin,this.view.textDirection==dr.LTR)}}}]),n}(),d7=function(e){Ot(n,ss);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).height=r,i}return tt(n,[{key:"toDOM",value:function(){var r=document.createElement("div");return this.updateDOM(r),r}},{key:"eq",value:function(r){return r.height==this.height}},{key:"updateDOM",value:function(r){return r.style.height=this.height+"px",!0}},{key:"estimatedHeight",get:function(){return this.height}}]),n}();function v7(e){var t=e.observer.selectionRange,n=t.focusNode&&p7(t.focusNode,t.focusOffset,0);if(!n)return null;var r=e.docView.nearest(n);if(!r)return null;if(r instanceof Xo){for(var i=n;i.parentNode!=r.dom;)i=i.parentNode;for(var o=i.previousSibling;o&&!fr.get(o);)o=o.previousSibling;var a=o?fr.get(o).posAtEnd:r.posAtStart;return{from:a,to:a,node:i,text:n}}for(;;){var s=r.parent;if(!s)return null;if(s instanceof Xo)break;r=s}var u=r.posAtStart;return{from:u,to:u+r.length,node:r.dom,text:n}}var gQ=function(e){Ot(n,ss);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this)).top=r,a.text=i,a.topView=o,a}return tt(n,[{key:"eq",value:function(r){return this.top==r.top&&this.text==r.text}},{key:"toDOM",value:function(){return this.top}},{key:"ignoreEvent",value:function(){return!1}},{key:"customView",get:function(){return PA}}]),n}();function p7(e,t,n){if(n<=0)for(var r=e,i=t;;){if(r.nodeType==3)return r;if(!(r.nodeType==1&&i>0))break;i=as(r=r.childNodes[i-1])}if(n>=0)for(var o=e,a=t;;){if(o.nodeType==3)return o;if(!(o.nodeType==1&&a<o.childNodes.length&&n>=0))break;o=o.childNodes[a],a=0}return null}var yQ=function(){function e(){X(this,e),this.changes=[]}return tt(e,[{key:"compareRange",value:function(t,n){e1(t,n,this.changes)}},{key:"comparePoint",value:function(t,n){e1(t,n,this.changes)}}]),e}();function bQ(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function wQ(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function l1(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function m7(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function g7(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function f1(e,t,n){for(var r,i,o,a,s,u,c,l,f=!1,h=e.firstChild;h;h=h.nextSibling)for(var d=Dl(h),v=0;v<d.length;v++){var p=d[v];i&&l1(i,p)&&(p=m7(g7(p,i.bottom),i.top));var m=bQ(t,p),g=wQ(n,p);if(m==0&&g==0)return h.nodeType==3?y7(h,t,n):f1(h,t,n);if(!r||a>g||a==g&&o>m){r=h,i=p,o=m,a=g;var y=g?n<p.top?-1:1:m?t<p.left?-1:1:0;f=!y||(y>0?v<d.length-1:v>0)}m==0?n>p.bottom&&(!c||c.bottom<p.bottom)?(s=h,c=p):n<p.top&&(!l||l.top>p.top)&&(u=h,l=p):c&&l1(c,p)?c=g7(c,p.bottom):l&&l1(l,p)&&(l=m7(l,p.top))}if(c&&c.bottom>=n?(r=s,i=c):l&&l.top<=n&&(r=u,i=l),!r)return{node:e,offset:0};var b=Math.max(i.left,Math.min(i.right,t));return r.nodeType==3?y7(r,b,n):f&&r.contentEditable!="false"?f1(r,b,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(i.left+i.right)/2?1:0)}}function y7(e,t,n){for(var r=e.nodeValue.length,i=-1,o=1e9,a=0,s=0;s<r;s++)for(var u=hc(e,s,s+1).getClientRects(),c=0;c<u.length;c++){var l=u[c];if(l.top!=l.bottom){a||(a=t-l.left);var f=(l.top>n?l.top-n:n-l.bottom)-1;if(l.left-1<=t&&l.right+1>=t&&f<o){var h=t>=(l.left+l.right)/2,d=h;if((Ce.chrome||Ce.gecko)&&hc(e,s).getBoundingClientRect().left==l.right&&(d=!h),f<=0)return{node:e,offset:s+(d?1:0)};i=s+(d?1:0),o=f}}}return{node:e,offset:i>-1?i:a>0?e.nodeValue.length:0}}function b7(e,t,n){var r,i,o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,s=e.contentDOM.getBoundingClientRect(),u=s.top+e.viewState.paddingTop,c=e.viewState.docHeight,l=t.x,f=t.y,h=f-u;if(h<0)return 0;if(h>c)return e.state.doc.length;for(var d=e.defaultLineHeight/2,v=!1;(o=e.elementAtHeight(h)).type!=hr.Text;)for(;!((h=a>0?o.bottom+d:o.top-d)>=0&&h<=c);){if(v)return n?null:0;v=!0,a=-a}f=u+h;var p=o.from;if(p<e.viewport.from)return e.viewport.from==0?0:n?null:w7(e,s,o,l,f);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:w7(e,s,o,l,f);var m=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:m,y=g.elementFromPoint(l,f);y&&!e.contentDOM.contains(y)&&(y=null),y||(l=Math.max(s.left+1,Math.min(s.right-1,l)),(y=g.elementFromPoint(l,f))&&!e.contentDOM.contains(y)&&(y=null));var b,w=-1;if(y&&((r=e.docView.nearest(y))===null||r===void 0?void 0:r.isEditable)!=0){if(m.caretPositionFromPoint){var j=m.caretPositionFromPoint(l,f);j&&(b=j.offsetNode,w=j.offset)}else if(m.caretRangeFromPoint){var x=m.caretRangeFromPoint(l,f);x&&(b=x.startContainer,w=x.startOffset,(!e.contentDOM.contains(b)||Ce.safari&&function(A,L,W){var O;if(A.nodeType!=3||L!=(O=A.nodeValue.length))return!1;for(var I=A.nextSibling;I;I=I.nextSibling)if(I.nodeType!=1||I.nodeName!="BR")return!1;return hc(A,O-1,O).getBoundingClientRect().left>W}(b,w,l)||Ce.chrome&&function(A,L,W){if(L!=0)return!1;for(var O=A;;){var I=O.parentNode;if(!I||I.nodeType!=1||I.firstChild!=O)return!1;if(I.classList.contains("cm-line"))break;O=I}var q=A.nodeType==1?A.getBoundingClientRect():hc(A,0,Math.max(A.nodeValue.length,1)).getBoundingClientRect();return W-q.left>5}(b,w,l))&&(b=void 0))}}if(!b||!e.docView.dom.contains(b)){var R=Xo.find(e.docView,p);if(!R)return h>o.top+o.height/2?o.to:o.from;var M=f1(R.dom,l,f);b=M.node,w=M.offset}var E=e.docView.nearest(b);if(!E)return null;if(E.isWidget&&((i=E.dom)===null||i===void 0?void 0:i.nodeType)==1){var N=E.dom.getBoundingClientRect();return t.y<N.top||t.y<=N.bottom&&t.x<=(N.left+N.right)/2?E.posAtStart:E.posAtEnd}return E.localPosFromDOM(b,w)+E.posAtStart}function w7(e,t,n,r,i){var o=Math.round((r-t.left)*e.defaultCharacterWidth);e.lineWrapping&&n.height>1.5*e.defaultLineHeight&&(o+=Math.floor((i-n.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength);var a=e.state.sliceDoc(n.from,n.to);return n.from+L0(a,o,e.state.tabSize)}function h1(e,t){var n=e.lineBlockAt(t);if(Array.isArray(n.type)){var r,i=at(n.type);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.to>t||o.to==t&&(o.to==n.to||o.type==hr.Text))return o}}catch(a){i.e(a)}finally{i.f()}}return n}function x7(e,t,n,r){for(var i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),a=e.textDirectionAt(i.from),s=t,u=null;;){var c=mQ(i,o,a,s,n),l=u7;if(!c){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
|
`,i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),c=Ht.cursor(n?i.from:i.to)}if(u){if(!u(l))return s}else{if(!r)return c;u=r(l)}s=c}}function gd(e,t,n){for(var r=function(){var o,a=0,s=at(e);try{for(s.s();!(o=s.n()).done;)o.value.between(t-1,t+1,function(u,c,l){if(t>u&&t<c){var f=a||n||(t-u<c-t?-1:1);t=f<0?u:c,a=f}})}catch(u){s.e(u)}finally{s.f()}if(!a)return{v:t}};;){var i=r();if(ee(i)==="object")return i.v}}function d1(e,t,n){var r=gd(e.state.facet(a1).map(function(i){return i(e)}),n.from,t.head>n.from?-1:1);return r==n.from?n:Ht.cursor(r,r<n.from?1:-1)}var xQ=function(){function e(t){var n=this;X(this,e),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;var r=function(a,s){n.ignoreDuringComposition(s)||s.type=="keydown"&&n.keydown(t,s)||(n.mustFlushObserver(s)&&t.observer.forceFlush(),n.runCustomHandlers(s.type,t,s)?s.preventDefault():a(t,s))},i=function(){var a=Or[o];t.contentDOM.addEventListener(o,function(s){S7(t,s)&&r(a,s)},v1[o]),n.registeredEvents.push(o)};for(var o in Or)i();t.scrollDOM.addEventListener("mousedown",function(a){if(a.target==t.scrollDOM&&a.clientY>t.contentDOM.getBoundingClientRect().bottom&&(r(Or.mousedown,a),!a.defaultPrevented&&a.button==2)){var s=t.contentDOM.style.minHeight;t.contentDOM.style.minHeight="100%",setTimeout(function(){return t.contentDOM.style.minHeight=s},200)}}),t.scrollDOM.addEventListener("drop",function(a){a.target==t.scrollDOM&&a.clientY>t.contentDOM.getBoundingClientRect().bottom&&r(Or.drop,a)}),Ce.chrome&&Ce.chrome_version==102&&t.scrollDOM.addEventListener("wheel",function(){n.chromeScrollHack<0?t.contentDOM.style.pointerEvents="none":window.clearTimeout(n.chromeScrollHack),n.chromeScrollHack=setTimeout(function(){n.chromeScrollHack=-1,t.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=t.hasFocus,Ce.safari&&t.contentDOM.addEventListener("input",function(){return null})}return tt(e,[{key:"setSelectionOrigin",value:function(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(t,n){var r,i,o=this;this.customHandlers=[];var a,s=at(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(i=(r=u.update(t).spec)===null||r===void 0?void 0:r.domEventHandlers){this.customHandlers.push({plugin:u.value,handlers:i});var c=function(f){o.registeredEvents.indexOf(f)<0&&f!="scroll"&&(o.registeredEvents.push(f),t.contentDOM.addEventListener(f,function(h){S7(t,h)&&o.runCustomHandlers(f,t,h)&&h.preventDefault()}))};for(var l in i)c(l)}}}catch(f){s.e(f)}finally{s.f()}}},{key:"runCustomHandlers",value:function(t,n,r){var i,o=at(this.customHandlers);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.handlers[t];if(s)try{if(s.call(a.plugin,r,n)||r.defaultPrevented)return!0}catch(u){Mi(n.state,u)}}}catch(u){o.e(u)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(t,n){this.lastScrollTop=t.scrollDOM.scrollTop,this.lastScrollLeft=t.scrollDOM.scrollLeft;var r,i=at(this.customHandlers);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=o.handlers.scroll;if(a)try{a.call(o.plugin,n,t)}catch(s){Mi(t.state,s)}}}catch(s){i.e(s)}finally{i.f()}}},{key:"keydown",value:function(t,n){var r,i=this;return this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()<this.lastEscPress+2e3||(n.keyCode!=27&&j7.indexOf(n.keyCode)<0&&(t.inputState.lastEscPress=0),!Ce.android||!Ce.chrome||n.synthetic||n.keyCode!=13&&n.keyCode!=8?!(!Ce.ios||n.synthetic||n.altKey||n.metaKey||!((r=k7.find(function(o){return o.keyCode==n.keyCode}))&&!n.ctrlKey||kQ.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey))&&(this.pendingIOSKey=r||n,setTimeout(function(){return i.flushIOSKey(t)},250),!0):(t.observer.delayAndroidKey(n.key,n.keyCode),!0))}},{key:"flushIOSKey",value:function(t){var n=this.pendingIOSKey;return!!n&&(this.pendingIOSKey=void 0,dc(t.contentDOM,n.key,n.keyCode))}},{key:"ignoreDuringComposition",value:function(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(Ce.safari&&!Ce.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}},{key:"mustFlushObserver",value:function(t){return t.type=="keydown"&&t.keyCode!=229}},{key:"startMouseSelection",value:function(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}},{key:"update",value:function(t){this.mouseSelection&&this.mouseSelection.update(t),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),e}(),k7=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],kQ="dthko",j7=[16,17,18,20,91,92,224,225];function yd(e){return .7*Math.max(0,e)+8}var jQ=function(){function e(t,n,r,i){X(this,e),this.view=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=function(a){for(var s=a.ownerDocument,u=a.parentNode;u&&u!=s.body;)if(u.nodeType==1){if(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)return u;u=u.assignedSlot||u.parentNode}else{if(u.nodeType!=11)break;u=u.host}return null}(t.contentDOM),this.atoms=t.state.facet(a1).map(function(a){return a(t)});var o=t.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(Hn.allowMultipleSelections)&&function(a,s){var u=a.state.facet(VA);return u.length?u[0](s):Ce.mac?s.metaKey:s.ctrlKey}(t,n),this.dragMove=function(a,s){var u=a.state.facet(WA);return u.length?u[0](s):Ce.mac?!s.altKey:!s.ctrlKey}(t,n),this.dragging=!(!function(a,s){var u=a.state.selection.main;if(u.empty)return!1;var c=cd(a.root);if(!c||c.rangeCount==0)return!0;for(var l=c.getRangeAt(0).getClientRects(),f=0;f<l.length;f++){var h=l[f];if(h.left<=s.clientX&&h.right>=s.clientX&&h.top<=s.clientY&&h.bottom>=s.clientY)return!0}return!1}(t,n)||R7(n)!=1)&&null}return tt(e,[{key:"start",value:function(t){this.dragging===!1&&(t.preventDefault(),this.select(t))}},{key:"move",value:function(t){var n;if(t.buttons==0)return this.destroy();if(this.dragging===!1){this.select(this.lastEvent=t);var r=0,i=0,o=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=t7(this.view);t.clientX-a.left<=o.left+6?r=-yd(o.left-t.clientX):t.clientX+a.right>=o.right-6&&(r=yd(t.clientX-o.right)),t.clientY-a.top<=o.top+6?i=-yd(o.top-t.clientY):t.clientY+a.bottom>=o.bottom-6&&(i=yd(t.clientY-o.bottom)),this.setScrollSpeed(r,i)}}},{key:"up",value:function(t){this.dragging==null&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(t,n){var r=this;this.scrollSpeed={x:t,y:n},t||n?this.scrolling<0&&(this.scrolling=setInterval(function(){return r.scroll()},50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}},{key:"skipAtoms",value:function(t){for(var n=null,r=0;r<t.ranges.length;r++){var i=t.ranges[r],o=null;if(i.empty){var a=gd(this.atoms,i.from,0);a!=i.from&&(o=Ht.cursor(a,-1))}else{var s=gd(this.atoms,i.from,-1),u=gd(this.atoms,i.to,1);s==i.from&&u==i.to||(o=Ht.range(i.from==i.anchor?s:u,i.from==i.head?s:u))}o&&(n||(n=t.ranges.slice()),n[r]=o)}return n?Ht.create(n,t.mainIndex):t}},{key:"select",value:function(t){var n=this.view,r=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&r.eq(n.state.selection)&&r.main.assoc==n.state.selection.main.assoc||this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(t){var n=this;t.docChanged&&this.dragging&&(this.dragging=this.dragging.map(t.changes)),this.style.update(t)&&setTimeout(function(){return n.select(n.lastEvent)},20)}}]),e}();function S7(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||r.nodeType==11||(n=fr.get(r))&&n.ignoreEvent(t))return!1;return!0}var Or=Object.create(null),v1=Object.create(null),C7=Ce.ie&&Ce.ie_version<15||Ce.ios&&Ce.webkit_version<604;function $7(e,t){var n,r=e.state,i=1,o=r.toText(t),a=o.lines==r.selection.ranges.length,s=p1!=null&&r.selection.ranges.every(function(c){return c.empty})&&p1==o.toString();if(s){var u=-1;n=r.changeByRange(function(c){var l=r.doc.lineAt(c.from);if(l.from==u)return{range:c};u=l.from;var f=r.toText((a?o.line(i++).text:t)+r.lineBreak);return{changes:{from:l.from,insert:f},range:Ht.cursor(c.from+f.length)}})}else n=a?r.changeByRange(function(c){var l=o.line(i++);return{changes:{from:c.from,to:c.to,insert:l.text},range:Ht.cursor(c.from+l.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function _7(e,t,n,r){if(r==1)return Ht.cursor(t,n);if(r==2)return function(u,c){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=u.charCategorizer(c),h=u.doc.lineAt(c),d=c-h.from;if(h.length==0)return Ht.cursor(c);d==0?l=1:d==h.length&&(l=-1);var v=d,p=d;l<0?v=si(h.text,d,!1):p=si(h.text,d);for(var m=f(h.text.slice(v,p));v>0;){var g=si(h.text,v,!1);if(f(h.text.slice(g,v))!=m)break;v=g}for(;p<h.length;){var y=si(h.text,p);if(f(h.text.slice(p,y))!=m)break;p=y}return Ht.range(v+h.from,p+h.from)}(e.state,t,n);var i=Xo.find(e.docView,t),o=e.state.doc.lineAt(i?i.posAtEnd:t),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return s<e.state.doc.length&&s==o.to&&s++,Ht.range(a,s)}Or.keydown=function(e,t){e.inputState.setSelectionOrigin("select"),t.keyCode==27&&(e.inputState.lastEscPress=Date.now())},Or.touchstart=function(e,t){e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},Or.touchmove=function(e){e.inputState.setSelectionOrigin("select.pointer")},v1.touchstart=v1.touchmove={passive:!0},Or.mousedown=function(e,t){if(e.observer.flush(),!(e.inputState.lastTouchTime>Date.now()-2e3)){var n,r=null,i=at(e.state.facet(qA));try{for(i.s();!(n=i.n()).done&&!(r=(0,n.value)(e,t)););}catch(a){i.e(a)}finally{i.f()}if(r||t.button!=0||(r=function(a,s){var u=E7(a,s),c=R7(s),l=a.state.selection;return{update:function(f){f.docChanged&&(u.pos=f.changes.mapPos(u.pos),l=l.map(f.changes))},get:function(f,h,d){var v,p=E7(a,f),m=_7(a,p.pos,p.bias,c);if(u.pos!=p.pos&&!h){var g=_7(a,u.pos,u.bias,c),y=Math.min(g.from,m.from),b=Math.max(g.to,m.to);m=y<m.from?Ht.range(y,b):Ht.range(b,y)}return h?l.replaceRange(l.main.extend(m.from,m.to)):d&&c==1&&l.ranges.length>1&&(v=function(w,j){for(var x=0;x<w.ranges.length;x++){var R=w.ranges[x],M=R.from,E=R.to;if(M<=j&&E>=j)return Ht.create(w.ranges.slice(0,x).concat(w.ranges.slice(x+1)),w.mainIndex==x?0:w.mainIndex-(w.mainIndex>x?1:0))}return null}(l,p.pos))?v:d?l.addRange(m):Ht.create([m])}}}(e,t)),r){var o=e.root.activeElement!=e.contentDOM;e.inputState.startMouseSelection(new jQ(e,t,r,o)),o&&e.observer.ignore(function(){return xA(e.contentDOM)}),e.inputState.mouseSelection&&e.inputState.mouseSelection.start(t)}}};var O7=function(e,t){return e>=t.top&&e<=t.bottom},M7=function(e,t,n){return O7(t,n)&&e>=n.left&&e<=n.right};function SQ(e,t,n,r){var i=Xo.find(e.docView,t);if(!i)return 1;var o=t-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;var a=i.coordsAt(o,-1);if(a&&M7(n,r,a))return-1;var s=i.coordsAt(o,1);return s&&M7(n,r,s)?1:a&&O7(r,a)?-1:1}function E7(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:SQ(e,n,t.clientX,t.clientY)}}var CQ=Ce.ie&&Ce.ie_version<=11,A7=null,P7=0,T7=0;function R7(e){if(!CQ)return e.detail;var t=A7,n=T7;return A7=e,T7=Date.now(),P7=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(P7+1)%3:1}function N7(e,t,n,r){if(n){var i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();var o=e.inputState.mouseSelection,a=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,s={from:i,insert:n},u=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"})}}Or.dragstart=function(e,t){var n=e.state.selection.main,r=e.inputState.mouseSelection;r&&(r.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")},Or.drop=function(e,t){if(t.dataTransfer){if(e.state.readOnly)return t.preventDefault();var n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();for(var r=Array(n.length),i=0,o=function(){++i==n.length&&N7(e,t,r.filter(function(u){return u!=null}).join(e.state.lineBreak),!1)},a=function(u){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(r[u]=c.result),o()},c.readAsText(n[u])},s=0;s<n.length;s++)a(s)}else N7(e,t,t.dataTransfer.getData("Text"),!0)}},Or.paste=function(e,t){if(e.state.readOnly)return t.preventDefault();e.observer.flush();var n=C7?null:t.clipboardData;n?($7(e,n.getData("text/plain")||n.getData("text/uri-text")),t.preventDefault()):function(r){var i=r.dom.parentNode;if(i){var o=i.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout(function(){r.focus(),o.remove(),$7(r,o.value)},50)}}(e)};var p1=null;Or.copy=Or.cut=function(e,t){var n=function(s){var u,c=[],l=[],f=!1,h=at(s.selection.ranges);try{for(h.s();!(u=h.n()).done;){var d=u.value;d.empty||(c.push(s.sliceDoc(d.from,d.to)),l.push(d))}}catch(b){h.e(b)}finally{h.f()}if(!c.length){var v,p=-1,m=at(s.selection.ranges);try{for(m.s();!(v=m.n()).done;){var g=v.value.from,y=s.doc.lineAt(g);y.number>p&&(c.push(y.text),l.push({from:y.from,to:Math.min(s.doc.length,y.to+1)})),p=y.number}}catch(b){m.e(b)}finally{m.f()}f=!0}return{text:c.join(s.lineBreak),ranges:l,linewise:f}}(e.state),r=n.text,i=n.ranges,o=n.linewise;if(r||o){p1=o?r:null;var a=C7?null:t.clipboardData;a?(t.preventDefault(),a.clearData(),a.setData("text/plain",r)):function(s,u){var c=s.dom.parentNode;if(c){var l=c.appendChild(document.createElement("textarea"));l.style.cssText="position: fixed; left: -10000px; top: 10px",l.value=u,l.focus(),l.selectionEnd=u.length,l.selectionStart=0,setTimeout(function(){l.remove(),s.focus()},50)}}(e,r),t.type!="cut"||e.state.readOnly||e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})}};var I7=rs.define();function D7(e,t){var n,r=[],i=at(e.facet(JA));try{for(i.s();!(n=i.n()).done;){var o=(0,n.value)(e,t);o&&r.push(o)}}catch(a){i.e(a)}finally{i.f()}return r?e.update({effects:r,annotations:I7.of(!0)}):null}function L7(e){setTimeout(function(){var t=e.hasFocus;if(t!=e.inputState.notifiedFocused){var n=D7(e.state,t);n?e.dispatch(n):e.update([])}},10)}Or.focus=function(e){e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),L7(e)},Or.blur=function(e){e.observer.clearSelectionRange(),L7(e)},Or.compositionstart=Or.compositionupdate=function(e){e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},Or.compositionend=function(e){e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Ce.chrome&&Ce.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(function(){return e.observer.flush()}):setTimeout(function(){e.inputState.composing<0&&e.docView.compositionDeco.size&&e.update([])},50)},Or.contextmenu=function(e){e.inputState.lastContextMenu=Date.now()},Or.beforeinput=function(e,t){var n,r;if(Ce.chrome&&Ce.android&&(r=k7.find(function(o){return o.inputType==t.inputType}))&&(e.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){var i=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(function(){var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>i+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}};var B7=["pre-wrap","normal","pre-line","break-spaces"],$Q=function(){function e(t){X(this,e),this.lineWrapping=t,this.doc=Tn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}return tt(e,[{key:"heightForGap",value:function(t,n){var r=this.doc.lineAt(n).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-t-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}},{key:"heightForLine",value:function(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(t){return this.doc=t,this}},{key:"mustRefreshForWrapping",value:function(t){return B7.indexOf(t)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(t){for(var n=!1,r=0;r<t.length;r++){var i=t[r];i<0?r++:this.heightSamples[Math.floor(10*i)]||(n=!0,this.heightSamples[Math.floor(10*i)]=!0)}return n}},{key:"refresh",value:function(t,n,r,i,o,a){var s=B7.indexOf(t)>-1,u=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,u){this.heightSamples={};for(var c=0;c<a.length;c++){var l=a[c];l<0?c++:this.heightSamples[Math.floor(10*l)]=!0}}return u}}]),e}(),_Q=function(){function e(t,n){X(this,e),this.from=t,this.heights=n,this.index=0}return tt(e,[{key:"more",get:function(){return this.index<this.heights.length}}]),e}(),us=function(){function e(t,n,r,i,o){X(this,e),this.from=t,this.length=n,this.top=r,this.height=i,this._content=o}return tt(e,[{key:"type",get:function(){return typeof this._content=="number"?hr.Text:Array.isArray(this._content)?this._content:this._content.type}},{key:"to",get:function(){return this.from+this.length}},{key:"bottom",get:function(){return this.top+this.height}},{key:"widget",get:function(){return this._content instanceof pc?this._content.widget:null}},{key:"widgetLineBreaks",get:function(){return typeof this._content=="number"?this._content:0}},{key:"join",value:function(t){var n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}}]),e}(),Yn=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(Yn||(Yn={})),bd=.001,yo=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:2;X(this,e),this.length=t,this.height=n,this.flags=r}return tt(e,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(t){this.flags=(t?2:0)|-3&this.flags}},{key:"setHeight",value:function(t,n){this.height!=n&&(Math.abs(this.height-n)>bd&&(t.heightChanged=!0),this.height=n)}},{key:"replace",value:function(t,n,r){return e.of(r)}},{key:"decomposeLeft",value:function(t,n){n.push(this)}},{key:"decomposeRight",value:function(t,n){n.push(this)}},{key:"applyChanges",value:function(t,n,r,i){for(var o=this,a=r.doc,s=i.length-1;s>=0;s--){var u=i[s],c=u.fromA,l=u.toA,f=u.fromB,h=u.toB,d=o.lineAt(c,Yn.ByPosNoHeight,r.setDoc(n),0,0),v=d.to>=l?d:o.lineAt(l,Yn.ByPosNoHeight,r,0,0);for(h+=v.to-l,l=v.to;s>0&&d.from<=i[s-1].toA;)c=i[s-1].fromA,f=i[s-1].fromB,s--,c<d.from&&(d=o.lineAt(c,Yn.ByPosNoHeight,r,0,0));f+=d.from-c,c=d.from;var p=MQ.build(r.setDoc(a),t,f,h);o=o.replace(c,l,p)}return o.updateHeight(r,0)}}],[{key:"empty",value:function(){return new ea(0,0)}},{key:"of",value:function(t){if(t.length==1)return t[0];for(var n=0,r=t.length,i=0,o=0;;)if(n==r)if(i>2*o){var a=t[n-1];a.break?t.splice(--n,1,a.left,null,a.right):t.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else{if(!(o>2*i))break;var s=t[r];s.break?t.splice(r,1,s.left,null,s.right):t.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else if(i<o){var u=t[n++];u&&(i+=u.size)}else{var c=t[--r];c&&(o+=c.size)}var l=0;return t[n-1]==null?(l=1,n--):t[n]==null&&(l=1,r++),new OQ(e.of(t.slice(0,n)),l,e.of(t.slice(r)))}}]),e}();yo.prototype.size=1;var z7=function(e){Ot(n,yo);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this,r,i)).deco=o,a}return tt(n,[{key:"blockAt",value:function(r,i,o,a){return new us(a,this.length,o,this.height,this.deco||0)}},{key:"lineAt",value:function(r,i,o,a,s){return this.blockAt(0,o,a,s)}},{key:"forEachLine",value:function(r,i,o,a,s,u){r<=s+this.length&&i>=s&&u(this.blockAt(0,o,a,s))}},{key:"updateHeight",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=i&&o.more&&this.setHeight(r,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),n}(),ea=function(e){Ot(n,z7);var t=Mt(n);function n(r,i){var o;return X(this,n),(o=t.call(this,r,i,null)).collapsed=0,o.widgetHeight=0,o.breaks=0,o}return tt(n,[{key:"blockAt",value:function(r,i,o,a){return new us(a,this.length,o,this.height,this.breaks)}},{key:"replace",value:function(r,i,o){var a=o[0];return o.length==1&&(a instanceof n||a instanceof bc&&4&a.flags)&&Math.abs(this.length-a.length)<10?(a instanceof bc?a=new n(a.length,this.height):a.height=this.height,this.outdated||(a.outdated=!1),a):yo.of(o)}},{key:"updateHeight",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=arguments.length>3?arguments[3]:void 0;return a&&a.from<=i&&a.more?this.setHeight(r,a.heights[a.index++]):(o||this.outdated)&&this.setHeight(r,Math.max(this.widgetHeight,r.heightForLine(this.length-this.collapsed))+this.breaks*r.lineHeight),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),n}(),bc=function(e){Ot(n,yo);var t=Mt(n);function n(r){return X(this,n),t.call(this,r,0)}return tt(n,[{key:"heightMetrics",value:function(r,i){var o,a=r.doc.lineAt(i).number,s=r.doc.lineAt(i+this.length).number,u=s-a+1,c=0;if(r.lineWrapping){var l=Math.min(this.height,r.lineHeight*u);o=l/u,this.length>u+1&&(c=(this.height-l)/(this.length-u-1))}else o=this.height/u;return{firstLine:a,lastLine:s,perLine:o,perChar:c}}},{key:"blockAt",value:function(r,i,o,a){var s=this.heightMetrics(i,a),u=s.firstLine,c=s.lastLine,l=s.perLine,f=s.perChar;if(i.lineWrapping){var h=a+Math.round(Math.max(0,Math.min(1,(r-o)/this.height))*this.length),d=i.doc.lineAt(h),v=l+d.length*f,p=Math.max(o,r-v/2);return new us(d.from,d.length,p,v,0)}var m=Math.max(0,Math.min(c-u,Math.floor((r-o)/l))),g=i.doc.line(u+m),y=g.from,b=g.length;return new us(y,b,o+l*m,l,0)}},{key:"lineAt",value:function(r,i,o,a,s){if(i==Yn.ByHeight)return this.blockAt(r,o,a,s);if(i==Yn.ByPosNoHeight){var u=o.doc.lineAt(r),c=u.from,l=u.to;return new us(c,l-c,0,0,0)}var f=this.heightMetrics(o,s),h=f.firstLine,d=f.perLine,v=f.perChar,p=o.doc.lineAt(r),m=d+p.length*v,g=p.number-h,y=a+d*g+v*(p.from-s-g);return new us(p.from,p.length,Math.max(a,Math.min(y,a+this.height-m)),m,0)}},{key:"forEachLine",value:function(r,i,o,a,s,u){r=Math.max(r,s),i=Math.min(i,s+this.length);for(var c=this.heightMetrics(o,s),l=c.firstLine,f=c.perLine,h=c.perChar,d=r,v=a;d<=i;){var p=o.doc.lineAt(d);if(d==r){var m=p.number-l;v+=f*m+h*(r-s-m)}var g=f+h*p.length;u(new us(p.from,p.length,v,g,0)),v+=g,d=p.to+1}}},{key:"replace",value:function(r,i,o){var a=this.length-i;if(a>0){var s=o[o.length-1];s instanceof n?o[o.length-1]=new n(s.length+a):o.push(null,new n(a-1))}if(r>0){var u=o[0];u instanceof n?o[0]=new n(r+u.length):o.unshift(new n(r-1),null)}return yo.of(o)}},{key:"decomposeLeft",value:function(r,i){i.push(new n(r-1),null)}},{key:"decomposeRight",value:function(r,i){i.push(null,new n(this.length-r-1))}},{key:"updateHeight",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=arguments.length>3?arguments[3]:void 0,s=i+this.length;if(a&&a.from<=i+this.length&&a.more){var u=[],c=Math.max(i,a.from),l=-1;for(a.from>i&&u.push(new n(a.from-i-1).updateHeight(r,i));c<=s&&a.more;){var f=r.doc.lineAt(c).length;u.length&&u.push(null);var h=a.heights[a.index++];l==-1?l=h:Math.abs(h-l)>=bd&&(l=-2);var d=new ea(f,h);d.outdated=!1,u.push(d),c+=f+1}c<=s&&u.push(null,new n(s-c).updateHeight(r,c));var v=yo.of(u);return(l<0||Math.abs(v.height-this.height)>=bd||Math.abs(l-this.heightMetrics(r,i).perLine)>=bd)&&(r.heightChanged=!0),v}return(o||this.outdated)&&(this.setHeight(r,r.heightForGap(i,i+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),n}(),OQ=function(e){Ot(n,yo);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this,r.length+i+o.length,r.height+o.height,i|(r.outdated||o.outdated?2:0))).left=r,a.right=o,a.size=r.size+o.size,a}return tt(n,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(r,i,o,a){var s=o+this.left.height;return r<s?this.left.blockAt(r,i,o,a):this.right.blockAt(r,i,s,a+this.left.length+this.break)}},{key:"lineAt",value:function(r,i,o,a,s){var u=a+this.left.height,c=s+this.left.length+this.break,l=i==Yn.ByHeight?r<u:r<c,f=l?this.left.lineAt(r,i,o,a,s):this.right.lineAt(r,i,o,u,c);if(this.break||(l?f.to<c:f.from>c))return f;var h=i==Yn.ByPosNoHeight?Yn.ByPosNoHeight:Yn.ByPos;return l?f.join(this.right.lineAt(c,h,o,u,c)):this.left.lineAt(c,h,o,a,s).join(f)}},{key:"forEachLine",value:function(r,i,o,a,s,u){var c=a+this.left.height,l=s+this.left.length+this.break;if(this.break)r<l&&this.left.forEachLine(r,i,o,a,s,u),i>=l&&this.right.forEachLine(r,i,o,c,l,u);else{var f=this.lineAt(l,Yn.ByPos,o,a,s);r<f.from&&this.left.forEachLine(r,f.from-1,o,a,s,u),f.to>=r&&f.from<=i&&u(f),i>f.to&&this.right.forEachLine(f.to+1,i,o,c,l,u)}}},{key:"replace",value:function(r,i,o){var a=this.left.length+this.break;if(i<a)return this.balanced(this.left.replace(r,i,o),this.right);if(r>this.left.length)return this.balanced(this.left,this.right.replace(r-a,i-a,o));var s=[];r>0&&this.decomposeLeft(r,s);var u,c=s.length,l=at(o);try{for(l.s();!(u=l.n()).done;){var f=u.value;s.push(f)}}catch(d){l.e(d)}finally{l.f()}if(r>0&&F7(s,c-1),i<this.length){var h=s.length;this.decomposeRight(i,s),F7(s,h)}return yo.of(s)}},{key:"decomposeLeft",value:function(r,i){var o=this.left.length;if(r<=o)return this.left.decomposeLeft(r,i);i.push(this.left),this.break&&r>=++o&&i.push(null),r>o&&this.right.decomposeLeft(r-o,i)}},{key:"decomposeRight",value:function(r,i){var o=this.left.length,a=o+this.break;if(r>=a)return this.right.decomposeRight(r-a,i);r<o&&this.left.decomposeRight(r,i),this.break&&r<a&&i.push(null),i.push(this.right)}},{key:"balanced",value:function(r,i){return r.size>2*i.size||i.size>2*r.size?yo.of(this.break?[r,null,i]:[r,i]):(this.left=r,this.right=i,this.height=r.height+i.height,this.outdated=r.outdated||i.outdated,this.size=r.size+i.size,this.length=r.length+this.break+i.length,this)}},{key:"updateHeight",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=arguments.length>3?arguments[3]:void 0,s=this.left,u=this.right,c=i+s.length+this.break,l=null;return a&&a.from<=i+s.length&&a.more?l=s=s.updateHeight(r,i,o,a):s.updateHeight(r,i,o),a&&a.from<=c+u.length&&a.more?l=u=u.updateHeight(r,c,o,a):u.updateHeight(r,c,o),l?this.balanced(s,u):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),n}();function F7(e,t){var n,r;e[t]==null&&(n=e[t-1])instanceof bc&&(r=e[t+1])instanceof bc&&e.splice(t-1,3,new bc(n.length+1+r.length))}var MQ=function(){function e(t,n){X(this,e),this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}return tt(e,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(t,n){if(this.lineStart>-1){var r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof ea?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new ea(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}},{key:"point",value:function(t,n,r){if(t<n||r.heightRelevant){var i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);var a=n-t;r.block?this.addBlock(new z7(a,i,r)):(a||o||i>=5)&&this.addLineDeco(i,o,a)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}},{key:"enterLine",value:function(){if(!(this.lineStart>-1)){var t=this.oracle.doc.lineAt(this.pos),n=t.from,r=t.to;this.lineStart=n,this.lineEnd=r,this.writtenTo<n&&((this.writtenTo<n-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,n-1)),this.nodes.push(null)),this.pos>n&&this.nodes.push(new ea(this.pos-n,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(t,n){var r=new bc(n-t);return this.oracle.doc.lineAt(t).to==n&&(r.flags|=4),r}},{key:"ensureLine",value:function(){this.enterLine();var t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof ea)return t;var n=new ea(0,-1);return this.nodes.push(n),n}},{key:"addBlock",value:function(t){var n;this.enterLine();var r=(n=t.deco)===null||n===void 0?void 0:n.type;r!=hr.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,r!=hr.WidgetBefore&&(this.covering=t)}},{key:"addLineDeco",value:function(t,n,r){var i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,t),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}},{key:"finish",value:function(t){var n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||n instanceof ea||this.isCovered?(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new ea(0,-1));var r,i=t,o=at(this.nodes);try{for(o.s();!(r=o.n()).done;){var a=r.value;a instanceof ea&&a.updateHeight(this.oracle,i),i+=a?a.length:1}}catch(s){o.e(s)}finally{o.f()}return this.nodes}}],[{key:"build",value:function(t,n,r,i){var o=new e(r,t);return Qn.spans(n,r,i,o,0),o.finish(r)}}]),e}(),EQ=function(){function e(){X(this,e),this.changes=[]}return tt(e,[{key:"compareRange",value:function(){}},{key:"comparePoint",value:function(t,n,r,i){(t<n||r&&r.heightRelevant||i&&i.heightRelevant)&&e1(t,n,this.changes,5)}}]),e}();function AQ(e,t){for(var n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),u=Math.min(i.innerHeight,n.bottom),c=e.parentNode;c&&c!=r.body;)if(c.nodeType==1){var l=c,f=window.getComputedStyle(l);if((l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)&&f.overflow!="visible"){var h=l.getBoundingClientRect();o=Math.max(o,h.left),a=Math.min(a,h.right),s=Math.max(s,h.top),u=c==e.parentNode?h.bottom:Math.min(u,h.bottom)}c=f.position=="absolute"||f.position=="fixed"?l.offsetParent:l.parentNode}else{if(c.nodeType!=11)break;c=c.host}return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,u)-(n.top+t)}}function PQ(e,t){var n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var m1=function(){function e(t,n,r){X(this,e),this.from=t,this.to=n,this.size=r}return tt(e,[{key:"draw",value:function(t){return Te.replace({widget:new TQ(this.size,t)}).range(this.from,this.to)}}],[{key:"same",value:function(t,n){if(t.length!=n.length)return!1;for(var r=0;r<t.length;r++){var i=t[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}}]),e}(),TQ=function(e){Ot(n,ss);var t=Mt(n);function n(r,i){var o;return X(this,n),(o=t.call(this)).size=r,o.vertical=i,o}return tt(n,[{key:"eq",value:function(r){return r.size==this.size&&r.vertical==this.vertical}},{key:"toDOM",value:function(){var r=document.createElement("div");return this.vertical?r.style.height=this.size+"px":(r.style.width=this.size+"px",r.style.height="2px",r.style.display="inline-block"),r}},{key:"estimatedHeight",get:function(){return this.vertical?this.size:-1}}]),n}(),V7=function(){function e(t){X(this,e),this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=W7,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=dr.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;var n=t.facet(o1).some(function(r){return typeof r!="function"&&r.class=="cm-lineWrapping"});this.heightOracle=new $Q(n),this.stateDeco=t.facet(Bl).filter(function(r){return typeof r!="function"}),this.heightMap=yo.empty().applyChanges(this.stateDeco,Tn.empty,this.heightOracle.setDoc(t.doc),[new mc(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Te.set(this.lineGaps.map(function(r){return r.draw(!1)})),this.computeVisibleRanges()}return tt(e,[{key:"updateForViewport",value:function(){for(var t=this,n=[this.viewport],r=this.state.selection.main,i=function(){var a=o?r.head:r.anchor;if(!n.some(function(l){var f=l.from,h=l.to;return a>=f&&a<=h})){var s=t.lineBlockAt(a),u=s.from,c=s.to;n.push(new wd(u,c))}},o=0;o<=1;o++)i();this.viewports=n.sort(function(a,s){return a.from-s.from}),this.scaler=this.heightMap.height<=7e6?W7:new NQ(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var t=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(n){t.viewportLines.push(t.scaler.scale==1?n:Fl(n,t.scaler))})}},{key:"update",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.state=t.state;var r=this.stateDeco;this.stateDeco=this.state.facet(Bl).filter(function(l){return typeof l!="function"});var i=t.changedRanges,o=mc.extendWithRanges(i,function(l,f,h){var d=new EQ;return Qn.compare(l,f,h,d,0),d.changes}(r,this.stateDeco,t?t.changes:go.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.lineBlockAtHeight(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=a&&(t.flags|=2),s?(this.scrollAnchorPos=t.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);var u=o.length?this.mapViewport(this.viewport,t.changes):this.viewport;(n&&(n.range.head<u.from||n.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,n));var c=!t.changes.empty||2&t.flags||u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,this.updateForViewport(),c&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(GA)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(t){var n=t.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?dr.RTL:dr.LTR;var a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),u=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;var c=0,l=0,f=parseInt(r.paddingTop)||0,h=parseInt(r.paddingBottom)||0;this.paddingTop==f&&this.paddingBottom==h||(this.paddingTop=f,this.paddingBottom=h,c|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=t.scrollDOM.clientWidth,c|=8),this.scrollTop!=t.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=t.scrollDOM.scrollTop),this.scrolledToBottom=this.scrollTop>t.scrollDOM.scrollHeight-t.scrollDOM.clientHeight-4;var d=(this.printing?PQ:AQ)(n,this.paddingTop),v=d.top-this.pixelViewport.top,p=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;var m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(u=!0)),!this.inView&&!this.scrollTarget)return 0;var g=s.width;if(this.contentDOMWidth==g&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=t.scrollDOM.clientHeight,c|=8),u){var y=t.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(y)&&(a=!0),a||i.lineWrapping&&Math.abs(g-this.contentDOMWidth)>i.charWidth){var b=t.docView.measureTextSize(),w=b.lineHeight,j=b.charWidth,x=b.textHeight;(a=w>0&&i.refresh(o,w,j,x,g/j,y))&&(t.docView.minWidth=0,c|=8)}v>0&&p>0?l=Math.max(v,p):v<0&&p<0&&(l=Math.min(v,p)),i.heightChanged=!1;var R,M=at(this.viewports);try{for(M.s();!(R=M.n()).done;){var E=R.value,N=E.from==this.viewport.from?y:t.docView.measureVisibleLineHeights(E);this.heightMap=(a?yo.empty().applyChanges(this.stateDeco,Tn.empty,this.heightOracle,[new mc(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new _Q(E.from,N))}}catch(L){M.e(L)}finally{M.f()}i.heightChanged&&(c|=2)}var A=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return A&&(this.viewport=this.getViewport(l,this.scrollTarget)),this.updateForViewport(),(2&c||A)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,t)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),c}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(t,n){var r=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),i=this.heightMap,o=this.heightOracle,a=this.visibleTop,s=this.visibleBottom,u=new wd(i.lineAt(a-1e3*r,Yn.ByHeight,o,0,0).from,i.lineAt(s+1e3*(1-r),Yn.ByHeight,o,0,0).to);if(n){var c=n.range.head;if(c<u.from||c>u.to){var l,f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=i.lineAt(c,Yn.ByPos,o,0,0);l=n.y=="center"?(h.top+h.bottom)/2-f/2:n.y=="start"||n.y=="nearest"&&c<u.from?h.top:h.bottom-f,u=new wd(i.lineAt(l-500,Yn.ByHeight,o,0,0).from,i.lineAt(l+f+500,Yn.ByHeight,o,0,0).to)}}return u}},{key:"mapViewport",value:function(t,n){var r=n.mapPos(t.from,-1),i=n.mapPos(t.to,1);return new wd(this.heightMap.lineAt(r,Yn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Yn.ByPos,this.heightOracle,0,0).to)}},{key:"viewportIsAppropriate",value:function(t){var n=t.from,r=t.to,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!this.inView)return!0;var o=this.heightMap.lineAt(n,Yn.ByPos,this.heightOracle,0,0).top,a=this.heightMap.lineAt(r,Yn.ByPos,this.heightOracle,0,0).bottom,s=this.visibleTop,u=this.visibleBottom;return(n==0||o<=s-Math.max(10,Math.min(-i,250)))&&(r==this.state.doc.length||a>=u+Math.max(10,Math.min(i,250)))&&o>s-2e3&&a<u+2e3}},{key:"mapLineGaps",value:function(t,n){if(!t.length||n.empty)return t;var r,i=[],o=at(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;n.touchesRange(a.from,a.to)||i.push(new m1(n.mapPos(a.from),n.mapPos(a.to),a.size))}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"ensureLineGaps",value:function(t,n){var r=this,i=this.heightOracle.lineWrapping,o=i?1e4:2e3,a=o>>1,s=o<<1;if(this.defaultTextDirection!=dr.LTR&&!i)return[];var u,c=[],l=function L(W,O,I,q){if(!(O-W<a)){var P=r.state.selection.main,_=[P.from];P.empty||_.push(P.to);for(var S=0,$=_;S<$.length;S++){var D=$[S];if(D>W&&D<O)return L(W,D-10,I,q),void L(D+10,O,I,q)}var B=function(H,U){var st,ut=at(H);try{for(ut.s();!(st=ut.n()).done;){var gt=st.value;if(U(gt))return gt}}catch(St){ut.e(St)}finally{ut.f()}}(t,function(H){return H.from>=I.from&&H.to<=I.to&&Math.abs(H.from-W)<a&&Math.abs(H.to-O)<a&&!_.some(function(U){return H.from<U&&H.to>U})});if(!B){if(O<I.to&&n&&i&&n.visibleRanges.some(function(H){return H.from<=O&&H.to>=O})){var k=n.moveToLineBoundary(Ht.cursor(O),!1,!0).head;k>W&&(O=k)}B=new m1(W,O,r.gapSize(I,W,O,q))}c.push(B)}},f=at(this.viewportLines);try{for(f.s();!(u=f.n()).done;){var h=u.value;if(!(h.length<s)){var d=RQ(h.from,h.to,this.stateDeco);if(!(d.total<s)){var v=this.scrollTarget?this.scrollTarget.range.head:null,p=void 0,m=void 0;if(i){var g=o/this.heightOracle.lineLength*this.heightOracle.lineHeight,y=void 0,b=void 0;if(v!=null){var w=kd(d,v),j=((this.visibleBottom-this.visibleTop)/2+g)/h.height;y=w-j,b=w+j}else y=(this.visibleTop-h.top-g)/h.height,b=(this.visibleBottom-h.top+g)/h.height;p=xd(d,y),m=xd(d,b)}else{var x=d.total*this.heightOracle.charWidth,R=o*this.heightOracle.charWidth,M=void 0,E=void 0;if(v!=null){var N=kd(d,v),A=((this.pixelViewport.right-this.pixelViewport.left)/2+R)/x;M=N-A,E=N+A}else M=(this.pixelViewport.left-R)/x,E=(this.pixelViewport.right+R)/x;p=xd(d,M),m=xd(d,E)}p>h.from&&l(h.from,p,h,d),m<h.to&&l(m,h.to,h,d)}}}}catch(L){f.e(L)}finally{f.f()}return c}},{key:"gapSize",value:function(t,n,r,i){var o=kd(i,r)-kd(i,n);return this.heightOracle.lineWrapping?t.height*o:i.total*this.heightOracle.charWidth*o}},{key:"updateLineGaps",value:function(t){var n=this;m1.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Te.set(t.map(function(r){return r.draw(n.heightOracle.lineWrapping)})))}},{key:"computeVisibleRanges",value:function(){var t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));var n=[];Qn.spans(t,this.viewport.from,this.viewport.to,{span:function(i,o){n.push({from:i,to:o})},point:function(){}},20);var r=n.length!=this.visibleRanges.length||this.visibleRanges.some(function(i,o){return i.from!=n[o].from||i.to!=n[o].to});return this.visibleRanges=n,r?4:0}},{key:"lineBlockAt",value:function(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(function(n){return n.from<=t&&n.to>=t})||Fl(this.heightMap.lineAt(t,Yn.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(t){return Fl(this.heightMap.lineAt(this.scaler.fromDOM(t),Yn.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(t){return Fl(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),e}(),wd=tt(function e(t,n){X(this,e),this.from=t,this.to=n});function RQ(e,t,n){var r=[],i=e,o=0;return Qn.spans(n,e,t,{span:function(){},point:function(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i<t&&(r.push({from:i,to:t}),o+=t-i),{total:o,ranges:r}}function xd(e,t){var n=e.total,r=e.ranges;if(t<=0)return r[0].from;if(t>=1)return r[r.length-1].to;for(var i=Math.floor(n*t),o=0;;o++){var a=r[o],s=a.from,u=a.to-s;if(i<=u)return s+i;i-=u}}function kd(e,t){var n,r=0,i=at(e.ranges);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o.from,s=o.to;if(t<=s){r+=t-a;break}r+=s-a}}catch(u){i.e(u)}finally{i.f()}return r/e.total}var W7={toDOM:function(e){return e},fromDOM:function(e){return e},scale:1},NQ=function(){function e(t,n,r){X(this,e);var i=0,o=0,a=0;this.viewports=r.map(function(l){var f=l.from,h=l.to,d=n.lineAt(f,Yn.ByPos,t,0,0).top,v=n.lineAt(h,Yn.ByPos,t,0,0).bottom;return i+=v-d,{from:f,to:h,top:d,bottom:v,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);var s,u=at(this.viewports);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.domTop=a+(c.top-o)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(l){u.e(l)}finally{u.f()}}return tt(e,[{key:"toDOM",value:function(t){for(var n=0,r=0,i=0;;n++){var o=n<this.viewports.length?this.viewports[n]:null;if(!o||t<o.top)return i+(t-r)*this.scale;if(t<=o.bottom)return o.domTop+(t-o.top);r=o.bottom,i=o.domBottom}}},{key:"fromDOM",value:function(t){for(var n=0,r=0,i=0;;n++){var o=n<this.viewports.length?this.viewports[n]:null;if(!o||t<o.domTop)return r+(t-i)/this.scale;if(t<=o.domBottom)return o.top+(t-o.domTop);r=o.bottom,i=o.domBottom}}}]),e}();function Fl(e,t){if(t.scale==1)return e;var n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new us(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(function(i){return Fl(i,t)}):e._content)}var jd=Se.define({combine:function(e){return e.join(" ")}}),g1=Se.define({combine:function(e){return e.indexOf(!0)>-1}}),y1=is.newName(),q7=is.newName(),H7=is.newName(),U7={"&light":"."+q7,"&dark":"."+H7};function b1(e,t,n){return new is(t,{finish:function(r){return/&/.test(r)?r.replace(/&\w*/,function(i){if(i=="&")return e;if(!n||!n[i])throw new RangeError("Unsupported selector: ".concat(i));return n[i]}):e+" "+r}})}var IQ=b1("."+y1,{"&":{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},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",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:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&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",left: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},"&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:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,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"}},U7),DQ=tt(function e(t,n,r,i){X(this,e),this.typeOver=i,this.bounds=null,this.text="";var o=t.docView,a=o.impreciseHead,s=o.impreciseAnchor;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,r,0))){var u=a||s?[]:function(d){var v=[];if(d.root.activeElement!=d.contentDOM)return v;var p=d.observer.selectionRange,m=p.anchorNode,g=p.anchorOffset,y=p.focusNode,b=p.focusOffset;return m&&(v.push(new f7(m,g)),y==m&&b==g||v.push(new f7(y,b))),v}(t),c=new c7(u,t.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(d,v){if(d.length==0)return null;var p=d[0].pos,m=d.length==2?d[1].pos:p;return p>-1&&m>-1?Ht.single(p+v,m+v):null}(u,this.bounds.from)}else{var l=t.observer.selectionRange,f=a&&a.node==l.focusNode&&a.offset==l.focusOffset||!lc(t.contentDOM,l.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(l.focusNode,l.focusOffset),h=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!lc(t.contentDOM,l.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=Ht.single(h,f)}});function J7(e,t){var n,r=t.newSel,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){var a=t.bounds,s=a.from,u=a.to,c=i.from,l=null;(o===8||Ce.android&&t.text.length<u-s)&&(c=i.to,l="end");var f=function(N,A,L,W){for(var O=Math.min(N.length,A.length),I=0;I<O&&N.charCodeAt(I)==A.charCodeAt(I);)I++;if(I==O&&N.length==A.length)return null;for(var q=N.length,P=A.length;q>0&&P>0&&N.charCodeAt(q-1)==A.charCodeAt(P-1);)q--,P--;return W=="end"&&(L-=q+Math.max(0,I-Math.min(q,P))-I),q<I&&N.length<A.length?(P=(I-=L<=I&&L>=q?I-L:0)+(P-q),q=I):P<I&&(q=(I-=L<=I&&L>=P?I-L:0)+(q-P),P=I),{from:I,toA:q,toB:P}}(e.state.doc.sliceString(s,u,yc),t.text,c-s,l);f&&(Ce.chrome&&o==13&&f.toB==f.from+2&&t.text.slice(f.from,f.toB)==yc+yc&&f.toB--,n={from:s+f.from,to:s+f.toA,insert:Tn.of(t.text.slice(f.from,f.toB).split(yc))})}else r&&(!e.hasFocus&&e.state.facet(md)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(Ce.mac||Ce.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ht.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Tn.of([" "])}):Ce.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
|
`&&e.lineWrapping&&(r&&(r=Ht.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Tn.of([" "])}),n){var h=e.state;if(Ce.ios&&e.inputState.flushIOSKey(e)||Ce.android&&(n.from==i.from&&n.to==i.to&&n.insert.length==1&&n.insert.lines==2&&dc(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&n.insert.length==0||o==8&&n.insert.length<n.to-n.from)&&dc(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&n.insert.length==0&&dc(e.contentDOM,"Delete",46)))return!0;var d,v=n.insert.toString();if(e.state.facet(UA).some(function(N){return N(e,n.from,n.to,v)}))return!0;if(e.inputState.composing>=0&&e.inputState.composing++,n.from>=i.from&&n.to<=i.to&&n.to-n.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==n.from+n.insert.length)&&e.inputState.composing<0){var p=i.from<n.from?h.sliceDoc(i.from,n.from):"",m=i.to>n.to?h.sliceDoc(n.to,i.to):"";d=h.replaceSelection(e.state.toText(p+n.insert.sliceString(0,void 0,e.state.lineBreak)+m))}else{var g=h.changes(n),y=r&&r.main.to<=g.newLength?r.main:void 0;if(h.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=i.to&&n.to>=i.to-10){var b=e.state.sliceDoc(n.from,n.to),w=v7(e)||e.state.doc.lineAt(i.head),j=i.to-n.to,x=i.to-i.from;d=h.changeByRange(function(N){if(N.from==i.from&&N.to==i.to)return{changes:g,range:y||N.map(g)};var A=N.to-j,L=A-b.length;if(N.to-N.from!=x||e.state.sliceDoc(L,A)!=b||w&&N.to>=w.from&&N.from<=w.to)return{range:N};var W=h.changes({from:L,to:A,insert:n.insert}),O=N.to-i.to;return{changes:W,range:y?Ht.range(Math.max(0,y.anchor+O),Math.max(0,y.head+O)):N.map(W)}})}else d={changes:g,selection:y&&h.selection.replaceRange(y)}}var R="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,R+=".compose",e.inputState.compositionFirstChange&&(R+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(d,{scrollIntoView:!0,userEvent:R}),!0}if(r&&!r.main.eq(i)){var M=!1,E="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(M=!0),E=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:M,userEvent:E}),!0}return!1}var LQ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},w1=Ce.ie&&Ce.ie_version<=11,BQ=function(){function e(t){var n=this;X(this,e),this.view=t,this.active=!1,this.selectionRange=new uQ,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.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(function(r){var i,o=at(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.queue.push(a)}}catch(s){o.e(s)}finally{o.f()}(Ce.ie&&Ce.ie_version<=11||Ce.ios&&t.composing)&&r.some(function(s){return s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length})?n.flushSoon():n.flush()}),w1&&(this.onCharData=function(r){n.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),n.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),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(function(){var r;((r=n.view.docView)===null||r===void 0?void 0:r.lastUpdate)<Date.now()-75&&n.onResize()}),this.resizeScroll.observe(t.scrollDOM),this.resizeContent=new ResizeObserver(function(){return n.view.requestMeasure()}),this.resizeContent.observe(t.contentDOM)),this.addWindowListeners(this.win=t.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(function(r){n.parentCheck<0&&(n.parentCheck=setTimeout(n.listenForScroll.bind(n),1e3)),r.length>0&&r[r.length-1].intersectionRatio>0!=n.intersecting&&(n.intersecting=!n.intersecting,n.intersecting!=n.view.inView&&n.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(r){r.length>0&&r[r.length-1].intersectionRatio>0&&n.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return tt(e,[{key:"onScrollChanged",value:function(t){this.view.inputState.runScrollHandlers(this.view,t),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}},{key:"onResize",value:function(){var t=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){t.resizeTimeout=-1,t.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var t=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){t.view.viewState.printing=!1,t.view.requestMeasure()},500)}},{key:"updateGaps",value:function(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(function(o,a){return o!=t[a]}))){this.gapIntersection.disconnect();var n,r=at(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.gapIntersection.observe(i)}}catch(o){r.e(o)}finally{r.f()}this.gaps=t}}},{key:"onSelectionChange",value:function(t){var n=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var r=this.view,i=this.selectionRange;if(r.state.facet(md)?r.root.activeElement==this.dom:ld(r.dom,i)){var o=i.anchorNode&&r.docView.nearest(i.anchorNode);o&&o.ignoreEvent(t)?n||(this.selectionChanged=!1):(Ce.ie&&Ce.ie_version<=11||Ce.android&&Ce.chrome)&&!r.state.selection.main.empty&&i.focusNode&&fd(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var t=this.view,n=Ce.safari&&t.root.nodeType==11&&function(i){for(var o=i.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(i){var o=null;function a(d){d.preventDefault(),d.stopImmediatePropagation(),o=d.getTargetRanges()[0]}if(i.contentDOM.addEventListener("beforeinput",a,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",a,!0),!o)return null;var s=o.startContainer,u=o.startOffset,c=o.endContainer,l=o.endOffset,f=i.docView.domAtPos(i.state.selection.main.anchor);if(fd(f.node,f.offset,c,l)){var h=[c,l,s,u];s=h[0],u=h[1],c=h[2],l=h[3]}return{anchorNode:s,anchorOffset:u,focusNode:c,focusOffset:l}}(this.view)||cd(t.root);if(!n||this.selectionRange.eq(n))return!1;var r=ld(this.dom,n);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(i,o){var a=o.focusNode,s=o.focusOffset;if(!a||o.anchorNode!=a||o.anchorOffset!=s)return!1;for(s=Math.min(s,as(a));;)if(s){if(a.nodeType!=1)return!1;var u=a.childNodes[s-1];u.contentEditable=="false"?s--:s=as(a=u)}else{if(a==i)return!0;s=hd(a),a=a.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}},{key:"setSelectionRange",value:function(t,n){this.selectionRange.set(t.node,t.offset,n.node,n.offset),this.selectionChanged=!1}},{key:"clearSelectionRange",value:function(){this.selectionRange.set(null,0,null,0)}},{key:"listenForScroll",value:function(){this.parentCheck=-1;for(var t=0,n=null,r=this.dom;r;)if(r.nodeType==1)!n&&t<this.scrollTargets.length&&this.scrollTargets[t]==r?t++:n||(n=this.scrollTargets.slice(0,t)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else{if(r.nodeType!=11)break;r=r.host}if(t<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,t)),n){var i,o=at(this.scrollTargets);try{for(o.s();!(i=o.n()).done;)i.value.removeEventListener("scroll",this.onScroll)}catch(u){o.e(u)}finally{o.f()}var a,s=at(this.scrollTargets=n);try{for(s.s();!(a=s.n()).done;)a.value.addEventListener("scroll",this.onScroll)}catch(u){s.e(u)}finally{s.f()}}}},{key:"ignore",value:function(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}},{key:"start",value:function(){this.active||(this.observer.observe(this.dom,LQ),w1&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}},{key:"stop",value:function(){this.active&&(this.active=!1,this.observer.disconnect(),w1&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}},{key:"clear",value:function(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}},{key:"delayAndroidKey",value:function(t,n){var r,i=this;this.delayedAndroidKey||(this.flushingAndroidKey=this.view.win.requestAnimationFrame(function(){var o=i.delayedAndroidKey;o&&(i.clearDelayedAndroidKey(),i.view.inputState.lastKeyCode=o.keyCode,i.view.inputState.lastKeyTime=Date.now(),!i.flush()&&o.force&&dc(i.dom,o.key,o.keyCode))})),this.delayedAndroidKey&&t!="Enter"||(this.delayedAndroidKey={key:t,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}},{key:"clearDelayedAndroidKey",value:function(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}},{key:"flushSoon",value:function(){var t=this;this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(function(){t.delayedFlush=-1,t.flush()}))}},{key:"forceFlush",value:function(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"pendingRecords",value:function(){var t,n=at(this.observer.takeRecords());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.queue.push(r)}}catch(i){n.e(i)}finally{n.f()}return this.queue}},{key:"processRecords",value:function(){var t=this.pendingRecords();t.length&&(this.queue=[]);var n,r=-1,i=-1,o=!1,a=at(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,u=this.readMutation(s);u&&(u.typeOver&&(o=!0),r==-1?(r=u.from,i=u.to):(r=Math.min(u.from,r),i=Math.max(u.to,i)))}}catch(c){a.e(c)}finally{a.f()}return{from:r,to:i,typeOver:o}}},{key:"readChange",value:function(){var t=this.processRecords(),n=t.from,r=t.to,i=t.typeOver,o=this.selectionChanged&&ld(this.dom,this.selectionRange);return n<0&&!o?null:(n>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new DQ(this.view,n,r,i))}},{key:"flush",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();var n=this.readChange();if(!n)return!1;var r=this.view.state,i=J7(this.view,n);return this.view.state==r&&this.view.update([]),i}},{key:"readMutation",value:function(t){var n=this.view.docView.nearest(t.target);if(!n||n.ignoreMutation(t))return null;if(n.markDirty(t.type=="attributes"),t.type=="attributes"&&(n.dirty|=4),t.type=="childList"){var r=K7(n,t.previousSibling||t.target.previousSibling,-1),i=K7(n,t.nextSibling||t.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}return t.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}},{key:"setWindow",value:function(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(t){t.addEventListener("resize",this.onResize),t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var t,n,r,i;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect(),(i=this.resizeContent)===null||i===void 0||i.disconnect();var o,a=at(this.scrollTargets);try{for(a.s();!(o=a.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(s){a.e(s)}finally{a.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),e}();function K7(e,t,n){for(;t;){var r=fr.get(t);if(r&&r.parent==e)return r;var i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}var we=function(){function e(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,e),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.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=n.dispatch||function(o){return t.update([o])},this.dispatch=this.dispatch.bind(this),this._root=n.root||function(o){for(;o;){if(o&&(o.nodeType==9||o.nodeType==11&&o.host))return o;o=o.assignedSlot||o.parentNode}return null}(n.parent)||document,this.viewState=new V7(n.state||Hn.create(n)),this.plugins=this.state.facet(Ll).map(function(o){return new i1(o)});var r,i=at(this.plugins);try{for(i.s();!(r=i.n()).done;)r.value.update(this)}catch(o){i.e(o)}finally{i.f()}this.observer=new BQ(this),this.inputState=new xQ(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new h7(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),n.parent&&n.parent.appendChild(this.dom)}return tt(e,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var t,n=arguments.length==1&&(arguments.length<=0?void 0:arguments[0])instanceof mi?arguments.length<=0?void 0:arguments[0]:(t=this.state).update.apply(t,arguments);this._dispatch(n,this)}},{key:"update",value:function(t){var n=this;if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var r,i,o=!1,a=!1,s=this.state,u=at(t);try{for(u.s();!(i=u.n()).done;){var c=i.value;if(c.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=c.state}}catch(E){u.e(E)}finally{u.f()}if(this.destroyed)this.viewState.state=s;else{var l=this.hasFocus,f=0,h=null;t.some(function(E){return E.annotation(I7)})?(this.inputState.notifiedFocused=l,f=1):l!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=l,(h=D7(s,l))||(f=1));var d=this.observer.delayedAndroidKey,v=null;if(d?(this.observer.clearDelayedAndroidKey(),((v=this.observer.readChange())&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(v=null)):this.observer.clear(),s.facet(Hn.phrases)!=this.state.facet(Hn.phrases))return this.setState(s);r=e7.create(this,s,t),r.flags|=f;var p=this.viewState.scrollTarget;try{this.updateState=2;var m,g=at(t);try{for(g.s();!(m=g.n()).done;){var y=m.value;if(p&&(p=p.map(y.changes)),y.scrollIntoView){var b=y.state.selection.main;p=new QA(b.empty?b:Ht.cursor(b.head,b.head>b.anchor?-1:1))}var w,j=at(y.effects);try{for(j.s();!(w=j.n()).done;){var x=w.value;x.is(YA)&&(p=x.value)}}catch(E){j.e(E)}finally{j.f()}}}catch(E){g.e(E)}finally{g.f()}this.viewState.update(r,p),this.bidiCache=Q7.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),o=this.docView.update(r),this.state.facet(zl)!=this.styleModules&&this.mountStyles(),a=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(o,t.some(function(E){return E.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(r.startState.facet(jd)!=r.state.facet(jd)&&(this.viewState.mustMeasureContent=!0),(o||a||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty){var R,M=at(this.state.facet(r1));try{for(M.s();!(R=M.n()).done;)(0,R.value)(r)}catch(E){M.e(E)}finally{M.f()}}(h||v)&&Promise.resolve().then(function(){h&&n.state==h.startState&&n.dispatch(h),v&&!J7(n,v)&&d.force&&dc(n.contentDOM,d.key,d.keyCode)})}}},{key:"setState",value:function(t){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=t;else{this.updateState=2;var n=this.hasFocus;try{var r,i=at(this.plugins);try{for(i.s();!(r=i.n()).done;)r.value.destroy(this)}catch(s){i.e(s)}finally{i.f()}this.viewState=new V7(t),this.plugins=t.facet(Ll).map(function(s){return new i1(s)}),this.pluginMap.clear();var o,a=at(this.plugins);try{for(a.s();!(o=a.n()).done;)o.value.update(this)}catch(s){a.e(s)}finally{a.f()}this.docView=new h7(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(t){var n=t.startState.facet(Ll),r=t.state.facet(Ll);if(n!=r){var i,o=[],a=at(r);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=n.indexOf(s);if(u<0)o.push(new i1(s));else{var c=this.plugins[u];c.mustUpdate=t,o.push(c)}}}catch(m){a.e(m)}finally{a.f()}var l,f=at(this.plugins);try{for(f.s();!(l=f.n()).done;){var h=l.value;h.mustUpdate!=t&&h.destroy(this)}}catch(m){f.e(m)}finally{f.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var d,v=at(this.plugins);try{for(v.s();!(d=v.n()).done;)d.value.mustUpdate=t}catch(m){v.e(m)}finally{v.f()}}for(var p=0;p<this.plugins.length;p++)this.plugins[p].update(this)}},{key:"measure",value:function(){var t=this,n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,n&&this.observer.forceFlush();var r=null,i=this.scrollDOM,o=i.scrollTop,a=this.viewState,s=a.scrollAnchorPos,u=a.scrollAnchorHeight;if(this.viewState.scrollAnchorHeight=-1,u<0||o!=this.viewState.scrollTop)if(o>i.scrollHeight-i.clientHeight-4)s=-1,u=this.viewState.heightMap.height;else{var c=this.viewState.lineBlockAtHeight(o);s=c.from,u=c.top}try{for(var l=0;;l++){this.updateState=1;var f=this.viewport,h=this.viewState.measure(this);if(!h&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var d=[];if(!(4&h)){var v=[d,this.measureRequests];this.measureRequests=v[0],d=v[1]}var p=d.map(function(M){try{return M.read(t)}catch(E){return Mi(t.state,E),G7}}),m=e7.create(this,this.state,[]),g=!1,y=!1;m.flags|=h,r?r.flags|=h:r=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),g=this.docView.update(m));for(var b=0;b<d.length;b++)if(p[b]!=G7)try{var w=d[b];w.write&&w.write(p[b],this)}catch(M){Mi(this.state,M)}if(this.viewState.editorHeight){if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,y=!0;else if(u>-1){var j=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-u;(j>1||j<-1)&&(i.scrollTop=o+j,y=!0)}}if(g&&this.docView.updateSelection(!0),this.viewport.from==f.from&&this.viewport.to==f.to&&!y&&this.measureRequests.length==0)break;u=-1}}finally{this.updateState=0,this.measureScheduled=-1}if(r&&!r.empty){var x,R=at(this.state.facet(r1));try{for(R.s();!(x=R.n()).done;)(0,x.value)(r)}catch(M){R.e(M)}finally{R.f()}}}}},{key:"themeClasses",get:function(){return y1+" "+(this.state.facet(g1)?H7:q7)+" "+this.state.facet(jd)}},{key:"updateAttrs",value:function(){var t=this,n=Y7(this,ZA,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),r={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(md)?"true":"false",class:"cm-content",style:"".concat(Ce.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(r["aria-readonly"]="true"),Y7(this,o1,r);var i=this.observer.ignore(function(){var o=X0(t.contentDOM,t.contentAttrs,r),a=X0(t.dom,t.editorAttrs,n);return o||a});return this.editorAttrs=n,this.contentAttrs=r,i}},{key:"showAnnouncements",value:function(t){var n,r=!0,i=at(t);try{for(i.s();!(n=i.n()).done;){var o,a=at(n.value.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.is(e.announce)&&(r&&(this.announceDOM.textContent=""),r=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=s.value)}}catch(u){a.e(u)}finally{a.f()}}}catch(u){i.e(u)}finally{i.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(zl),is.mount(this.root,this.styleModules.concat(IQ).reverse())}},{key:"readMeasured",value:function(){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)}},{key:"requestMeasure",value:function(t){var n=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return n.measure()})),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(var r=0;r<this.measureRequests.length;r++)if(this.measureRequests[r].key===t.key)return void(this.measureRequests[r]=t)}this.measureRequests.push(t)}}},{key:"plugin",value:function(t){var n=this.pluginMap.get(t);return(n===void 0||n&&n.spec!=t)&&this.pluginMap.set(t,n=this.plugins.find(function(r){return r.spec==t})||null),n&&n.update(this).value}},{key:"documentTop",get:function(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}},{key:"documentPadding",get:function(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}},{key:"elementAtHeight",value:function(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}},{key:"lineBlockAtHeight",value:function(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}},{key:"viewportLineBlocks",get:function(){return this.viewState.viewportLines}},{key:"lineBlockAt",value:function(t){return this.viewState.lineBlockAt(t)}},{key:"contentHeight",get:function(){return this.viewState.contentHeight}},{key:"moveByChar",value:function(t,n,r){return d1(this,t,x7(this,t,n,r))}},{key:"moveByGroup",value:function(t,n){var r=this;return d1(this,t,x7(this,t,n,function(i){return function(o,a,s){var u=o.state.charCategorizer(a),c=u(s);return function(l){var f=u(l);return c==lr.Space&&(c=f),c==f}}(r,t.head,i)}))}},{key:"moveToLineBoundary",value:function(t,n){return function(r,i,o,a){var s=h1(r,i.head),u=a&&s.type==hr.Text&&(r.lineWrapping||s.widgetLineBreaks)?r.coordsAtPos(i.assoc<0&&i.head>s.from?i.head-1:i.head):null;if(u){var c=r.dom.getBoundingClientRect(),l=r.textDirectionAt(s.from),f=r.posAtCoords({x:o==(l==dr.LTR)?c.right-1:c.left+1,y:(u.top+u.bottom)/2});if(f!=null)return Ht.cursor(f,o?-1:1)}return Ht.cursor(o?s.to:s.from,o?-1:1)}(this,t,n,!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])}},{key:"moveVertically",value:function(t,n,r){return d1(this,t,function(i,o,a,s){var u=o.head,c=a?1:-1;if(u==(a?i.state.doc.length:0))return Ht.cursor(u,o.assoc);var l,f=o.goalColumn,h=i.contentDOM.getBoundingClientRect(),d=i.coordsAtPos(u),v=i.documentTop;if(d)f==null&&(f=d.left-h.left),l=c<0?d.top:d.bottom;else{var p=i.viewState.lineBlockAt(u);f==null&&(f=Math.min(h.right-h.left,i.defaultCharacterWidth*(u-p.from))),l=(c<0?p.top:p.bottom)+v}for(var m=h.left+f,g=s!=null?s:i.defaultLineHeight>>1,y=0;;y+=10){var b=l+(g+y)*c,w=b7(i,{x:m,y:b},!1,c);if(b<h.top||b>h.bottom||(c<0?w<u:w>u))return Ht.cursor(w,o.assoc,void 0,f)}}(this,t,n,r))}},{key:"domAtPos",value:function(t){return this.docView.domAtPos(t)}},{key:"posAtDOM",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this.docView.posFromDOM(t,n)}},{key:"posAtCoords",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this.readMeasured(),b7(this,t,n)}},{key:"coordsAtPos",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.readMeasured();var r=this.docView.coordsAt(t,n);if(!r||r.left==r.right)return r;var i=this.state.doc.lineAt(t),o=this.bidiSpans(i);return F0(r,o[gc.find(o,t-i.from,-1,n)].dir==dr.LTR==n>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(t){return!this.state.facet(KA)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(t){if(t.length>zQ)return s7(t.length);var n,r=this.textDirectionAt(t.from),i=at(this.bidiCache);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.from==t.from&&o.dir==r)return o.order}}catch(s){i.e(s)}finally{i.f()}var a=function(s,u){var c=s.length,l=u==s1?1:2,f=u==s1?2:1;if(!s||l==1&&!pQ.test(s))return s7(c);for(var h=0,d=l,v=l;h<c;h++){var p=vQ(s.charCodeAt(h));p==512?p=d:p==8&&v==4&&(p=16),vr[h]=p==4?2:p,7&p&&(v=p),d=p}for(var m=0,g=l,y=l;m<c;m++){var b=vr[m];if(b==128)m<c-1&&g==vr[m+1]&&24&g?b=vr[m]=g:vr[m]=256;else if(b==64){for(var w=m+1;w<c&&vr[w]==64;)w++;for(var j=m&&g==8||w<c&&vr[w]==8?y==1?1:8:256,x=m;x<w;x++)vr[x]=j;m=w-1}else b==8&&y==1&&(vr[m]=1);g=b,7&b&&(y=b)}for(var R,M,E,N=0,A=0,L=0;N<c;N++)if(M=u1[R=s.charCodeAt(N)])if(M<0){for(var W=A-3;W>=0;W-=3)if(ta[W+1]==-M){var O=ta[W+2],I=2&O?l:4&O?1&O?f:l:0;I&&(vr[N]=vr[ta[W]]=I),A=W;break}}else{if(ta.length==189)break;ta[A++]=N,ta[A++]=R,ta[A++]=L}else if((E=vr[N])==2||E==1){var q=E==l;L=q?0:1;for(var P=A-3;P>=0;P-=3){var _=ta[P+2];if(2&_)break;if(q)ta[P+2]|=2;else{if(4&_)break;ta[P+2]|=4}}}for(var S=0;S<c;S++)if(vr[S]==256){for(var $=S+1;$<c&&vr[$]==256;)$++;for(var D=(S?vr[S-1]:l)==1,B=D==(($<c?vr[$]:l)==1)?D?1:2:l,k=S;k<$;k++)vr[k]=B;S=$-1}var H=[];if(l==1)for(var U=0;U<c;){for(var st=U,ut=vr[U++]!=1;U<c&&ut==(vr[U]!=1);)U++;if(ut)for(var gt=U;gt>st;){for(var St=gt,Pt=vr[--gt]!=2;gt>st&&Pt==(vr[gt-1]!=2);)gt--;H.push(new gc(gt,St,Pt?2:1))}else H.push(new gc(st,U,0))}else for(var pt=0;pt<c;){for(var Bt=pt,K=vr[pt++]==2;pt<c&&K==(vr[pt]==2);)pt++;H.push(new gc(Bt,pt,K?1:2))}return H}(t.text,r);return this.bidiCache.push(new Q7(t.from,t.to,r,a)),a}},{key:"hasFocus",get:function(){var t;return(this.dom.ownerDocument.hasFocus()||Ce.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var t=this;this.observer.ignore(function(){xA(t.contentDOM),t.docView.updateSelection()})}},{key:"setRoot",value:function(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var t,n=at(this.plugins);try{for(n.s();!(t=n.n()).done;)t.value.destroy(this)}catch(r){n.e(r)}finally{n.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return YA.of(new QA(typeof t=="number"?Ht.cursor(t):t,n.y,n.x,n.yMargin,n.xMargin))}},{key:"domEventHandlers",value:function(t){return zr.define(function(){return{}},{eventHandlers:t})}},{key:"theme",value:function(t,n){var r=is.newName(),i=[jd.of(r),zl.of(b1(".".concat(r),t))];return n&&n.dark&&i.push(g1.of(!0)),i}},{key:"baseTheme",value:function(t){return uc.lowest(zl.of(b1("."+y1,t,U7)))}},{key:"findFromDOM",value:function(t){var n,r=t.querySelector(".cm-content"),i=r&&fr.get(r)||fr.get(t);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}]),e}();we.styleModule=zl,we.inputHandler=UA,we.focusChangeEffect=JA,we.perLineTextDirection=KA,we.exceptionSink=HA,we.updateListener=r1,we.editable=md,we.mouseSelectionStyle=qA,we.dragMovesSelection=WA,we.clickAddsSelectionRange=VA,we.decorations=Bl,we.atomicRanges=a1,we.scrollMargins=XA,we.darkTheme=g1,we.contentAttributes=o1,we.editorAttributes=ZA,we.lineWrapping=we.contentAttributes.of({class:"cm-lineWrapping"}),we.announce=cn.define();var zQ=4096,G7={},Q7=function(){function e(t,n,r,i){X(this,e),this.from=t,this.to=n,this.dir=r,this.order=i}return tt(e,null,[{key:"update",value:function(t,n){if(n.empty)return t;for(var r=[],i=t.length?t[t.length-1].dir:dr.LTR,o=Math.max(0,t.length-10);o<t.length;o++){var a=t[o];a.dir!=i||n.touchesRange(a.from,a.to)||r.push(new e(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.order))}return r}}]),e}();function Y7(e,t,n){for(var r=e.state.facet(t),i=r.length-1;i>=0;i--){var o=r[i],a=typeof o=="function"?o(e):o;a&&Y0(a,n)}return n}var FQ=Ce.mac?"mac":Ce.windows?"win":Ce.linux?"linux":"key";function Sd(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n!==!1&&t.shiftKey&&(e="Shift-"+e),e}var VQ=uc.default(we.domEventHandlers({keydown:function(e,t){return tP(X7(t.state),e,t,"editor")}})),Cd=Se.define({enables:VQ}),Z7=new WeakMap;function X7(e){var t=e.facet(Cd),n=Z7.get(t);return n||Z7.set(t,n=function(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:FQ,a=Object.create(null),s=Object.create(null),u=function(x,R){var M=s[x];if(M==null)s[x]=R;else if(M!=R)throw new Error("Key binding "+x+" is used both as a regular binding and as a multi-stroke prefix")},c=function(x,R,M,E){for(var N,A,L=a[x]||(a[x]=Object.create(null)),W=R.split(/ (?!$)/).map(function(_){return function(S,$){var D,B,k,H,U=S.split(/-(?!$)/),st=U[U.length-1];st=="Space"&&(st=" ");for(var ut=0;ut<U.length-1;++ut){var gt=U[ut];if(/^(cmd|meta|m)$/i.test(gt))H=!0;else if(/^a(lt)?$/i.test(gt))D=!0;else if(/^(c|ctrl|control)$/i.test(gt))B=!0;else if(/^s(hift)?$/i.test(gt))k=!0;else{if(!/^mod$/i.test(gt))throw new Error("Unrecognized modifier name: "+gt);$=="mac"?H=!0:B=!0}}return D&&(st="Alt-"+st),B&&(st="Ctrl-"+st),H&&(st="Meta-"+st),k&&(st="Shift-"+st),st}(_,o)}),O=function(){var _=W.slice(0,I).join(" ");u(_,!0),L[_]||(L[_]={preventDefault:!0,run:[function(S){var $=cs={view:S,prefix:_,scope:x};return setTimeout(function(){cs==$&&(cs=null)},WQ),!0}]})},I=1;I<W.length;I++)O();var q=W.join(" ");u(q,!1);var P=L[q]||(L[q]={preventDefault:!1,run:((A=(N=L._any)===null||N===void 0?void 0:N.run)===null||A===void 0?void 0:A.slice())||[]});M&&P.run.push(M),E&&(P.preventDefault=!0)},l=at(r);try{for(l.s();!(i=l.n()).done;){var f=i.value,h=f.scope?f.scope.split(" "):["editor"];if(f.any){var d,v=at(h);try{for(v.s();!(d=v.n()).done;){var p=d.value,m=a[p]||(a[p]=Object.create(null));for(var g in m._any||(m._any={preventDefault:!1,run:[]}),m)m[g].run.push(f.any)}}catch(x){v.e(x)}finally{v.f()}}var y=f[o]||f.key;if(y){var b,w=at(h);try{for(w.s();!(b=w.n()).done;){var j=b.value;c(j,y,f.run,f.preventDefault),f.shift&&c(j,"Shift-"+y,f.shift,f.preventDefault)}}catch(x){w.e(x)}finally{w.f()}}}}catch(x){l.e(x)}finally{l.f()}return a}(t.reduce(function(r,i){return r.concat(i)},[]))),n}var cs=null,WQ=4e3;function tP(e,t,n,r){var i=function(d){var v=!(aQ&&(d.ctrlKey||d.altKey||d.metaKey)||oQ&&d.shiftKey&&d.key&&d.key.length==1||d.key=="Unidentified")&&d.key||(d.shiftKey?Il:os)[d.keyCode]||d.key||"Unidentified";return v=="Esc"&&(v="Escape"),v=="Del"&&(v="Delete"),v=="Left"&&(v="ArrowLeft"),v=="Up"&&(v="ArrowUp"),v=="Right"&&(v="ArrowRight"),v=="Down"&&(v="ArrowDown"),v}(t),o=_i(Vr(i,0))==i.length&&i!=" ",a="",s=!1;cs&&cs.view==n&&cs.scope==r&&(a=cs.prefix+" ",(s=j7.indexOf(t.keyCode)<0)&&(cs=null));var u,c,l=new Set,f=function(d){if(d){var v,p=at(d.run);try{for(p.s();!(v=p.n()).done;){var m=v.value;if(!l.has(m)&&(l.add(m),m(n,t)))return!0}}catch(g){p.e(g)}finally{p.f()}d.preventDefault&&(s=!0)}return!1},h=e[r];if(h){if(f(h[a+Sd(i,t,!o)]))return!0;if(o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Ce.windows&&t.ctrlKey&&t.altKey)&&(u=os[t.keyCode])&&u!=i){if(f(h[a+Sd(u,t,!0)])||t.shiftKey&&(c=Il[t.keyCode])!=i&&c!=u&&f(h[a+Sd(c,t,!1)]))return!0}else if(o&&t.shiftKey&&f(h[a+Sd(i,t,!0)]))return!0;if(f(h._any))return!0}return s}var x1=function(){function e(t,n,r,i,o){X(this,e),this.className=t,this.left=n,this.top=r,this.width=i,this.height=o}return tt(e,[{key:"draw",value:function(){var t=document.createElement("div");return t.className=this.className,this.adjust(t),t}},{key:"update",value:function(t,n){return n.className==this.className&&(this.adjust(t),!0)}},{key:"adjust",value:function(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width!=null&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}},{key:"eq",value:function(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}}],[{key:"forRange",value:function(t,n,r){if(r.empty){var i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];var o=eP(t);return[new e(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}return qQ(t,n,r)}}]),e}();function eP(e){var t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==dr.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function nP(e,t,n){var r=Ht.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:hr.Text}}function qQ(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];var r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==dr.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),u=eP(e),c=a.querySelector(".cm-line"),l=c&&window.getComputedStyle(c),f=s.left+(l?parseInt(l.paddingLeft)+Math.min(0,parseInt(l.textIndent)):0),h=s.right-(l?parseInt(l.paddingRight):0),d=h1(e,r),v=h1(e,i),p=d.type==hr.Text?d:null,m=v.type==hr.Text?v:null;if(p&&(e.lineWrapping||d.widgetLineBreaks)&&(p=nP(e,r,p)),m&&(e.lineWrapping||v.widgetLineBreaks)&&(m=nP(e,i,m)),p&&m&&p.from==m.from)return j(x(n.from,n.to,p));var g=p?x(n.from,null,p):R(d,!1),y=m?x(null,n.to,m):R(v,!0),b=[];return(p||d).to<(m||v).from-(p&&m?1:0)||d.widgetLineBreaks>1&&g.bottom+e.defaultLineHeight/2<y.top?b.push(w(f,g.bottom,h,y.top)):g.bottom<y.top&&e.elementAtHeight((g.bottom+y.top)/2).type==hr.Text&&(g.bottom=y.top=(g.bottom+y.top)/2),j(g).concat(b).concat(j(y));function w(M,E,N,A){return new x1(t,M-u.left,E-u.top-.01,N-M,A-E+.01)}function j(M){for(var E=M.top,N=M.bottom,A=M.horizontal,L=[],W=0;W<A.length;W+=2)L.push(w(A[W],E,A[W+1],N));return L}function x(M,E,N){var A=1e9,L=-1e9,W=[];function O(gt,St,Pt,pt,Bt){var K=e.coordsAtPos(gt,gt==N.to?-2:2),$t=e.coordsAtPos(Pt,Pt==N.from?2:-2);K&&$t&&(A=Math.min(K.top,$t.top,A),L=Math.max(K.bottom,$t.bottom,L),Bt==dr.LTR?W.push(o&&St?f:K.left,o&&pt?h:$t.right):W.push(!o&&pt?f:$t.left,!o&&St?h:K.right))}var I,q=M!=null?M:N.from,P=E!=null?E:N.to,_=at(e.visibleRanges);try{for(_.s();!(I=_.n()).done;){var S=I.value;if(S.to>q&&S.from<P)for(var $=Math.max(S.from,q),D=Math.min(S.to,P);;){var B,k=e.state.doc.lineAt($),H=at(e.bidiSpans(k));try{for(H.s();!(B=H.n()).done;){var U=B.value,st=U.from+k.from,ut=U.to+k.from;if(st>=D)break;ut>$&&O(Math.max(st,$),M==null&&st<=q,Math.min(ut,D),E==null&&ut>=P,U.dir)}}catch(gt){H.e(gt)}finally{H.f()}if(($=k.to+1)>=D)break}}}catch(gt){_.e(gt)}finally{_.f()}return W.length==0&&O(q,M==null,P,E==null,e.textDirection),{top:A,bottom:L,horizontal:W}}function R(M,E){var N=s.top+(E?M.top:M.bottom);return{top:N,bottom:N,horizontal:[]}}}var HQ=function(){function e(t,n){X(this,e),this.view=t,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.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.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}return tt(e,[{key:"update",value:function(t){t.startState.facet($d)!=t.state.facet($d)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&t.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(t){for(var n=0,r=t.facet($d);n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}},{key:"measure",value:function(){return this.layer.markers(this.view)}},{key:"draw",value:function(t){var n=this;if(t.length!=this.drawn.length||t.some(function(c,l){return!function(f,h){return f.constructor==h.constructor&&f.eq(h)}(c,n.drawn[l])})){var r,i=this.dom.firstChild,o=0,a=at(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s.update&&i&&s.constructor&&this.drawn[o].constructor&&s.update(i,this.drawn[o])?(i=i.nextSibling,o++):this.dom.insertBefore(s.draw(),i)}}catch(c){a.e(c)}finally{a.f()}for(;i;){var u=i.nextSibling;i.remove(),i=u}this.drawn=t}}},{key:"destroy",value:function(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}]),e}(),$d=Se.define();function rP(e){return[zr.define(function(t){return new HQ(t,e)}),$d.of(e)]}var iP=!Ce.ios,Vl=Se.define({combine:function(e){return Ui(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:function(t,n){return Math.min(t,n)},drawRangeCursor:function(t,n){return t||n}})}});function UQ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[Vl.of(e),JQ,KQ,GQ,GA.of(!0)]}function oP(e){return e.startState.facet(Vl)!=e.state.facet(Vl)}var JQ=rP({above:!0,markers:function(e){var t,n=e.state,r=n.facet(Vl),i=[],o=at(n.selection.ranges);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a==n.selection.main;if(a.empty?!s||iP:r.drawRangeCursor){var u,c=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=a.empty?a:Ht.cursor(a.head,a.head>a.anchor?-1:1),f=at(x1.forRange(e,c,l));try{for(f.s();!(u=f.n()).done;){var h=u.value;i.push(h)}}catch(d){f.e(d)}finally{f.f()}}}}catch(d){o.e(d)}finally{o.f()}return i},update:function(e,t){e.transactions.some(function(r){return r.selection})&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");var n=oP(e);return n&&aP(e.state,t),e.docChanged||e.selectionSet||n},mount:function(e,t){aP(t.state,e)},class:"cm-cursorLayer"});function aP(e,t){t.style.animationDuration=e.facet(Vl).cursorBlinkRate+"ms"}var KQ=rP({above:!1,markers:function(e){return e.state.selection.ranges.map(function(t){return t.empty?[]:x1.forRange(e,"cm-selectionBackground",t)}).reduce(function(t,n){return t.concat(n)})},update:function(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||oP(e)},class:"cm-selectionLayer"}),sP={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};iP&&(sP[".cm-line"].caretColor="transparent !important");var GQ=uc.highest(we.theme(sP)),uP=cn.define({map:function(e,t){return e==null?null:t.mapPos(e)}}),Wl=Wr.define({create:function(){return null},update:function(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce(function(n,r){return r.is(uP)?r.value:n},e)}}),QQ=zr.fromClass(function(){function e(t){X(this,e),this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return tt(e,[{key:"update",value:function(t){var n,r=t.state.field(Wl);r==null?this.cursor!=null&&((n=this.cursor)===null||n===void 0||n.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Wl)!=r||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var t=this.view.state.field(Wl),n=t!=null&&this.view.coordsAtPos(t);if(!n)return null;var r=this.view.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+this.view.scrollDOM.scrollLeft,top:n.top-r.top+this.view.scrollDOM.scrollTop,height:n.bottom-n.top}}},{key:"drawCursor",value:function(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(t){this.view.state.field(Wl)!=t&&this.view.dispatch({effects:uP.of(t)})}}]),e}(),{eventHandlers:{dragover:function(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave:function(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function cP(e,t,n,r,i){t.lastIndex=0;for(var o,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;o=t.exec(a.value);)i(s+o.index,o)}var YQ=function(){function e(t){X(this,e);var n=t.regexp,r=t.decoration,i=t.decorate,o=t.boundary,a=t.maxLength,s=a===void 0?1e3:a;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=function(u,c,l,f){return i(f,l,l+u[0].length,u,c)};else if(typeof r=="function")this.addMatch=function(u,c,l,f){var h=r(u,c,l);h&&f(l,l+u[0].length,h)};else{if(!r)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(u,c,l,f){return f(l,l+u[0].length,r)}}this.boundary=o,this.maxLength=s}return tt(e,[{key:"createDeco",value:function(t){var n,r=this,i=new Ks,o=i.add.bind(i),a=at(function(l,f){var h=l.visibleRanges;if(h.length==1&&h[0].from==l.viewport.from&&h[0].to==l.viewport.to)return h;var d,v=[],p=at(h);try{for(p.s();!(d=p.n()).done;){var m=d.value,g=m.from,y=m.to;g=Math.max(l.state.doc.lineAt(g).from,g-f),y=Math.min(l.state.doc.lineAt(y).to,y+f),v.length&&v[v.length-1].to>=g?v[v.length-1].to=y:v.push({from:g,to:y})}}catch(b){p.e(b)}finally{p.f()}return v}(t,this.maxLength));try{for(a.s();!(n=a.n()).done;){var s=n.value,u=s.from,c=s.to;cP(t.state.doc,this.regexp,u,c,function(l,f){return r.addMatch(f,t,l,o)})}}catch(l){a.e(l)}finally{a.f()}return i.finish()}},{key:"updateDeco",value:function(t,n){var r=1e9,i=-1;return t.docChanged&&t.changes.iterChanges(function(o,a,s,u){u>t.view.viewport.from&&s<t.view.viewport.to&&(r=Math.min(s,r),i=Math.max(u,i))}),t.viewportChanged||i-r>1e3?this.createDeco(t.view):i>-1?this.updateRange(t.view,n.map(t.changes),r,i):n}},{key:"updateRange",value:function(t,n,r,i){var o,a=this,s=at(t.visibleRanges);try{var u=function(){var c=o.value,l=Math.max(c.from,r),f=Math.min(c.to,i);if(f>l){var h=t.state.doc.lineAt(l),d=h.to<f?t.state.doc.lineAt(f):h,v=Math.max(c.from,h.from),p=Math.min(c.to,d.to);if(a.boundary){for(;l>h.from;l--)if(a.boundary.test(h.text[l-1-h.from])){v=l;break}for(;f<d.to;f++)if(a.boundary.test(d.text[f-d.from])){p=f;break}}var m,g=[],y=function(b,w,j){return g.push(j.range(b,w))};if(h==d)for(a.regexp.lastIndex=v-h.from;(m=a.regexp.exec(h.text))&&m.index<p-h.from;)a.addMatch(m,t,m.index+h.from,y);else cP(t.state.doc,a.regexp,v,p,function(b,w){return a.addMatch(w,t,b,y)});n=n.update({filterFrom:v,filterTo:p,filter:function(b,w){return b<v||w>p},add:g})}};for(s.s();!(o=s.n()).done;)u()}catch(c){s.e(c)}finally{s.f()}return n}}]),e}(),k1=/x/.unicode!=null?"gu":"g",ZQ=new RegExp(`[\0-\b
|
|
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,k1),XQ={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"},j1=null,_d=Se.define({combine:function(e){var t=Ui(e,{render:null,specialChars:ZQ,addSpecialChars:null});return(t.replaceTabs=!function(){var n;if(j1==null&&typeof document!="undefined"&&document.body){var r=document.body.style;j1=((n=r.tabSize)!==null&&n!==void 0?n:r.MozTabSize)!=null}return j1||!1}())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,k1)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,k1)),t}});function tY(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[_d.of(e),lP||(lP=zr.fromClass(function(){function t(n){X(this,t),this.view=n,this.decorations=Te.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(_d)),this.decorations=this.decorator.createDeco(n)}return tt(t,[{key:"makeDecorator",value:function(n){var r=this;return new YQ({regexp:n.specialChars,decoration:function(i,o,a){var s=o.state.doc,u=Vr(i[0],0);if(u==9){var c=s.lineAt(a),l=o.state.tabSize,f=Nl(c.text,l,a-c.from);return Te.replace({widget:new nY((l-f%l)*r.view.defaultCharacterWidth)})}return r.decorationCache[u]||(r.decorationCache[u]=Te.replace({widget:new eY(n,u)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var r=n.state.facet(_d);n.startState.facet(_d)!=r?(this.decorator=this.makeDecorator(r),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var lP=null,eY=function(e){Ot(n,ss);var t=Mt(n);function n(r,i){var o;return X(this,n),(o=t.call(this)).options=r,o.code=i,o}return tt(n,[{key:"eq",value:function(r){return r.code==this.code}},{key:"toDOM",value:function(r){var i=function(u){return u>=32?"\u2022":u==10?"\u2424":String.fromCharCode(9216+u)}(this.code),o=r.state.phrase("Control character")+" "+(XQ[this.code]||"0x"+this.code.toString(16)),a=this.options.render&&this.options.render(this.code,o,i);if(a)return a;var s=document.createElement("span");return s.textContent=i,s.title=o,s.setAttribute("aria-label",o),s.className="cm-specialChar",s}},{key:"ignoreEvent",value:function(){return!1}}]),n}(),nY=function(e){Ot(n,ss);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).width=r,i}return tt(n,[{key:"eq",value:function(r){return r.width==this.width}},{key:"toDOM",value:function(){var r=document.createElement("span");return r.textContent=" ",r.className="cm-tab",r.style.width=this.width+"px",r}},{key:"ignoreEvent",value:function(){return!1}}]),n}(),rY=Te.line({class:"cm-activeLine"}),iY=zr.fromClass(function(){function e(t){X(this,e),this.decorations=this.getDeco(t)}return tt(e,[{key:"update",value:function(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}},{key:"getDeco",value:function(t){var n,r=-1,i=[],o=at(t.state.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=t.lineBlockAt(a.head);s.from>r&&(i.push(rY.range(s.from)),r=s.from)}}catch(u){o.e(u)}finally{o.f()}return Te.set(i)}}]),e}(),{decorations:function(e){return e.decorations}}),S1=2e3;function fP(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,o=i>S1?-1:i==r.length?function(a,s){var u=a.coordsAtPos(a.viewport.from);return u?Math.round(Math.abs((u.left-s)/a.defaultCharacterWidth)):-1}(e,t.clientX):Nl(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function oY(e,t){var n=fP(e,t),r=e.state.selection;return n?{update:function(i){if(i.docChanged){var o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get:function(i,o,a){var s=fP(e,i);if(!s)return r;var u=function(c,l,f){var h=Math.min(l.line,f.line),d=Math.max(l.line,f.line),v=[];if(l.off>S1||f.off>S1||l.col<0||f.col<0)for(var p=Math.min(l.off,f.off),m=Math.max(l.off,f.off),g=h;g<=d;g++){var y=c.doc.line(g);y.length<=m&&v.push(Ht.range(y.from+p,y.to+m))}else for(var b=Math.min(l.col,f.col),w=Math.max(l.col,f.col),j=h;j<=d;j++){var x=c.doc.line(j),R=L0(x.text,b,c.tabSize,!0);if(R<0)v.push(Ht.cursor(x.to));else{var M=L0(x.text,w,c.tabSize);v.push(Ht.range(x.from+R,x.from+M))}}return v}(e.state,n,s);return u.length?a?Ht.create(u.concat(r.ranges)):Ht.create(u):r}}:null}function aY(e){var t=(e==null?void 0:e.eventFilter)||function(n){return n.altKey&&n.button==0};return we.mouseSelectionStyle.of(function(n,r){return t(r)?oY(n,r):null})}var sY={Alt:[18,function(e){return!!e.altKey}],Control:[17,function(e){return!!e.ctrlKey}],Shift:[16,function(e){return!!e.shiftKey}],Meta:[91,function(e){return!!e.metaKey}]},uY={style:"cursor: crosshair"};function cY(){var e=ke(sY[(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).key||"Alt"],2),t=e[0],n=e[1],r=zr.fromClass(function(){function i(o){X(this,i),this.view=o,this.isDown=!1}return tt(i,[{key:"set",value:function(o){this.isDown!=o&&(this.isDown=o,this.view.update([]))}}]),i}(),{eventHandlers:{keydown:function(i){this.set(i.keyCode==t||n(i))},keyup:function(i){i.keyCode!=t&&n(i)||this.set(!1)},mousemove:function(i){this.set(n(i))}}});return[r,we.contentAttributes.of(function(i){var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?uY:null})]}var Od="-10000px",hP=function(){function e(t,n,r){X(this,e),this.facet=n,this.createTooltipView=r,this.input=t.state.facet(n),this.tooltips=this.input.filter(function(i){return i}),this.tooltipViews=this.tooltips.map(r)}return tt(e,[{key:"update",value:function(t){var n,r=t.state.facet(this.facet),i=r.filter(function(y){return y});if(r===this.input){var o,a=at(this.tooltipViews);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.update&&s.update(t)}}catch(y){a.e(y)}finally{a.f()}return!1}for(var u=[],c=0;c<i.length;c++){var l=i[c],f=-1;if(l){for(var h=0;h<this.tooltips.length;h++){var d=this.tooltips[h];d&&d.create==l.create&&(f=h)}if(f<0)u[c]=this.createTooltipView(l);else{var v=u[c]=this.tooltipViews[f];v.update&&v.update(t)}}}var p,m=at(this.tooltipViews);try{for(m.s();!(p=m.n()).done;){var g=p.value;u.indexOf(g)<0&&(g.dom.remove(),(n=g.destroy)===null||n===void 0||n.call(g))}}catch(y){m.e(y)}finally{m.f()}return this.input=r,this.tooltips=i,this.tooltipViews=u,!0}}]),e}();function lY(e){var t=e.win;return{top:0,left:0,bottom:t.innerHeight,right:t.innerWidth}}var C1=Se.define({combine:function(e){var t,n,r;return{position:Ce.ios?"absolute":((t=e.find(function(i){return i.position}))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find(function(i){return i.parent}))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=e.find(function(i){return i.tooltipSpace}))===null||r===void 0?void 0:r.tooltipSpace)||lY}}}),dP=new WeakMap,vP=zr.fromClass(function(){function e(t){var n=this;X(this,e),this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;var r=t.state.facet(C1);this.position=r.position,this.parent=r.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new hP(t,Md,function(i){return n.createTooltip(i)}),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(function(i){Date.now()>n.lastTransaction-50&&i.length>0&&i[i.length-1].intersectionRatio<1&&n.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return tt(e,[{key:"createContainer",value:function(){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}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var t,n=at(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.intersectionObserver.observe(r.dom)}}catch(i){n.e(i)}finally{n.f()}}}},{key:"measureSoon",value:function(){var t=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){t.measureTimeout=-1,t.maybeMeasure()},50))}},{key:"update",value:function(t){t.transactions.length&&(this.lastTransaction=Date.now());var n=this.manager.update(t);n&&this.observeIntersection();var r=n||t.geometryChanged,i=t.state.facet(C1);if(i.position!=this.position){this.position=i.position;var o,a=at(this.manager.tooltipViews);try{for(a.s();!(o=a.n()).done;)o.value.dom.style.position=this.position}catch(l){a.e(l)}finally{a.f()}r=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();var s,u=at(this.manager.tooltipViews);try{for(u.s();!(s=u.n()).done;){var c=s.value;this.container.appendChild(c.dom)}}catch(l){u.e(l)}finally{u.f()}r=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);r&&this.maybeMeasure()}},{key:"createTooltip",value:function(t){var n=t.create(this.view);if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Od,this.container.appendChild(n.dom),n.mount&&n.mount(this.view),n}},{key:"destroy",value:function(){var t,n;this.view.win.removeEventListener("resize",this.measureSoon);var r,i=at(this.manager.tooltipViews);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.dom.remove(),(t=o.destroy)===null||t===void 0||t.call(o)}}catch(a){i.e(a)}finally{i.f()}(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var t=this,n=this.view.dom.getBoundingClientRect();return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map(function(r,i){var o=t.manager.tooltipViews[i];return o.getCoords?o.getCoords(r.pos):t.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(function(r){return r.dom.getBoundingClientRect()}),space:this.view.state.facet(C1).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(t){for(var n,r=t.editor,i=t.space,o=[],a=0;a<this.manager.tooltips.length;a++){var s=this.manager.tooltips[a],u=this.manager.tooltipViews[a],c=u.dom,l=t.pos[a],f=t.size[a];if(!l||l.bottom<=Math.max(r.top,i.top)||l.top>=Math.min(r.bottom,i.bottom)||l.right<Math.max(r.left,i.left)-.1||l.left>Math.min(r.right,i.right)+.1)c.style.top=Od;else{var h=s.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,d=h?7:0,v=f.right-f.left,p=(n=dP.get(u))!==null&&n!==void 0?n:f.bottom-f.top,m=u.offset||hY,g=this.view.textDirection==dr.LTR,y=f.width>i.right-i.left?g?i.left:i.right-f.width:g?Math.min(l.left-(h?14:0)+m.x,i.right-v):Math.max(i.left,l.left-v+(h?14:0)-m.x),b=!!s.above;!s.strictSide&&(b?l.top-(f.bottom-f.top)-m.y<i.top:l.bottom+(f.bottom-f.top)+m.y>i.bottom)&&b==i.bottom-l.bottom>l.top-i.top&&(b=!b);var w=(b?l.top-i.top:i.bottom-l.bottom)-d;if(w<p&&u.resize!==!1){if(w<this.view.defaultLineHeight){c.style.top=Od;continue}dP.set(u,p),c.style.height=(p=w)+"px"}else c.style.height&&(c.style.height="");var j=b?l.top-p-d-m.y:l.bottom+d+m.y,x=y+v;if(u.overlap!==!0){var R,M=at(o);try{for(M.s();!(R=M.n()).done;){var E=R.value;E.left<x&&E.right>y&&E.top<j+p&&E.bottom>j&&(j=b?E.top-p-2-d:E.bottom+d+2)}}catch(N){M.e(N)}finally{M.f()}}this.position=="absolute"?(c.style.top=j-t.parent.top+"px",c.style.left=y-t.parent.left+"px"):(c.style.top=j+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(l.left+(g?m.x:-m.x)-(y+14-7),"px")),u.overlap!==!0&&o.push({left:y,top:j,right:x,bottom:j+p}),c.classList.toggle("cm-tooltip-above",b),c.classList.toggle("cm-tooltip-below",!b),u.positioned&&u.positioned(t.space)}}}},{key:"maybeMeasure",value:function(){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))){var t,n=at(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;)t.value.dom.style.top=Od}catch(r){n.e(r)}finally{n.f()}}}}]),e}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),fY=we.baseTheme({".cm-tooltip":{zIndex:100,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:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),hY={x:0,y:0},Md=Se.define({enables:[vP,fY]}),Ed=Se.define(),dY=function(){function e(t){var n=this;X(this,e),this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new hP(t,Ed,function(r){return n.createHostedView(r)})}return tt(e,[{key:"createHostedView",value:function(t){var n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}},{key:"mount",value:function(t){var n,r=at(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.mount&&i.mount(t)}}catch(o){r.e(o)}finally{r.f()}this.mounted=!0}},{key:"positioned",value:function(t){var n,r=at(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.positioned&&i.positioned(t)}}catch(o){r.e(o)}finally{r.f()}}},{key:"update",value:function(t){this.manager.update(t)}},{key:"destroy",value:function(){var t,n,r=at(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){var i=n.value;(t=i.destroy)===null||t===void 0||t.call(i)}}catch(o){r.e(o)}finally{r.f()}}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),vY=Md.compute([Ed],function(e){var t=e.facet(Ed).filter(function(n){return n});return t.length===0?null:{pos:Math.min.apply(Math,Oe(t.map(function(n){return n.pos}))),end:Math.max.apply(Math,Oe(t.filter(function(n){return n.end!=null}).map(function(n){return n.end}))),create:dY.create,above:t[0].above,arrow:t.some(function(n){return n.arrow})}}),pY=function(){function e(t,n,r,i,o){X(this,e),this.view=t,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return tt(e,[{key:"update",value:function(){var t=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return t.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}}},{key:"startHover",value:function(){var t=this;clearTimeout(this.restartTimeout);var n=this.lastMove,r=this.view.contentDOM.contains(n.target)?this.view.posAtCoords(n):null;if(r!=null){var i=this.view.coordsAtPos(r);if(!(i==null||n.y<i.top||n.y>i.bottom||n.x<i.left-this.view.defaultCharacterWidth||n.x>i.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(r)).find(function(c){return c.from<=r&&c.to>=r}),a=o&&o.dir==dr.RTL?-1:1,s=this.source(this.view,r,n.x<i.left?-a:a);if(s!=null&&s.then){var u=this.pending={pos:r};s.then(function(c){t.pending==u&&(t.pending=null,c&&t.view.dispatch({effects:t.setHover.of(c)}))},function(c){return Mi(t.view.state,c,"hover tooltip")})}else s&&this.view.dispatch({effects:this.setHover.of(s)})}}}},{key:"mousemove",value:function(t){var n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));var r=this.active;if(r&&!pP(this.lastMove.target)||this.pending){var i=(r||this.pending).pos,o=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:i;(i==o?this.view.posAtCoords(this.lastMove)==i:function(a,s,u,c,l,f){var h=document.createRange(),d=a.domAtPos(s),v=a.domAtPos(u);h.setEnd(v.node,v.offset),h.setStart(d.node,d.offset);var p=h.getClientRects();h.detach();for(var m=0;m<p.length;m++){var g=p[m];if(Math.max(g.top-l,l-g.bottom,g.left-c,c-g.right)<=f)return!0}return!1}(this.view,i,o,t.clientX,t.clientY,6))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}},{key:"mouseleave",value:function(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!pP(t.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}},{key:"destroy",value:function(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}]),e}();function pP(e){for(var t=e;t;t=t.parentNode)if(t.nodeType==1&&t.classList.contains("cm-tooltip"))return!0;return!1}function mY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=cn.define(),r=Wr.define({create:function(){return null},update:function(i,o){if(i&&(t.hideOnChange&&(o.docChanged||o.selection)||t.hideOn&&t.hideOn(o,i)))return null;if(i&&o.docChanged){var a=o.changes.mapPos(i.pos,-1,ui.TrackDel);if(a==null)return null;var s=Object.assign(Object.create(null),i);s.pos=a,i.end!=null&&(s.end=o.changes.mapPos(i.end)),i=s}var u,c=at(o.effects);try{for(c.s();!(u=c.n()).done;){var l=u.value;l.is(n)&&(i=l.value),l.is(gY)&&(i=null)}}catch(f){c.e(f)}finally{c.f()}return i},provide:function(i){return Ed.from(i)}});return[r,zr.define(function(i){return new pY(i,e,r,n,t.hoverTime||300)}),vY]}var gY=cn.define(),mP=Se.define({combine:function(e){var t,n,r,i=at(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;t=t||o.topContainer,n=n||o.bottomContainer}}catch(a){i.e(a)}finally{i.f()}return{topContainer:t,bottomContainer:n}}});function ql(e,t){var n=e.plugin(gP),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var gP=zr.fromClass(function(){function e(t){X(this,e),this.input=t.state.facet(Hl),this.specs=this.input.filter(function(a){return a}),this.panels=this.specs.map(function(a){return a(t)});var n=t.state.facet(mP);this.top=new Ad(t,!0,n.topContainer),this.bottom=new Ad(t,!1,n.bottomContainer),this.top.sync(this.panels.filter(function(a){return a.top})),this.bottom.sync(this.panels.filter(function(a){return!a.top}));var r,i=at(this.panels);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(a){i.e(a)}finally{i.f()}}return tt(e,[{key:"update",value:function(t){var n=t.state.facet(mP);this.top.container!=n.topContainer&&(this.top.sync([]),this.top=new Ad(t.view,!0,n.topContainer)),this.bottom.container!=n.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ad(t.view,!1,n.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var r=t.state.facet(Hl);if(r!=this.input){var i,o=r.filter(function(w){return w}),a=[],s=[],u=[],c=[],l=at(o);try{for(l.s();!(i=l.n()).done;){var f=i.value,h=this.specs.indexOf(f),d=void 0;h<0?(d=f(t.view),c.push(d)):(d=this.panels[h]).update&&d.update(t),a.push(d),(d.top?s:u).push(d)}}catch(w){l.e(w)}finally{l.f()}this.specs=o,this.panels=a,this.top.sync(s),this.bottom.sync(u);for(var v=0,p=c;v<p.length;v++){var m=p[v];m.dom.classList.add("cm-panel"),m.mount&&m.mount()}}else{var g,y=at(this.panels);try{for(y.s();!(g=y.n()).done;){var b=g.value;b.update&&b.update(t)}}catch(w){y.e(w)}finally{y.f()}}}},{key:"destroy",value:function(){this.top.sync([]),this.bottom.sync([])}}]),e}(),{provide:function(e){return we.scrollMargins.of(function(t){var n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})}}),Ad=function(){function e(t,n,r){X(this,e),this.view=t,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}return tt(e,[{key:"sync",value:function(t){var n,r=at(this.panels);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.destroy&&t.indexOf(i)<0&&i.destroy()}}catch(o){r.e(o)}finally{r.f()}this.panels=t,this.syncDOM()}},{key:"syncDOM",value:function(){if(this.panels.length!=0){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";var t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}var n,r=this.dom.firstChild,i=at(this.panels);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.dom.parentNode==this.dom){for(;r!=o.dom;)r=yP(r);r=r.nextSibling}else this.dom.insertBefore(o.dom,r)}}catch(a){i.e(a)}finally{i.f()}for(;r;)r=yP(r)}else this.dom&&(this.dom.remove(),this.dom=void 0)}},{key:"scrollMargin",value:function(){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)}},{key:"syncClasses",value:function(){if(this.container&&this.classes!=this.view.themeClasses){var t,n=at(this.classes.split(" "));try{for(n.s();!(t=n.n()).done;){var r=t.value;r&&this.container.classList.remove(r)}}catch(s){n.e(s)}finally{n.f()}var i,o=at((this.classes=this.view.themeClasses).split(" "));try{for(o.s();!(i=o.n()).done;){var a=i.value;a&&this.container.classList.add(a)}}catch(s){o.e(s)}finally{o.f()}}}}]),e}();function yP(e){var t=e.nextSibling;return e.remove(),t}var Hl=Se.define({enables:gP}),na=function(e){Ot(n,Js);var t=Mt(n);function n(){return X(this,n),t.apply(this,arguments)}return tt(n,[{key:"compare",value:function(r){return this==r||this.constructor==r.constructor&&this.eq(r)}},{key:"eq",value:function(r){return!1}},{key:"destroy",value:function(r){}}]),n}();na.prototype.elementClass="",na.prototype.toDOM=void 0,na.prototype.mapMode=ui.TrackBefore,na.prototype.startSide=na.prototype.endSide=-1,na.prototype.point=!0;var Pd=Se.define(),yY={class:"",renderEmptyElements:!1,elementStyle:"",markers:function(){return Qn.empty},lineMarker:function(){return null},widgetMarker:function(){return null},lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Ul=Se.define();function bP(e){return[wP(),Ul.of(Object.assign(Object.assign({},yY),e))]}var $1=Se.define({combine:function(e){return e.some(function(t){return t})}});function wP(e){var t=[bY];return e&&e.fixed===!1&&t.push($1.of(!0)),t}var bY=zr.fromClass(function(){function e(t){X(this,e),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+"px",this.gutters=t.state.facet(Ul).map(function(o){return new kP(t,o)});var n,r=at(this.gutters);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.dom.appendChild(i.dom)}}catch(o){r.e(o)}finally{r.f()}this.fixed=!t.state.facet($1),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}return tt(e,[{key:"update",value:function(t){if(this.updateGutters(t)){var n=this.prevViewport,r=t.view.viewport,i=Math.min(n.to,r.to)-Math.max(n.from,r.from);this.syncGutters(i<.8*(r.to-r.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet($1)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}},{key:"syncGutters",value:function(t){var n=this,r=this.dom.nextSibling;t&&this.dom.remove();var i,o=Qn.iter(this.view.state.facet(Pd),this.view.viewport.from),a=[],s=this.gutters.map(function(x){return new wY(x,n.view.viewport,-n.view.documentPadding.top)}),u=at(this.view.viewportLineBlocks);try{for(u.s();!(i=u.n()).done;){var c=i.value;if(a.length&&(a=[]),Array.isArray(c.type)){var l,f=!0,h=at(c.type);try{for(h.s();!(l=h.n()).done;){var d=l.value;if(d.type==hr.Text&&f){_1(o,a,d.from);var v,p=at(s);try{for(p.s();!(v=p.n()).done;)v.value.line(this.view,d,a)}catch(x){p.e(x)}finally{p.f()}f=!1}else if(d.widget){var m,g=at(s);try{for(g.s();!(m=g.n()).done;)m.value.widget(this.view,d)}catch(x){g.e(x)}finally{g.f()}}}}catch(x){h.e(x)}finally{h.f()}}else if(c.type==hr.Text){_1(o,a,c.from);var y,b=at(s);try{for(b.s();!(y=b.n()).done;)y.value.line(this.view,c,a)}catch(x){b.e(x)}finally{b.f()}}}}catch(x){u.e(x)}finally{u.f()}var w,j=at(s);try{for(j.s();!(w=j.n()).done;)w.value.finish()}catch(x){j.e(x)}finally{j.f()}t&&this.view.scrollDOM.insertBefore(this.dom,r)}},{key:"updateGutters",value:function(t){var n=t.startState.facet(Ul),r=t.state.facet(Ul),i=t.docChanged||t.heightChanged||t.viewportChanged||!Qn.eq(t.startState.facet(Pd),t.state.facet(Pd),t.view.viewport.from,t.view.viewport.to);if(n==r){var o,a=at(this.gutters);try{for(a.s();!(o=a.n()).done;)o.value.update(t)&&(i=!0)}catch(y){a.e(y)}finally{a.f()}}else{i=!0;var s,u=[],c=at(r);try{for(c.s();!(s=c.n()).done;){var l=s.value,f=n.indexOf(l);f<0?u.push(new kP(this.view,l)):(this.gutters[f].update(t),u.push(this.gutters[f]))}}catch(y){c.e(y)}finally{c.f()}var h,d=at(this.gutters);try{for(d.s();!(h=d.n()).done;){var v=h.value;v.dom.remove(),u.indexOf(v)<0&&v.destroy()}}catch(y){d.e(y)}finally{d.f()}for(var p=0,m=u;p<m.length;p++){var g=m[p];this.dom.appendChild(g.dom)}this.gutters=u}return i}},{key:"destroy",value:function(){var t,n=at(this.gutters);try{for(n.s();!(t=n.n()).done;)t.value.destroy()}catch(r){n.e(r)}finally{n.f()}this.dom.remove()}}]),e}(),{provide:function(e){return we.scrollMargins.of(function(t){var n=t.plugin(e);return n&&n.gutters.length!=0&&n.fixed?t.textDirection==dr.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}:null})}});function xP(e){return Array.isArray(e)?e:[e]}function _1(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var wY=function(){function e(t,n,r){X(this,e),this.gutter=t,this.height=r,this.i=0,this.cursor=Qn.iter(t.markers,n.from)}return tt(e,[{key:"addElement",value:function(t,n,r){var i=this.gutter,o=n.top-this.height;if(this.i==i.elements.length){var a=new jP(t,n.height,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(t,n.height,o,r);this.height=n.bottom,this.i++}},{key:"line",value:function(t,n,r){var i=[];_1(this.cursor,i,n.from),r.length&&(i=i.concat(r));var o=this.gutter.config.lineMarker(t,n,i);o&&i.unshift(o);var a=this.gutter;(i.length!=0||a.config.renderEmptyElements)&&this.addElement(t,n,i)}},{key:"widget",value:function(t,n){var r=this.gutter.config.widgetMarker(t,n.widget,n);r&&this.addElement(t,n,[r])}},{key:"finish",value:function(){for(var t=this.gutter;t.elements.length>this.i;){var n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}}]),e}(),kP=function(){function e(t,n){var r=this;X(this,e),this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var i=function(a){r.dom.addEventListener(a,function(s){var u,c=s.target;if(c!=r.dom&&r.dom.contains(c)){for(;c.parentNode!=r.dom;)c=c.parentNode;var l=c.getBoundingClientRect();u=(l.top+l.bottom)/2}else u=s.clientY;var f=t.lineBlockAtHeight(u-t.documentTop);n.domEventHandlers[a](t,f,s)&&s.preventDefault()})};for(var o in n.domEventHandlers)i(o);this.markers=xP(n.markers(t)),n.initialSpacer&&(this.spacer=new jP(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return tt(e,[{key:"update",value:function(t){var n=this.markers;if(this.markers=xP(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){var r=this.config.updateSpacer(this.spacer.markers[0],t);r!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[r])}var i=t.view.viewport;return!Qn.eq(this.markers,n,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}},{key:"destroy",value:function(){var t,n=at(this.elements);try{for(n.s();!(t=n.n()).done;)t.value.destroy()}catch(r){n.e(r)}finally{n.f()}}}]),e}(),jP=function(){function e(t,n,r,i){X(this,e),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,r,i)}return tt(e,[{key:"update",value:function(t,n,r,i){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),function(o,a){if(o.length!=a.length)return!1;for(var s=0;s<o.length;s++)if(!o[s].compare(a[s]))return!1;return!0}(this.markers,i)||this.setMarkers(t,i)}},{key:"setMarkers",value:function(t,n){for(var r="cm-gutterElement",i=this.dom.firstChild,o=0,a=0;;){var s=a,u=o<n.length?n[o++]:null,c=!1;if(u){var l=u.elementClass;l&&(r+=" "+l);for(var f=a;f<this.markers.length;f++)if(this.markers[f].compare(u)){s=f,c=!0;break}}else s=this.markers.length;for(;a<s;){var h=this.markers[a++];if(h.toDOM){h.destroy(i);var d=i.nextSibling;i.remove(),i=d}}if(!u)break;u.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(u.toDOM(t),i)),c&&a++}this.dom.className=r,this.markers=n}},{key:"destroy",value:function(){this.setMarkers(null,[])}}]),e}(),xY=Se.define(),wc=Se.define({combine:function(e){return Ui(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers:function(t,n){var r=Object.assign({},t),i=function(){var a=r[o],s=n[o];r[o]=a?function(u,c,l){return a(u,c,l)||s(u,c,l)}:s};for(var o in n)i();return r}})}}),O1=function(e){Ot(n,na);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).number=r,i}return tt(n,[{key:"eq",value:function(r){return this.number==r.number}},{key:"toDOM",value:function(){return document.createTextNode(this.number)}}]),n}();function M1(e,t){return e.state.facet(wc).formatNumber(t,e.state)}var kY=Ul.compute([wc],function(e){return{class:"cm-lineNumbers",renderEmptyElements:!1,markers:function(t){return t.state.facet(xY)},lineMarker:function(t,n,r){return r.some(function(i){return i.toDOM})?null:new O1(M1(t,t.state.doc.lineAt(n.from).number))},widgetMarker:function(){return null},lineMarkerChange:function(t){return t.startState.facet(wc)!=t.state.facet(wc)},initialSpacer:function(t){return new O1(M1(t,SP(t.state.doc.lines)))},updateSpacer:function(t,n){var r=M1(n.view,SP(n.view.state.doc.lines));return r==t.number?t:new O1(r)},domEventHandlers:e.facet(wc).domEventHandlers}});function jY(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[wc.of(e),wP(),kY]}function SP(e){for(var t=9;t<e;)t=10*t+9;return t}var SY=new(function(e){Ot(n,na);var t=Mt(n);function n(){var r;return X(this,n),(r=t.apply(this,arguments)).elementClass="cm-activeLineGutter",r}return tt(n)}()),CY=Pd.compute(["selection"],function(e){var t,n=[],r=-1,i=at(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.doc.lineAt(o.head).from;a>r&&(r=a,n.push(SY.range(a)))}}catch(s){i.e(s)}finally{i.f()}return Qn.of(n)}),$Y=0,E1=tt(function e(t,n){X(this,e),this.from=t,this.to=n}),hn=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,e),this.id=$Y++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return tt(e,[{key:"add",value:function(t){var n=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=Ji.match(t)),function(r){var i=t(r);return i===void 0?null:[n,i]}}}]),e}();hn.closedBy=new hn({deserialize:function(e){return e.split(" ")}}),hn.openedBy=new hn({deserialize:function(e){return e.split(" ")}}),hn.group=new hn({deserialize:function(e){return e.split(" ")}}),hn.contextHash=new hn({perNode:!0}),hn.lookAhead=new hn({perNode:!0}),hn.mounted=new hn({perNode:!0});var _Y=Object.create(null),Ji=function(){function e(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;X(this,e),this.name=t,this.props=n,this.id=r,this.flags=i}return tt(e,[{key:"prop",value:function(t){return this.props[t.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(t){if(typeof t=="string"){if(this.name==t)return!0;var n=this.prop(hn.group);return!!n&&n.indexOf(t)>-1}return this.id==t}}],[{key:"define",value:function(t){var n=t.props&&t.props.length?Object.create(null):_Y,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||"",n,t.id,r);if(t.props){var o,a=at(t.props);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}}catch(u){a.e(u)}finally{a.f()}}return i}},{key:"match",value:function(t){var n=Object.create(null);for(var r in t){var i,o=at(r.split(" "));try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=t[r]}}catch(s){o.e(s)}finally{o.f()}}return function(s){for(var u=s.prop(hn.group),c=-1;c<(u?u.length:0);c++){var l=n[c<0?s.name:u[c]];if(l)return l}}}}]),e}();Ji.none=new Ji("",Object.create(null),0,8);var Hr,OY=function(){function e(t){X(this,e),this.types=t;for(var n=0;n<t.length;n++)if(t[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}return tt(e,[{key:"extend",value:function(){for(var t=[],n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o,a=at(this.types);try{for(a.s();!(o=a.n()).done;){var s,u=o.value,c=null,l=at(r);try{for(l.s();!(s=l.n()).done;){var f=(0,s.value)(u);f&&(c||(c=Object.assign({},u.props)),c[f[0].id]=f[1])}}catch(h){l.e(h)}finally{l.f()}t.push(c?new Ji(u.name,c,u.id,u.flags):u)}}catch(h){a.e(h)}finally{a.f()}return new e(t)}}]),e}(),Td=new WeakMap,CP=new WeakMap;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"})(Hr||(Hr={}));var Ur=function(){function e(t,n,r,i,o){if(X(this,e),this.type=t,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);var a,s=at(o);try{for(s.s();!(a=s.n()).done;){var u=ke(a.value,2),c=u[0],l=u[1];this.props[typeof c=="number"?c:c.id]=l}}catch(f){s.e(f)}finally{s.f()}}}return tt(e,[{key:"toString",value:function(){var t=this.prop(hn.mounted);if(t&&!t.overlay)return t.tree.toString();var n,r="",i=at(this.children);try{for(i.s();!(n=i.n()).done;){var o=n.value.toString();o&&(r&&(r+=","),r+=o)}}catch(a){i.e(a)}finally{i.f()}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}},{key:"cursor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Id(this.topNode,t)}},{key:"cursorAt",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=Td.get(this)||this.topNode,i=new Id(r);return i.moveTo(t,n),Td.set(this,i._tree),i}},{key:"topNode",get:function(){return new Kl(this,0,0,null)}},{key:"resolve",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=xc(Td.get(this)||this.topNode,t,n,!1);return Td.set(this,r),r}},{key:"resolveInner",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=xc(CP.get(this)||this.topNode,t,n,!0);return CP.set(this,r),r}},{key:"iterate",value:function(t){for(var n=t.enter,r=t.leave,i=t.from,o=i===void 0?0:i,a=t.to,s=a===void 0?this.length:a,u=this.cursor((t.mode||0)|Hr.IncludeAnonymous);;){var c=!1;if(u.from<=s&&u.to>=o&&(u.type.isAnonymous||n(u)!==!1)){if(u.firstChild())continue;c=!0}for(;c&&r&&!u.type.isAnonymous&&r(u),!u.nextSibling();){if(!u.parent())return;c=!0}}}},{key:"prop",value:function(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}},{key:"propValues",get:function(){var t=[];if(this.props)for(var n in this.props)t.push([+n,this.props[n]]);return t}},{key:"balance",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.children.length<=8?this:T1(Ji.none,this.children,this.positions,0,this.children.length,0,this.length,function(r,i,o){return new e(t.type,r,i,o,t.propValues)},n.makeTree||function(r,i,o){return new e(Ji.none,r,i,o)})}}],[{key:"build",value:function(t){return AY(t)}}]),e}();Ur.empty=new Ur(Ji.none,[],[],0);var MY=function(){function e(t,n){X(this,e),this.buffer=t,this.index=n}return tt(e,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new e(this.buffer,this.index)}}]),e}(),Jl=function(){function e(t,n,r){X(this,e),this.buffer=t,this.length=n,this.set=r}return tt(e,[{key:"type",get:function(){return Ji.none}},{key:"toString",value:function(){for(var t=[],n=0;n<this.buffer.length;)t.push(this.childString(n)),n=this.buffer[n+3];return t.join(",")}},{key:"childString",value:function(t){var n=this.buffer[t],r=this.buffer[t+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),r==(t+=4))return o;for(var a=[];t<r;)a.push(this.childString(t)),t=this.buffer[t+3];return o+"("+a.join(",")+")"}},{key:"findChild",value:function(t,n,r,i,o){for(var a=this.buffer,s=-1,u=t;u!=n&&!($P(o,i,a[u+1],a[u+2])&&(s=u,r>0));u=a[u+3]);return s}},{key:"slice",value:function(t,n,r,i){for(var o=this.buffer,a=new Uint16Array(n-t),s=t,u=0;s<n;)a[u++]=o[s++],a[u++]=o[s++]-r,a[u++]=o[s++]-r,a[u++]=o[s++]-t;return new e(a,i-r,this.set)}}]),e}();function $P(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function _P(e,t){for(var n=e.childBefore(t);n;){var r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(e=n,n=r.prevSibling):n=r}return e}function xc(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){var o=!r&&e instanceof Kl&&e.index<0?null:e.parent;if(!o)return e;e=o}var a=r?0:Hr.IgnoreOverlays;if(r)for(var s=e,u=s.parent;u;u=(s=u).parent)s instanceof Kl&&s.index<0&&((i=u.enter(t,n,a))===null||i===void 0?void 0:i.from)!=s.from&&(e=u);for(;;){var c=e.enter(t,n,a);if(!c)return e;e=c}}var Kl=function(){function e(t,n,r,i){X(this,e),this._tree=t,this.from=n,this.index=r,this._parent=i}return tt(e,[{key:"type",get:function(){return this._tree.type}},{key:"name",get:function(){return this._tree.type.name}},{key:"to",get:function(){return this.from+this._tree.length}},{key:"nextChild",value:function(t,n,r,i){for(var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=this;;){for(var s=a._tree,u=s.children,c=s.positions,l=n>0?u.length:-1;t!=l;t+=n){var f=u[t],h=c[t]+a.from;if($P(i,r,h,h+f.length)){if(f instanceof Jl){if(o&Hr.ExcludeBuffers)continue;var d=f.findChild(0,f.buffer.length,n,r-h,i);if(d>-1)return new A1(new EY(a,f,t,h),null,d)}else if(o&Hr.IncludeAnonymous||!f.type.isAnonymous||P1(f)){var v=void 0;if(!(o&Hr.IgnoreMounts)&&f.props&&(v=f.prop(hn.mounted))&&!v.overlay)return new e(v.tree,h,t,a);var p=new e(f,h,t,a);return o&Hr.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?f.children.length-1:0,n,r,i)}}}if(o&Hr.IncludeAnonymous||!a.type.isAnonymous||(t=a.index>=0?a.index+n:n<0?-1:a._parent._tree.children.length,!(a=a._parent)))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this._tree.children.length-1,-1,0,4)}},{key:"childAfter",value:function(t){return this.nextChild(0,1,t,2)}},{key:"childBefore",value:function(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}},{key:"enter",value:function(t,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(!(i&Hr.IgnoreOverlays)&&(r=this._tree.prop(hn.mounted))&&r.overlay){var o,a=t-this.from,s=at(r.overlay);try{for(s.s();!(o=s.n()).done;){var u=o.value,c=u.from,l=u.to;if((n>0?c<=a:c<a)&&(n<0?l>=a:l>a))return new e(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(f){s.e(f)}finally{s.f()}}return this.nextChild(0,1,t,n,i)}},{key:"nextSignificantParent",value:function(){for(var t=this;t.type.isAnonymous&&t._parent;)t=t._parent;return t}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new Id(this,arguments.length>0&&arguments[0]!==void 0?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(t){return xc(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,!1)}},{key:"resolveInner",value:function(t){return xc(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(t){return _P(this,t)}},{key:"getChild",value:function(t){var n=Rd(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,arguments.length>2&&arguments[2]!==void 0?arguments[2]:null);return n.length?n[0]:null}},{key:"getChildren",value:function(t){return Rd(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,arguments.length>2&&arguments[2]!==void 0?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(t){return Nd(this,t)}}]),e}();function Rd(e,t,n,r){var i=e.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(;!i.type.is(n);)if(!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Nd(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length-1,r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var EY=tt(function e(t,n,r,i){X(this,e),this.parent=t,this.buffer=n,this.index=r,this.start=i}),A1=function(){function e(t,n,r){X(this,e),this.context=t,this._parent=n,this.index=r,this.type=t.buffer.set.types[t.buffer.buffer[r]]}return tt(e,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(t,n,r){var i=this.context.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return o<0?null:new e(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(t){return this.child(1,t,2)}},{key:"childBefore",value:function(t){return this.child(-1,t,-2)}},{key:"enter",value:function(t,n){if((arguments.length>2&&arguments[2]!==void 0?arguments[2]:0)&Hr.ExcludeBuffers)return null;var r=this.context.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return i<0?null:new e(this.context,this,i)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}},{key:"nextSibling",get:function(){var t=this.context.buffer,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}},{key:"prevSibling",get:function(){var t=this.context.buffer,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}},{key:"cursor",value:function(){return new Id(this,arguments.length>0&&arguments[0]!==void 0?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var t=[],n=[],r=this.context.buffer,i=this.index+4,o=r.buffer[this.index+3];if(o>i){var a=r.buffer[this.index+1],s=r.buffer[this.index+2];t.push(r.slice(i,o,a,s)),n.push(0)}return new Ur(this.type,t,n,this.to-this.from)}},{key:"resolve",value:function(t){return xc(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,!1)}},{key:"resolveInner",value:function(t){return xc(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(t){return _P(this,t)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(t){var n=Rd(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,arguments.length>2&&arguments[2]!==void 0?arguments[2]:null);return n.length?n[0]:null}},{key:"getChildren",value:function(t){return Rd(this,t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,arguments.length>2&&arguments[2]!==void 0?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(t){return Nd(this,t)}}]),e}(),Id=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(X(this,e),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Kl)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(var r=t._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=t,this.yieldBuf(t.index)}}return tt(e,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}},{key:"yieldBuf",value:function(t,n){this.index=t;var r=this.buffer,i=r.start,o=r.buffer;return this.type=n||o.set.types[o.buffer[t]],this.from=i+o.buffer[t+1],this.to=i+o.buffer[t+2],!0}},{key:"yield",value:function(t){return!!t&&(t instanceof Kl?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(t,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,n,r,this.mode));var i=this.buffer.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.buffer.start,r);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(t){return this.enterChild(1,t,2)}},{key:"childBefore",value:function(t){return this.enterChild(-1,t,-2)}},{key:"enter",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.mode;return this.buffer?!(r&Hr.ExcludeBuffers)&&this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,r))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&Hr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var t=this.mode&Hr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}},{key:"sibling",value:function(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));var n=this.buffer.buffer,r=this.stack.length-1;if(t<0){var i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{var 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+t,t,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(t){var n,r,i=this.buffer;if(i){if(t>0){if(this.index<i.buffer.buffer.length)return!1}else for(var o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;n=i.index,r=i.parent}else{var a=this._tree;n=a.index,r=a._parent}for(;r;n=(s=r).index,r=s._parent,s){var s;if(n>-1)for(var u=n+t,c=t<0?-1:r._tree.children.length;u!=c;u+=t){var l=r._tree.children[u];if(this.mode&Hr.IncludeAnonymous||l instanceof Jl||!l.type.isAnonymous||P1(l))return!1}}return!0}},{key:"move",value:function(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}},{key:"next",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.move(1,t)}},{key:"prev",value:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.move(-1,t)}},{key:"moveTo",value:function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,n););return this}},{key:"node",get:function(){if(!this.buffer)return this._tree;var t=this.bufferNode,n=null,r=0;if(t&&t.context==this.buffer)t:for(var i=this.index,o=this.stack.length;o>=0;){for(var a=t;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break t}i=this.stack[--o]}for(var s=r;s<this.stack.length;s++)n=new A1(this.buffer,n,this.stack[s]);return this.bufferNode=new A1(this.buffer,n,this.index)}},{key:"tree",get:function(){return this.buffer?null:this._tree._tree}},{key:"iterate",value:function(t,n){for(var r=0;;){var i=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;i&&n&&n(this),i=this.type.isAnonymous,!this.nextSibling();){if(!r)return;this.parent(),r--,i=!0}}}},{key:"matchContext",value:function(t){if(!this.buffer)return Nd(this.node,t);for(var n=this.buffer.buffer,r=n.set.types,i=t.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return Nd(this.node,t,i);var a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(t[i]&&t[i]!=a.name)return!1;i--}}return!0}}]),e}();function P1(e){return e.children.some(function(t){return t instanceof Jl||!t.type.isAnonymous||P1(t)})}function AY(e){var t,n=e.buffer,r=e.nodeSet,i=e.maxBufferLength,o=i===void 0?1024:i,a=e.reused,s=a===void 0?[]:a,u=e.minRepeatType,c=u===void 0?r.types.length:u,l=Array.isArray(n)?new MY(n,n.length):n,f=r.types,h=0,d=0;function v(j,x,R,M,E){for(var N=l.id,A=l.start,L=l.end,W=l.size,O=d;W<0;){if(l.next(),W==-1){var I=s[N];return R.push(I),void M.push(A-j)}if(W==-3)return void(h=N);if(W==-4)return void(d=N);throw new RangeError("Unrecognized record size: ".concat(W))}var q,P,_=f[N],S=A-j;if(L-A<=o&&(P=function(Pt,pt){var Bt=l.fork(),K=0,$t=0,Kt=0,Ct=Bt.end-o,V={size:0,start:0,skip:0};t:for(var Q=Bt.pos-Pt;Bt.pos>Q;){var ft=Bt.size;if(Bt.id==pt&&ft>=0)V.size=K,V.start=$t,V.skip=Kt,Kt+=4,K+=4,Bt.next();else{var wt=Bt.pos-ft;if(ft<0||wt<Q||Bt.start<Ct)break;var _t=Bt.id>=c?4:0,Ut=Bt.start;for(Bt.next();Bt.pos>wt;){if(Bt.size<0){if(Bt.size!=-3)break t;_t+=4}else Bt.id>=c&&(_t+=4);Bt.next()}$t=Ut,K+=ft,Kt+=_t}}return(pt<0||K==Pt)&&(V.size=K,V.start=$t,V.skip=Kt),V.size>4?V:void 0}(l.pos-x,E))){for(var $=new Uint16Array(P.size-P.skip),D=l.pos-P.size,B=$.length;l.pos>D;)B=g(P.start,$,B);q=new Jl($,L-P.start,r),S=P.start-j}else{var k=l.pos-W;l.next();for(var H=[],U=[],st=N>=c?N:-1,ut=0,gt=L;l.pos>k;)st>=0&&l.id==st&&l.size>=0?(l.end<=gt-o&&(p(H,U,A,ut,l.end,gt,st,O),ut=H.length,gt=l.end),l.next()):v(A,k,H,U,st);if(st>=0&&ut>0&&ut<H.length&&p(H,U,A,ut,A,gt,st,O),H.reverse(),U.reverse(),st>-1&&ut>0){var St=function(Pt){return function(pt,Bt,K){var $t,Kt,Ct=0,V=pt.length-1;if(V>=0&&($t=pt[V])instanceof Ur){if(!V&&$t.type==Pt&&$t.length==K)return $t;(Kt=$t.prop(hn.lookAhead))&&(Ct=Bt[V]+$t.length+Kt)}return m(Pt,pt,Bt,K,Ct)}}(_);q=T1(_,H,U,0,H.length,0,L-A,St,St)}else q=m(_,H,U,L-A,O-L)}R.push(q),M.push(S)}function p(j,x,R,M,E,N,A,L){for(var W=[],O=[];j.length>M;)W.push(j.pop()),O.push(x.pop()+R-E);j.push(m(r.types[A],W,O,N-E,L-N)),x.push(E-R)}function m(j,x,R,M){var E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,N=arguments.length>5?arguments[5]:void 0;if(h){var A=[hn.contextHash,h];N=N?[A].concat(N):[A]}if(E>25){var L=[hn.lookAhead,E];N=N?[L].concat(N):[L]}return new Ur(j,x,R,M,N)}function g(j,x,R){var M=l.id,E=l.start,N=l.end,A=l.size;if(l.next(),A>=0&&M<c){var L=R;if(A>4)for(var W=l.pos-(A-4);l.pos>W;)R=g(j,x,R);x[--R]=L,x[--R]=N-j,x[--R]=E-j,x[--R]=M}else A==-3?h=M:A==-4&&(d=M);return R}for(var y=[],b=[];l.pos>0;)v(e.start||0,e.bufferStart||0,y,b,-1);var w=(t=e.length)!==null&&t!==void 0?t:y.length?b[0]+y[0].length:0;return new Ur(f[e.topID],y.reverse(),b.reverse(),w)}var OP=new WeakMap;function Dd(e,t){if(!e.isAnonymous||t instanceof Jl||t.type!=e)return 1;var n=OP.get(t);if(n==null){n=1;var r,i=at(t.children);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.type!=e||!(o instanceof Ur)){n=1;break}n+=Dd(e,o)}}catch(a){i.e(a)}finally{i.f()}OP.set(t,n)}return n}function T1(e,t,n,r,i,o,a,s,u){for(var c=0,l=r;l<i;l++)c+=Dd(e,t[l]);var f=Math.ceil(1.5*c/8),h=[],d=[];return function v(p,m,g,y,b){for(var w=g;w<y;){var j=w,x=m[w],R=Dd(e,p[w]);for(w++;w<y;w++){var M=Dd(e,p[w]);if(R+M>=f)break;R+=M}if(w==j+1){if(R>f){var E=p[j];v(E.children,E.positions,0,E.children.length,m[j]+b);continue}h.push(p[j])}else{var N=m[w-1]+p[w-1].length-x;h.push(T1(e,p,m,j,w,x,N,null,u))}d.push(x+b-o)}}(t,n,r,i,0),(s||u)(h,d,a)}var Ld=function(){function e(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=arguments.length>5&&arguments[5]!==void 0&&arguments[5];X(this,e),this.from=t,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}return tt(e,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],o=[new e(0,t.length,t,0,!1,i)],a=at(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;s.to>t.length&&o.push(s)}}catch(u){a.e(u)}finally{a.f()}return o}},{key:"applyChanges",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:128;if(!n.length)return t;for(var i=[],o=1,a=t.length?t[0]:null,s=0,u=0,c=0;;s++){var l=s<n.length?n[s]:null,f=l?l.fromA:1e9;if(f-u>=r)for(;a&&a.from<f;){var h=a;if(u>=h.from||f<=h.to||c){var d=Math.max(h.from,u)-c,v=Math.min(h.to,f)-c;h=d>=v?null:new e(d,v,h.tree,h.offset+c,s>0,!!l)}if(h&&i.push(h),a.to>f)break;a=o<t.length?t[o++]:null}if(!l)break;u=l.toA,c=l.toA-l.toB}return i}}]),e}(),MP=function(){function e(){X(this,e)}return tt(e,[{key:"startParse",value:function(t,n,r){return typeof t=="string"&&(t=new PY(t)),r=r?r.length?r.map(function(i){return new E1(i.from,i.to)}):[new E1(0,0)]:[new E1(0,t.length)],this.createParse(t,n||[],r)}},{key:"parse",value:function(t,n,r){for(var i=this.startParse(t,n,r);;){var o=i.advance();if(o)return o}}}]),e}(),PY=function(){function e(t){X(this,e),this.string=t}return tt(e,[{key:"length",get:function(){return this.string.length}},{key:"chunk",value:function(t){return this.string.slice(t)}},{key:"lineChunks",get:function(){return!1}},{key:"read",value:function(t,n){return this.string.slice(t,n)}}]),e}();new hn({perNode:!0});var TY=0,ls=function(){function e(t,n,r){X(this,e),this.set=t,this.base=n,this.modified=r,this.id=TY++}return tt(e,null,[{key:"define",value:function(t){if(t!=null&&t.base)throw new Error("Can not derive from a modified tag");var n=new e([],null,[]);if(n.set.push(n),t){var r,i=at(t.set);try{for(i.s();!(r=i.n()).done;){var o=r.value;n.set.push(o)}}catch(a){i.e(a)}finally{i.f()}}return n}},{key:"defineModifier",value:function(){var t=new EP;return function(n){return n.modified.indexOf(t)>-1?n:EP.get(n.base||n,n.modified.concat(t).sort(function(r,i){return r.id-i.id}))}}}]),e}(),RY=0,EP=function(){function e(){X(this,e),this.instances=[],this.id=RY++}return tt(e,null,[{key:"get",value:function(t,n){if(!n.length)return t;var r=n[0].instances.find(function(p){return p.base==t&&function(m,g){return m.length==g.length&&m.every(function(y,b){return y==g[b]})}(n,p.modified)});if(r)return r;var i,o=[],a=new ls(o,t,n),s=at(n);try{for(s.s();!(i=s.n()).done;)i.value.instances.push(a)}catch(p){s.e(p)}finally{s.f()}var u,c=AP(n),l=at(t.set);try{for(l.s();!(u=l.n()).done;){var f,h=u.value,d=at(c);try{for(d.s();!(f=d.n()).done;){var v=f.value;o.push(e.get(h,v))}}catch(p){d.e(p)}finally{d.f()}}}catch(p){l.e(p)}finally{l.f()}return a}}]),e}();function AP(e){for(var t=[e],n=0;n<e.length;n++){var r,i=at(AP(e.slice(0,n).concat(e.slice(n+1))));try{for(i.s();!(r=i.n()).done;){var o=r.value;t.push(o)}}catch(a){i.e(a)}finally{i.f()}}return t}function PP(e){var t=Object.create(null);for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]);var i,o=at(n.split(" "));try{for(o.s();!(i=o.n()).done;){var a=i.value;if(a){for(var s=[],u=2,c=a,l=0;;){if(c=="..."&&l>0&&l+3==a.length){u=1;break}var f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!f)throw new RangeError("Invalid path: "+a);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),(l+=f[0].length)==a.length)break;var h=a[l++];if(l==a.length&&h=="!"){u=0;break}if(h!="/")throw new RangeError("Invalid path: "+a);c=a.slice(l)}var d=s.length-1,v=s[d];if(!v)throw new RangeError("Invalid path: "+a);var p=new NY(r,u,d>0?s.slice(0,d):null);t[v]=p.sort(t[v])}}}catch(m){o.e(m)}finally{o.f()}}return TP.add(t)}var TP=new hn,NY=function(){function e(t,n,r,i){X(this,e),this.tags=t,this.mode=n,this.context=r,this.next=i}return tt(e,[{key:"sort",value:function(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}},{key:"depth",get:function(){return this.context?this.context.length:0}}]),e}();function RP(e,t){var n,r=Object.create(null),i=at(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(Array.isArray(o.tag)){var a,s=at(o.tag);try{for(s.s();!(a=s.n()).done;){var u=a.value;r[u.id]=o.class}}catch(d){s.e(d)}finally{s.f()}}else r[o.tag.id]=o.class}}catch(d){i.e(d)}finally{i.f()}var c=t||{},l=c.scope,f=c.all,h=f===void 0?null:f;return{style:function(d){var v,p=h,m=at(d);try{for(m.s();!(v=m.n()).done;){var g,y=at(v.value.set);try{for(y.s();!(g=y.n()).done;){var b=g.value,w=r[b.id];if(w){p=p?p+" "+w:w;break}}}catch(j){y.e(j)}finally{y.f()}}}catch(j){m.e(j)}finally{m.f()}return p},scope:l}}function IY(e,t){var n,r=null,i=at(e);try{for(i.s();!(n=i.n()).done;){var o=n.value.style(t);o&&(r=r?r+" "+o:o)}}catch(a){i.e(a)}finally{i.f()}return r}function DY(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:e.length,o=new LY(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}var R1,LY=function(){function e(t,n,r){X(this,e),this.at=t,this.highlighters=n,this.span=r,this.class=""}return tt(e,[{key:"startSpan",value:function(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}},{key:"flush",value:function(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}},{key:"highlightRange",value:function(t,n,r,i,o){var a=t.type,s=t.from,u=t.to;if(!(s>=r||u<=n)){a.isTop&&(o=this.highlighters.filter(function(R){return!R.scope||R.scope(a)}));for(var c=i,l=a.prop(TP),f=!1;l;){if(!l.context||t.matchContext(l.context)){var h=IY(o,l.tags);h&&(c&&(c+=" "),c+=h,l.mode==1?i+=(i?" ":"")+h:l.mode==0&&(f=!0));break}l=l.next}if(this.startSpan(t.from,c),!f){var d=t.tree&&t.tree.prop(hn.mounted);if(d&&d.overlay){for(var v=t.node.enter(d.overlay[0].from+s,1),p=this.highlighters.filter(function(R){return!R.scope||R.scope(d.tree.type)}),m=t.firstChild(),g=0,y=s;;g++){var b=g<d.overlay.length?d.overlay[g]:null,w=b?b.from+s:u,j=Math.max(n,y),x=Math.min(r,w);if(j<x&&m)for(;t.from<x&&(this.highlightRange(t,j,x,i,o),this.startSpan(Math.min(r,t.to),c),!(t.to>=w)&&t.nextSibling()););if(!b||w>r)break;(y=b.to+s)>n&&(this.highlightRange(v.cursor(),Math.max(n,b.from+s),Math.min(r,y),i,p),this.startSpan(y,c))}m&&t.parent()}else if(t.firstChild()){do if(!(t.to<=n)){if(t.from>=r)break;this.highlightRange(t,n,r,i,o),this.startSpan(Math.min(r,t.to),c)}while(t.nextSibling());t.parent()}}}}}]),e}(),ae=ls.define,Bd=ae(),fs=ae(),NP=ae(fs),IP=ae(fs),hs=ae(),zd=ae(hs),N1=ae(hs),ra=ae(),Gs=ae(ra),ia=ae(),oa=ae(),I1=ae(),Gl=ae(I1),Fd=ae(),Xt={comment:Bd,lineComment:ae(Bd),blockComment:ae(Bd),docComment:ae(Bd),name:fs,variableName:ae(fs),typeName:NP,tagName:ae(NP),propertyName:IP,attributeName:ae(IP),className:ae(fs),labelName:ae(fs),namespace:ae(fs),macroName:ae(fs),literal:hs,string:zd,docString:ae(zd),character:ae(zd),attributeValue:ae(zd),number:N1,integer:ae(N1),float:ae(N1),bool:ae(hs),regexp:ae(hs),escape:ae(hs),color:ae(hs),url:ae(hs),keyword:ia,self:ae(ia),null:ae(ia),atom:ae(ia),unit:ae(ia),modifier:ae(ia),operatorKeyword:ae(ia),controlKeyword:ae(ia),definitionKeyword:ae(ia),moduleKeyword:ae(ia),operator:oa,derefOperator:ae(oa),arithmeticOperator:ae(oa),logicOperator:ae(oa),bitwiseOperator:ae(oa),compareOperator:ae(oa),updateOperator:ae(oa),definitionOperator:ae(oa),typeOperator:ae(oa),controlOperator:ae(oa),punctuation:I1,separator:ae(I1),bracket:Gl,angleBracket:ae(Gl),squareBracket:ae(Gl),paren:ae(Gl),brace:ae(Gl),content:ra,heading:Gs,heading1:ae(Gs),heading2:ae(Gs),heading3:ae(Gs),heading4:ae(Gs),heading5:ae(Gs),heading6:ae(Gs),contentSeparator:ae(ra),list:ae(ra),quote:ae(ra),emphasis:ae(ra),strong:ae(ra),link:ae(ra),monospace:ae(ra),strikethrough:ae(ra),inserted:ae(),deleted:ae(),changed:ae(),invalid:ae(),meta:Fd,documentMeta:ae(Fd),annotation:ae(Fd),processingInstruction:ae(Fd),definition:ls.defineModifier(),constant:ls.defineModifier(),function:ls.defineModifier(),standard:ls.defineModifier(),local:ls.defineModifier(),special:ls.defineModifier()};RP([{tag:Xt.link,class:"tok-link"},{tag:Xt.heading,class:"tok-heading"},{tag:Xt.emphasis,class:"tok-emphasis"},{tag:Xt.strong,class:"tok-strong"},{tag:Xt.keyword,class:"tok-keyword"},{tag:Xt.atom,class:"tok-atom"},{tag:Xt.bool,class:"tok-bool"},{tag:Xt.url,class:"tok-url"},{tag:Xt.labelName,class:"tok-labelName"},{tag:Xt.inserted,class:"tok-inserted"},{tag:Xt.deleted,class:"tok-deleted"},{tag:Xt.literal,class:"tok-literal"},{tag:Xt.string,class:"tok-string"},{tag:Xt.number,class:"tok-number"},{tag:[Xt.regexp,Xt.escape,Xt.special(Xt.string)],class:"tok-string2"},{tag:Xt.variableName,class:"tok-variableName"},{tag:Xt.local(Xt.variableName),class:"tok-variableName tok-local"},{tag:Xt.definition(Xt.variableName),class:"tok-variableName tok-definition"},{tag:Xt.special(Xt.variableName),class:"tok-variableName2"},{tag:Xt.definition(Xt.propertyName),class:"tok-propertyName tok-definition"},{tag:Xt.typeName,class:"tok-typeName"},{tag:Xt.namespace,class:"tok-namespace"},{tag:Xt.className,class:"tok-className"},{tag:Xt.macroName,class:"tok-macroName"},{tag:Xt.propertyName,class:"tok-propertyName"},{tag:Xt.operator,class:"tok-operator"},{tag:Xt.comment,class:"tok-comment"},{tag:Xt.meta,class:"tok-meta"},{tag:Xt.invalid,class:"tok-invalid"},{tag:Xt.punctuation,class:"tok-punctuation"}]);var kc=new hn,BY=new hn,bo=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"";X(this,e),this.data=t,this.name=i,Hn.prototype.hasOwnProperty("tree")||Object.defineProperty(Hn.prototype,"tree",{get:function(){return ti(this)}}),this.parser=n,this.extension=[ds.of(this),Hn.languageData.of(function(o,a,s){var u=DP(o,a,s),c=u.type.prop(kc);if(!c)return[];var l=o.facet(c),f=u.type.prop(BY);if(f){var h,d=u.resolve(a-u.from,s),v=at(f);try{for(v.s();!(h=v.n()).done;){var p=h.value;if(p.test(d,o)){var m=o.facet(p.facet);return p.type=="replace"?m:m.concat(l)}}}catch(g){v.e(g)}finally{v.f()}}return l})].concat(r)}return tt(e,[{key:"isActiveAt",value:function(t,n){return DP(t,n,arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1).type.prop(kc)==this.data}},{key:"findRegions",value:function(t){var n=this,r=t.facet(ds);if((r==null?void 0:r.data)==this.data)return[{from:0,to:t.doc.length}];if(!r||!r.allowsNesting)return[];var i=[];return function o(a,s){if(a.prop(kc)!=n.data){var u=a.prop(hn.mounted);if(u){if(u.tree.prop(kc)==n.data){if(u.overlay){var c,l=at(u.overlay);try{for(l.s();!(c=l.n()).done;){var f=c.value;i.push({from:f.from+s,to:f.to+s})}}catch(p){l.e(p)}finally{l.f()}}else i.push({from:s,to:s+a.length});return}if(u.overlay){var h=i.length;if(o(u.tree,u.overlay[0].from+s),i.length>h)return}}for(var d=0;d<a.children.length;d++){var v=a.children[d];v instanceof Ur&&o(v,a.positions[d]+s)}}else i.push({from:s,to:s+a.length})}(ti(t),0),i}},{key:"allowsNesting",get:function(){return!0}}]),e}();function DP(e,t,n){var r=e.facet(ds),i=ti(e).topNode;if(!r||r.allowsNesting)for(var o=i;o;o=o.enter(t,n,Hr.ExcludeBuffers))o.type.isTop&&(i=o);return i}bo.setState=cn.define();var zY=function(e){Ot(n,bo);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this,r,i,[],o)).parser=i,a}return tt(n,[{key:"configure",value:function(r,i){return new n(this.data,this.parser.configure(r),i||this.name)}},{key:"allowsNesting",get:function(){return this.parser.hasWrappers()}}],[{key:"define",value:function(r){var i,o=(i=r.languageData,Se.define({combine:i?function(a){return a.concat(i)}:void 0}));return new n(o,r.parser.configure({props:[kc.add(function(a){return a.isTop?o:void 0})]}),r.name)}}]),n}();function ti(e){var t=e.field(bo.state,!1);return t?t.tree:Ur.empty}var FY=function(){function e(t){X(this,e),this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}return tt(e,[{key:"length",get:function(){return this.doc.length}},{key:"syncTo",value:function(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}},{key:"chunk",value:function(t){return this.syncTo(t),this.string}},{key:"lineChunks",get:function(){return!0}},{key:"read",value:function(t,n){var r=this.cursorPos-this.string.length;return t<r||n>=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-r,n-r)}}]),e}(),Ql=null,VY=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0;X(this,e),this.parser=t,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}return tt(e,[{key:"startParse",value:function(){return this.parser.startParse(new FY(this.state.doc),this.fragments)}},{key:"work",value:function(t,n){var r=this;return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ur.empty&&this.isDone(n!=null?n:this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var i;if(typeof t=="number"){var o=Date.now()+t;t=function(){return Date.now()>o}}for(r.parse||(r.parse=r.startParse()),n!=null&&(r.parse.stoppedAt==null||r.parse.stoppedAt>n)&&n<r.state.doc.length&&r.parse.stopAt(n);;){var a=r.parse.advance();if(a){if(r.fragments=r.withoutTempSkipped(Ld.addTree(a,r.fragments,r.parse.stoppedAt!=null)),r.treeLen=(i=r.parse.stoppedAt)!==null&&i!==void 0?i:r.state.doc.length,r.tree=a,r.parse=null,!(r.treeLen<(n!=null?n:r.state.doc.length)))return!0;r.parse=r.startParse()}if(t())return!1}})}},{key:"takeTree",value:function(){var t,n,r=this;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(function(){for(;!(n=r.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(Ld.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(t){var n=Ql;Ql=this;try{return t()}finally{Ql=n}}},{key:"withoutTempSkipped",value:function(t){for(var n;n=this.tempSkipped.pop();)t=LP(t,n.from,n.to);return t}},{key:"changes",value:function(t,n){var r=this.fragments,i=this.tree,o=this.treeLen,a=this.viewport,s=this.skipped;if(this.takeTree(),!t.empty){var u=[];if(t.iterChangedRanges(function(v,p,m,g){return u.push({fromA:v,toA:p,fromB:m,toB:g})}),r=Ld.applyChanges(r,u),i=Ur.empty,o=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){s=[];var c,l=at(this.skipped);try{for(l.s();!(c=l.n()).done;){var f=c.value,h=t.mapPos(f.from,1),d=t.mapPos(f.to,-1);h<d&&s.push({from:h,to:d})}}catch(v){l.e(v)}finally{l.f()}}}return new e(this.parser,n,r,i,o,a,s,this.scheduleOn)}},{key:"updateViewport",value:function(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;for(var n=this.skipped.length,r=0;r<this.skipped.length;r++){var i=this.skipped[r],o=i.from,a=i.to;o<t.to&&a>t.from&&(this.fragments=LP(this.fragments,o,a),this.skipped.splice(r--,1))}return!(this.skipped.length>=n)&&(this.reset(),!0)}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(t,n){this.skipped.push({from:t,to:n})}},{key:"isDone",value:function(t){t=Math.min(t,this.state.doc.length);var n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}}],[{key:"create",value:function(t,n,r){return new e(t,n,[],Ur.empty,0,r,[],null)}},{key:"getSkippingParser",value:function(t){return new(function(n){Ot(i,MP);var r=Mt(i);function i(){return X(this,i),r.apply(this,arguments)}return tt(i,[{key:"createParse",value:function(o,a,s){var u=s[0].from,c=s[s.length-1].to;return{parsedPos:u,advance:function(){var l=Ql;if(l){var f,h=at(s);try{for(h.s();!(f=h.n()).done;){var d=f.value;l.tempSkipped.push(d)}}catch(v){h.e(v)}finally{h.f()}t&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,t]):t)}return this.parsedPos=c,new Ur(Ji.none,[],[],c-u)},stoppedAt:null,stopAt:function(){}}}}]),i}())}},{key:"get",value:function(){return Ql}}]),e}();function LP(e,t,n){return Ld.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var D1=function(){function e(t){X(this,e),this.context=t,this.tree=t.tree}return tt(e,[{key:"apply",value:function(t){if(!t.docChanged&&this.tree==this.context.tree)return this;var n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}}],[{key:"init",value:function(t){var n=Math.min(3e3,t.doc.length),r=VY.create(t.facet(ds).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}}]),e}();bo.state=Wr.define({create:D1.init,update:function(e,t){var n,r=at(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.is(bo.setState))return i.value}}catch(o){r.e(o)}finally{r.f()}return t.startState.facet(ds)!=t.state.facet(ds)?D1.init(t.state):e.apply(t)}});var BP=function(e){var t=setTimeout(function(){return e()},500);return function(){return clearTimeout(t)}};typeof requestIdleCallback!="undefined"&&(BP=function(e){var t=-1,n=setTimeout(function(){t=requestIdleCallback(e,{timeout:400})},100);return function(){return t<0?clearTimeout(n):cancelIdleCallback(t)}});var L1=typeof navigator!="undefined"&&(!((R1=navigator.scheduling)===null||R1===void 0)&&R1.isInputPending)?function(){return navigator.scheduling.isInputPending()}:null,WY=zr.fromClass(function(){function e(t){X(this,e),this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return tt(e,[{key:"update",value:function(t){var n=this.view.state.field(bo.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),t.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}},{key:"scheduleWork",value:function(){if(!this.working){var t=this.view.state,n=t.field(bo.state);n.tree==n.context.tree&&n.context.isDone(t.doc.length)||(this.working=BP(this.work))}}},{key:"work",value:function(t){this.working=null;var n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),!(this.chunkBudget<=0)){var r=this.view,i=r.state,o=r.viewport.to,a=i.field(bo.state);if(a.tree!=a.context.tree||!a.context.isDone(o+1e5)){var s=Date.now()+Math.min(this.chunkBudget,100,t&&!L1?Math.max(25,t.timeRemaining()-5):1e9),u=a.context.treeLen<o&&i.doc.length>o+1e3,c=a.context.work(function(){return L1&&L1()||Date.now()>s},o+(u?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:bo.setState.of(new D1(a.context))})),this.chunkBudget>0&&(!c||u)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}}}},{key:"checkAsyncSchedule",value:function(t){var n=this;t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(function(){return n.scheduleWork()}).catch(function(r){return Mi(n.view.state,r)}).then(function(){return n.workScheduled--}),t.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),e}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),ds=Se.define({combine:function(e){return e.length?e[0]:null},enables:function(e){return[bo.state,WY,we.contentAttributes.compute([e],function(t){var n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}}),qY=tt(function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];X(this,e),this.language=t,this.support=n,this.extension=[t,n]}),HY=Se.define(),Vd=Se.define({combine:function(e){if(!e.length)return" ";var t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(function(n){return n!=t[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function jc(e){var t=e.facet(Vd);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Yl(e,t){var n="",r=e.tabSize,i=e.facet(Vd)[0];if(i==" "){for(;t>=r;)n+=" ",t-=r;i=" "}for(var o=0;o<t;o++)n+=i;return n}function B1(e,t){e instanceof Hn&&(e=new Wd(e));var n,r=at(e.state.facet(HY));try{for(r.s();!(n=r.n()).done;){var i=(0,n.value)(e,t);if(i!==void 0)return i}}catch(a){r.e(a)}finally{r.f()}var o=ti(e.state);return o?function(a,s,u){return FP(s.resolveInner(u).enterUnfinishedNodesBefore(u),u,a)}(e,o,t):null}var Wd=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};X(this,e),this.state=t,this.options=n,this.unit=jc(t)}return tt(e,[{key:"lineAt",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=this.state.doc.lineAt(t),i=this.options,o=i.simulateBreak,a=i.simulateDoubleBreak;return o!=null&&o>=r.from&&o<=r.to?a&&o==t?{text:"",from:t}:(n<0?o<t:o<=t)?{text:r.text.slice(o-r.from),from:o}:{text:r.text.slice(0,o-r.from),from:r.from}:r}},{key:"textAfterPos",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";var r=this.lineAt(t,n),i=r.text,o=r.from;return i.slice(t-o,Math.min(i.length,t+100-o))}},{key:"column",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=this.lineAt(t,n),i=r.text,o=r.from,a=this.countColumn(i,t-o),s=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return s>-1&&(a+=s-this.countColumn(i,i.search(/\S|$/))),a}},{key:"countColumn",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.length;return Nl(t,this.state.tabSize,n)}},{key:"lineIndent",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=this.lineAt(t,n),i=r.text,o=r.from,a=this.options.overrideIndentation;if(a){var s=a(o);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),e}(),zP=new hn;function UY(e){var t=e.type.prop(zP);if(t)return t;var n,r=e.firstChild;if(r&&(n=r.type.prop(hn.closedBy))){var i=e.lastChild,o=i&&n.indexOf(i.name)>-1;return function(a){return function(s,u,c,l,f){var h=s.textAfter,d=h.match(/^\s*/)[0].length,v=l&&h.slice(d,d+l.length)==l||f==s.pos+d,p=u?function(m){var g=m.node,y=g.childAfter(g.from),b=g.lastChild;if(!y)return null;for(var w=m.options.simulateBreak,j=m.state.doc.lineAt(y.from),x=w==null||w<=j.from?j.to:Math.min(j.to,w),R=y.to;;){var M=g.childAfter(R);if(!M||M==b)return null;if(!M.type.isSkipped)return M.from<x?y:null;R=M.to}}(s):null;return p?v?s.column(p.from):s.column(p.to):s.baseIndent+(v?0:s.unit*c)}(a,!0,1,void 0,o&&!function(s){return s.pos==s.options.simulateBreak&&s.options.simulateDoubleBreak}(a)?i.from:void 0)}}return e.parent==null?JY:null}function FP(e,t,n){for(;e;e=e.parent){var r=UY(e);if(r)return r(KY.create(n,t,e))}return null}function JY(){return 0}var KY=function(e){Ot(n,Wd);var t=Mt(n);function n(r,i,o){var a;return X(this,n),(a=t.call(this,r.state,r.options)).base=r,a.pos=i,a.node=o,a}return tt(n,[{key:"textAfter",get:function(){return this.textAfterPos(this.pos)}},{key:"baseIndent",get:function(){return this.baseIndentFor(this.node)}},{key:"baseIndentFor",value:function(r){for(var i=this.state.doc.lineAt(r.from);;){for(var o=r.resolve(i.from);o.parent&&o.parent.from==o.from;)o=o.parent;if(GY(o,r))break;i=this.state.doc.lineAt(o.from)}return this.lineIndent(i.from)}},{key:"continue",value:function(){var r=this.node.parent;return r?FP(r,this.pos,this.base):0}}],[{key:"create",value:function(r,i,o){return new n(r,i,o)}}]),n}();function GY(e,t){for(var n=t;n;n=n.parent)if(e==n)return!0;return!1}function VP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.except,n=e.units,r=n===void 0?1:n;return function(i){var o=t&&t.test(i.textAfter);return i.baseIndent+(o?0:r*i.unit)}}var QY=Se.define(),WP=new hn;function qd(e,t,n){var r,i=at(e.facet(QY));try{for(i.s();!(r=i.n()).done;){var o=(0,r.value)(e,t,n);if(o)return o}}catch(a){i.e(a)}finally{i.f()}return function(a,s,u){var c=ti(a);if(c.length<u)return null;for(var l,f,h=null,d=c.resolveInner(u,1);d;d=d.parent)if(!(d.to<=u||d.from>u)){if(h&&d.from<s)break;var v=d.type.prop(WP);if(v&&(d.to<c.length-50||c.length==a.doc.length||(f=void 0,!(f=(l=d).lastChild)||f.to!=l.to||!f.type.isError))){var p=v(d,a);p&&p.from<=u&&p.from>=s&&p.to>u&&(h=p)}}return h}(e,t,n)}function qP(e,t){var n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var Hd=cn.define({map:qP}),Zl=cn.define({map:qP});function HP(e){var t,n=[],r=at(e.state.selection.ranges);try{var i=function(){var o=t.value.head;if(n.some(function(a){return a.from<=o&&a.to>=o}))return"continue";n.push(e.lineBlockAt(o))};for(r.s();!(t=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}return n}var Qs=Wr.define({create:function(){return Te.none},update:function(e,t){e=e.map(t.changes);var n,r=at(t.effects);try{var i=function(){var s=n.value;s.is(Hd)&&!function(u,c,l){var f=!1;return u.between(c,c,function(h,d){h==c&&d==l&&(f=!0)}),f}(e,s.value.from,s.value.to)?e=e.update({add:[QP.range(s.value.from,s.value.to)]}):s.is(Zl)&&(e=e.update({filter:function(u,c){return s.value.from!=u||s.value.to!=c},filterFrom:s.value.from,filterTo:s.value.to}))};for(r.s();!(n=r.n()).done;)i()}catch(s){r.e(s)}finally{r.f()}if(t.selection){var o=!1,a=t.selection.main.head;e.between(a,a,function(s,u){s<a&&u>a&&(o=!0)}),o&&(e=e.update({filterFrom:a,filterTo:a,filter:function(s,u){return u<=a||s>=a}}))}return e},provide:function(e){return we.decorations.from(e)},toJSON:function(e,t){var n=[];return e.between(0,t.doc.length,function(r,i){n.push(r,i)}),n},fromJSON:function(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");for(var t=[],n=0;n<e.length;){var r=e[n++],i=e[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");t.push(QP.range(r,i))}return Te.set(t,!0)}});function Ud(e,t,n){var r,i=null;return(r=e.field(Qs,!1))===null||r===void 0||r.between(t,n,function(o,a){(!i||i.from>o)&&(i={from:o,to:a})}),i}function UP(e,t){return e.field(Qs,!1)?t:t.concat(cn.appendConfig.of(GP()))}function JP(e,t){var n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return we.announce.of("".concat(e.state.phrase(n?"Folded lines":"Unfolded lines")," ").concat(r," ").concat(e.state.phrase("to")," ").concat(i,"."))}var YY=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(e){var t,n=at(HP(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=qd(e.state,r.from,r.to);if(i)return e.dispatch({effects:UP(e.state,[Hd.of(i),JP(e,i)])}),!0}}catch(o){n.e(o)}finally{n.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(e){if(!e.state.field(Qs,!1))return!1;var t,n=[],r=at(HP(e));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=Ud(e.state,i.from,i.to);o&&n.push(Zl.of(o),JP(e,o,!1))}}catch(a){r.e(a)}finally{r.f()}return n.length&&e.dispatch({effects:n}),n.length>0}},{key:"Ctrl-Alt-[",run:function(e){for(var t=e.state,n=[],r=0;r<t.doc.length;){var i=e.lineBlockAt(r),o=qd(t,i.from,i.to);o&&n.push(Hd.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:UP(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:function(e){var t=e.state.field(Qs,!1);if(!t||!t.size)return!1;var n=[];return t.between(0,e.state.doc.length,function(r,i){n.push(Zl.of({from:r,to:i}))}),e.dispatch({effects:n}),!0}}],ZY={placeholderDOM:null,placeholderText:"\u2026"},KP=Se.define({combine:function(e){return Ui(e,ZY)}});function GP(e){var t=[Qs,eZ];return e&&t.push(KP.of(e)),t}var QP=Te.replace({widget:new(function(e){Ot(n,ss);var t=Mt(n);function n(){return X(this,n),t.apply(this,arguments)}return tt(n,[{key:"toDOM",value:function(r){var i=r.state,o=i.facet(KP),a=function(u){var c=r.lineBlockAt(r.posAtDOM(u.target)),l=Ud(r.state,c.from,c.to);l&&r.dispatch({effects:Zl.of(l)}),u.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(r,a);var s=document.createElement("span");return s.textContent=o.placeholderText,s.setAttribute("aria-label",i.phrase("folded code")),s.title=i.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=a,s}}]),n}())}),XY={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:function(){return!1}},z1=function(e){Ot(n,na);var t=Mt(n);function n(r,i){var o;return X(this,n),(o=t.call(this)).config=r,o.open=i,o}return tt(n,[{key:"eq",value:function(r){return this.config==r.config&&this.open==r.open}},{key:"toDOM",value:function(r){if(this.config.markerDOM)return this.config.markerDOM(this.open);var i=document.createElement("span");return i.textContent=this.open?this.config.openText:this.config.closedText,i.title=r.state.phrase(this.open?"Fold line":"Unfold line"),i}}]),n}();function tZ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Object.assign(Object.assign({},XY),e),n=new z1(t,!0),r=new z1(t,!1),i=zr.fromClass(function(){function a(s){X(this,a),this.from=s.viewport.from,this.markers=this.buildMarkers(s)}return tt(a,[{key:"update",value:function(s){(s.docChanged||s.viewportChanged||s.startState.facet(ds)!=s.state.facet(ds)||s.startState.field(Qs,!1)!=s.state.field(Qs,!1)||ti(s.startState)!=ti(s.state)||t.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}},{key:"buildMarkers",value:function(s){var u,c=new Ks,l=at(s.viewportLineBlocks);try{for(l.s();!(u=l.n()).done;){var f=u.value,h=Ud(s.state,f.from,f.to)?r:qd(s.state,f.from,f.to)?n:null;h&&c.add(f.from,f.from,h)}}catch(d){l.e(d)}finally{l.f()}return c.finish()}}]),a}()),o=t.domEventHandlers;return[i,bP({class:"cm-foldGutter",markers:function(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||Qn.empty},initialSpacer:function(){return new z1(t,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(a,s,u){if(o.click&&o.click(a,s,u))return!0;var c=Ud(a.state,s.from,s.to);if(c)return a.dispatch({effects:Zl.of(c)}),!0;var l=qd(a.state,s.from,s.to);return!!l&&(a.dispatch({effects:Hd.of(l)}),!0)}})}),GP()]}var eZ=we.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"}}),F1=function(){function e(t,n){var r;function i(s){var u=is.newName();return(r||(r=Object.create(null)))["."+u]=s,u}X(this,e),this.specs=t;var o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof bo?function(s){return s.prop(kc)==a.data}:a?function(s){return s==a}:void 0,this.style=RP(t.map(function(s){return{tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))}}),{all:o}).style,this.module=r?new is(r):null,this.themeType=n.themeType}return tt(e,null,[{key:"define",value:function(t,n){return new e(t,n||{})}}]),e}(),V1=Se.define(),YP=Se.define({combine:function(e){return e.length?[e[0]]:null}});function W1(e){var t=e.facet(V1);return t.length?t:e.facet(YP)}function ZP(e,t){var n,r=[rZ];return e instanceof F1&&(e.module&&r.push(we.styleModule.of(e.module)),n=e.themeType),t!=null&&t.fallback?r.push(YP.of(e)):n?r.push(V1.computeN([we.darkTheme],function(i){return i.facet(we.darkTheme)==(n=="dark")?[e]:[]})):r.push(V1.of(e)),r}var nZ=function(){function e(t){X(this,e),this.markCache=Object.create(null),this.tree=ti(t.state),this.decorations=this.buildDeco(t,W1(t.state))}return tt(e,[{key:"update",value:function(t){var n=ti(t.state),r=W1(t.state),i=r!=W1(t.startState);n.length<t.view.viewport.to&&!i&&n.type==this.tree.type?this.decorations=this.decorations.map(t.changes):(n!=this.tree||t.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(t.view,r))}},{key:"buildDeco",value:function(t,n){var r=this;if(!n||!this.tree.length)return Te.none;var i,o=new Ks,a=at(t.visibleRanges);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=s.from,c=s.to;DY(this.tree,n,function(l,f,h){o.add(l,f,r.markCache[h]||(r.markCache[h]=Te.mark({class:h})))},u,c)}}catch(l){a.e(l)}finally{a.f()}return o.finish()}}]),e}(),rZ=uc.high(zr.fromClass(nZ,{decorations:function(e){return e.decorations}})),iZ=F1.define([{tag:Xt.meta,color:"#404740"},{tag:Xt.link,textDecoration:"underline"},{tag:Xt.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Xt.emphasis,fontStyle:"italic"},{tag:Xt.strong,fontWeight:"bold"},{tag:Xt.strikethrough,textDecoration:"line-through"},{tag:Xt.keyword,color:"#708"},{tag:[Xt.atom,Xt.bool,Xt.url,Xt.contentSeparator,Xt.labelName],color:"#219"},{tag:[Xt.literal,Xt.inserted],color:"#164"},{tag:[Xt.string,Xt.deleted],color:"#a11"},{tag:[Xt.regexp,Xt.escape,Xt.special(Xt.string)],color:"#e40"},{tag:Xt.definition(Xt.variableName),color:"#00f"},{tag:Xt.local(Xt.variableName),color:"#30a"},{tag:[Xt.typeName,Xt.namespace],color:"#085"},{tag:Xt.className,color:"#167"},{tag:[Xt.special(Xt.variableName),Xt.macroName],color:"#256"},{tag:Xt.definition(Xt.propertyName),color:"#00c"},{tag:Xt.comment,color:"#940"},{tag:Xt.invalid,color:"#f00"}]),oZ=we.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),XP=1e4,t9="()[]{}",e9=Se.define({combine:function(e){return Ui(e,{afterCursor:!0,brackets:t9,maxScanDistance:XP,renderMatch:uZ})}}),aZ=Te.mark({class:"cm-matchingBracket"}),sZ=Te.mark({class:"cm-nonmatchingBracket"});function uZ(e){var t=[],n=e.matched?aZ:sZ;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}var cZ=Wr.define({create:function(){return Te.none},update:function(e,t){if(!t.docChanged&&!t.selection)return e;var n,r=[],i=t.state.facet(e9),o=at(t.state.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.empty){var s=aa(t.state,a.head,-1,i)||a.head>0&&aa(t.state,a.head-1,1,i)||i.afterCursor&&(aa(t.state,a.head,1,i)||a.head<t.state.doc.length&&aa(t.state,a.head+1,-1,i));s&&(r=r.concat(i.renderMatch(s,t.state)))}}}catch(u){o.e(u)}finally{o.f()}return Te.set(r,!0)},provide:function(e){return we.decorations.from(e)}}),lZ=[cZ,oZ];function fZ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[e9.of(e),lZ]}var hZ=new hn;function q1(e,t,n){var r=e.prop(t<0?hn.openedBy:hn.closedBy);if(r)return r;if(e.name.length==1){var i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function H1(e){var t=e.type.prop(hZ);return t?t(e.node):e}function aa(e,t,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=r.maxScanDistance||XP,o=r.brackets||t9,a=ti(e),s=a.resolveInner(t,n),u=s;u;u=u.parent){var c=q1(u.type,n,o);if(c&&u.from<u.to){var l=H1(u);if(l&&(n>0?t>=l.from&&t<l.to:t>l.from&&t<=l.to))return dZ(e,t,n,u,l,c,o)}}return function(f,h,d,v,p,m,g){var y=d<0?f.sliceDoc(h-1,h):f.sliceDoc(h,h+1),b=g.indexOf(y);if(b<0||b%2==0!=d>0)return null;for(var w={from:d<0?h-1:h,to:d>0?h+1:h},j=f.doc.iterRange(h,d>0?f.doc.length:0),x=0,R=0;!j.next().done&&R<=m;){var M=j.value;d<0&&(R+=M.length);for(var E=h+R*d,N=d>0?0:M.length-1,A=d>0?M.length:-1;N!=A;N+=d){var L=g.indexOf(M[N]);if(!(L<0||v.resolveInner(E+N,1).type!=p))if(L%2==0==d>0)x++;else{if(x==1)return{start:w,end:{from:E+N,to:E+N+1},matched:L>>1==b>>1};x--}}d>0&&(R+=M.length)}return j.done?{start:w,matched:!1}:null}(e,t,n,a,s.type,i,o)}function dZ(e,t,n,r,i,o,a){var s=r.parent,u={from:i.from,to:i.to},c=0,l=s==null?void 0:s.cursor();if(l&&(n<0?l.childBefore(r.from):l.childAfter(r.to)))do if(n<0?l.to<=r.from:l.from>=r.to){if(c==0&&o.indexOf(l.type.name)>-1&&l.from<l.to){var f=H1(l);return{start:u,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}if(q1(l.type,n,a))c++;else if(q1(l.type,-n,a)){if(c==0){var h=H1(l);return{start:u,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}c--}}while(n<0?l.prevSibling():l.nextSibling());return{start:u,matched:!1}}for(var vZ=Object.create(null),n9=[Ji.none],r9=[],pZ=Object.create(null),U1=0,i9=[["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"]];U1<i9.length;U1++){var o9=ke(i9[U1],2),mZ=o9[0],gZ=o9[1];pZ[mZ]=yZ(vZ,gZ)}function J1(e,t){r9.indexOf(e)>-1||(r9.push(e),console.warn(t))}function yZ(e,t){var n,r=null,i=at(t.split("."));try{for(i.s();!(n=i.n()).done;){var o=n.value,a=e[o]||Xt[o];a?typeof a=="function"?r?r=a(r):J1(o,"Modifier ".concat(o," used at start of tag")):r?J1(o,"Tag ".concat(o," used as modifier")):r=a:J1(o,"Unknown highlighting tag ".concat(o))}}catch(c){i.e(c)}finally{i.f()}if(!r)return 0;var s=t.replace(/ /g,"_"),u=Ji.define({id:n9.length,name:s,props:[PP(fi({},s,r))]});return n9.push(u),u.id}function K1(e,t){return function(n){var r=n.state,i=n.dispatch;if(r.readOnly)return!1;var o=e(t,r);return!!o&&(i(r.update(o)),!0)}}var bZ=K1(kZ,0),wZ=K1(a9,0),xZ=K1(function(e,t){return a9(e,t,function(n){var r,i=[],o=at(n.selection.ranges);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=n.doc.lineAt(a.from),u=a.to<=s.to?s:n.doc.lineAt(a.to),c=i.length-1;c>=0&&i[c].to>s.from?i[c].to=u.to:i.push({from:s.from+/^\s*/.exec(s.text)[0].length,to:u.to})}}catch(l){o.e(l)}finally{o.f()}return i}(t))},0);function G1(e,t){var n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}var Xl=50;function a9(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.selection.ranges,r=n.map(function(h){return G1(t,h.from).block});if(!r.every(function(h){return h}))return null;var i=n.map(function(h,d){return function(v,p,m,g){var y,b,w=p.open,j=p.close,x=v.sliceDoc(m-Xl,m),R=v.sliceDoc(g,g+Xl),M=/\s*$/.exec(x)[0].length,E=/^\s*/.exec(R)[0].length,N=x.length-M;if(x.slice(N-w.length,N)==w&&R.slice(E,E+j.length)==j)return{open:{pos:m-M,margin:M&&1},close:{pos:g+E,margin:E&&1}};g-m<=2*Xl?y=b=v.sliceDoc(m,g):(y=v.sliceDoc(m,m+Xl),b=v.sliceDoc(g-Xl,g));var A=/^\s*/.exec(y)[0].length,L=/\s*$/.exec(b)[0].length,W=b.length-L-j.length;return y.slice(A,A+w.length)==w&&b.slice(W,W+j.length)==j?{open:{pos:m+A+w.length,margin:/\s/.test(y.charAt(A+w.length))?1:0},close:{pos:g-L-j.length,margin:/\s/.test(b.charAt(W-1))?1:0}}:null}(t,r[d],h.from,h.to)});if(e!=2&&!i.every(function(h){return h}))return{changes:t.changes(n.map(function(h,d){return i[d]?[]:[{from:h.from,insert:r[d].open+" "},{from:h.to,insert:" "+r[d].close}]}))};if(e!=1&&i.some(function(h){return h})){for(var o,a=[],s=0;s<i.length;s++)if(o=i[s]){var u=r[s],c=o,l=c.open,f=c.close;a.push({from:l.pos-u.open.length,to:l.pos+l.margin},{from:f.pos-f.margin,to:f.pos+u.close.length})}return{changes:a}}return null}function kZ(e,t){var n,r=[],i=-1,o=at(arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.selection.ranges);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.from,u=a.to,c=r.length,l=1e9,f=G1(t,s).line;if(f){for(var h=s;h<=u;){var d=t.doc.lineAt(h);if(d.from>i&&(s==u||u>d.from)){i=d.from;var v=/^\s*/.exec(d.text)[0].length,p=v==d.length,m=d.text.slice(v,v+f.length)==f?v:-1;v<d.text.length&&v<l&&(l=v),r.push({line:d,comment:m,token:f,indent:v,empty:p,single:!1})}h=d.to+1}if(l<1e9)for(var g=c;g<r.length;g++)r[g].indent<r[g].line.text.length&&(r[g].indent=l);r.length==c+1&&(r[c].single=!0)}}}catch($){o.e($)}finally{o.f()}if(e!=2&&r.some(function($){return $.comment<0&&(!$.empty||$.single)})){var y,b=[],w=at(r);try{for(w.s();!(y=w.n()).done;){var j=y.value,x=j.line,R=j.token,M=j.indent,E=j.empty;!j.single&&E||b.push({from:x.from+M,insert:R+" "})}}catch($){w.e($)}finally{w.f()}var N=t.changes(b);return{changes:N,selection:t.selection.map(N,1)}}if(e!=1&&r.some(function($){return $.comment>=0})){var A,L=[],W=at(r);try{for(W.s();!(A=W.n()).done;){var O=A.value,I=O.line,q=O.comment,P=O.token;if(q>=0){var _=I.from+q,S=_+P.length;I.text[S-I.from]==" "&&S++,L.push({from:_,to:S})}}}catch($){W.e($)}finally{W.f()}return{changes:L}}return null}var Q1=rs.define(),jZ=rs.define(),SZ=Se.define(),s9=Se.define({combine:function(e){return Ui(e,{minDepth:100,newGroupDelay:500,joinToEvent:function(t,n){return n}},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:function(t,n){return function(r,i){return t(r,i)||n(r,i)}}})}}),Y1=Wr.define({create:function(){return tf.empty},update:function(e,t){var n,r,i=t.state.facet(s9),o=t.annotation(Q1);if(o){var a=t.docChanged?Ht.single((n=t.changes,r=0,n.iterChangedRanges(function(v,p){return r=p}),r)):void 0,s=Ca.fromTransaction(t,a),u=o.side,c=u==0?e.undone:e.done;return c=s?Gd(c,c.length,i.minDepth,s):l9(c,t.startState.selection),new tf(u==0?o.rest:c,u==0?c:o.rest)}var l=t.annotation(jZ);if(l!="full"&&l!="before"||(e=e.isolate()),t.annotation(mi.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);var f=Ca.fromTransaction(t),h=t.annotation(mi.time),d=t.annotation(mi.userEvent);return f?e=e.addChanges(f,h,d,i,t):t.selection&&(e=e.addSelection(t.startState.selection,h,d,i.newGroupDelay)),l!="full"&&l!="after"||(e=e.isolate()),e},toJSON:function(e){return{done:e.done.map(function(t){return t.toJSON()}),undone:e.undone.map(function(t){return t.toJSON()})}},fromJSON:function(e){return new tf(e.done.map(Ca.fromJSON),e.undone.map(Ca.fromJSON))}});function CZ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[Y1,s9.of(e),we.domEventHandlers({beforeinput:function(t,n){var r=t.inputType=="historyUndo"?Z1:t.inputType=="historyRedo"?Kd:null;return!!r&&(t.preventDefault(),r(n))}})]}function Jd(e,t){return function(n){var r=n.state,i=n.dispatch;if(!t&&r.readOnly)return!1;var o=r.field(Y1,!1);if(!o)return!1;var a=o.pop(e,r,t);return!!a&&(i(a),!0)}}var Z1=Jd(0,!1),Kd=Jd(1,!1),$Z=Jd(0,!0),_Z=Jd(1,!0);function u9(e){return function(t){var n=t.field(Y1,!1);if(!n)return 0;var r=e==0?n.done:n.undone;return r.length-(r.length&&!r[0].changes?1:0)}}var OZ=u9(0),MZ=u9(1),Ca=function(){function e(t,n,r,i,o){X(this,e),this.changes=t,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}return tt(e,[{key:"setSelAfter",value:function(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}},{key:"toJSON",value:function(){var t,n,r;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(function(i){return i.toJSON()})}}}],[{key:"fromJSON",value:function(t){return new e(t.changes&&go.fromJSON(t.changes),[],t.mapped&&sc.fromJSON(t.mapped),t.startSelection&&Ht.fromJSON(t.startSelection),t.selectionsAfter.map(Ht.fromJSON))}},{key:"fromTransaction",value:function(t,n){var r,i=Ki,o=at(t.startState.facet(SZ));try{for(o.s();!(r=o.n()).done;){var a=(0,r.value)(t);a.length&&(i=i.concat(a))}}catch(s){o.e(s)}finally{o.f()}return!i.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),i,void 0,n||t.startState.selection,Ki)}},{key:"selection",value:function(t){return new e(void 0,Ki,void 0,void 0,t)}}]),e}();function Gd(e,t,n,r){var i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function c9(e,t){return e.length?t.length?e.concat(t):e:t}var Ki=[],EZ=200;function l9(e,t){if(e.length){var n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-EZ));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Gd(e,e.length-1,1e9,n.setSelAfter(r)))}return[Ca.selection([t])]}function AZ(e){var t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function X1(e,t){if(!e.length)return e;for(var n=e.length,r=Ki;n;){var i=PZ(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){var o=e.slice(0,n);return o[n-1]=i,o}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Ca.selection(r)]:Ki}function PZ(e,t,n){var r=c9(e.selectionsAfter.length?e.selectionsAfter.map(function(s){return s.map(t)}):Ki,n);if(!e.changes)return Ca.selection(r);var i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new Ca(i,cn.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}var TZ=/^(input\.type|delete)($|\.)/,tf=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:void 0;X(this,e),this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=i}return tt(e,[{key:"isolate",value:function(){return this.prevTime?new e(this.done,this.undone):this}},{key:"addChanges",value:function(t,n,r,i,o){var a=this.done,s=a[a.length-1];return a=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||TZ.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,function(u,c){var l=[],f=!1;return u.iterChangedRanges(function(h,d){return l.push(h,d)}),c.iterChangedRanges(function(h,d,v,p){for(var m=0;m<l.length;){var g=l[m++],y=l[m++];p>=g&&v<=y&&(f=!0)}}),f}(s.changes,t.changes))||r=="input.type.compose")?Gd(a,a.length-1,i.minDepth,new Ca(t.changes.compose(s.changes),c9(t.effects,s.effects),s.mapped,s.startSelection,Ki)):Gd(a,a.length,i.minDepth,t),new e(a,Ki,n,r)}},{key:"addSelection",value:function(t,n,r,i){var o=this.done.length?this.done[this.done.length-1].selectionsAfter:Ki;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&function(a,s){return a.ranges.length==s.ranges.length&&a.ranges.filter(function(u,c){return u.empty!=s.ranges[c].empty}).length===0}(o[o.length-1],t)?this:new e(l9(this.done,t),this.undone,n,r)}},{key:"addMapping",value:function(t){return new e(X1(this.done,t),X1(this.undone,t),this.prevTime,this.prevUserEvent)}},{key:"pop",value:function(t,n,r){var i=t==0?this.done:this.undone;if(i.length==0)return null;var o=i[i.length-1];if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Q1.of({side:t,rest:AZ(i)}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){var a=i.length==1?Ki:i.slice(0,i.length-1);return o.mapped&&(a=X1(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:Q1.of({side:t,rest:a}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}return null}}]),e}();tf.empty=new tf(Ki,Ki);var RZ=[{key:"Mod-z",run:Z1,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Kd,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Kd,preventDefault:!0},{key:"Mod-u",run:$Z,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:_Z,preventDefault:!0}];function Sc(e,t){return Ht.create(e.ranges.map(t),e.mainIndex)}function sa(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function wo(e,t){var n=e.state,r=e.dispatch,i=Sc(n.selection,t);return!i.eq(n.selection)&&(r(sa(n,i)),!0)}function Qd(e,t){return Ht.cursor(t?e.to:e.from)}function f9(e,t){return wo(e,function(n){return n.empty?e.moveByChar(n,t):Qd(n,t)})}function ei(e){return e.textDirectionAt(e.state.selection.main.head)==dr.LTR}var h9=function(e){return f9(e,!ei(e))},d9=function(e){return f9(e,ei(e))};function v9(e,t){return wo(e,function(n){return n.empty?e.moveByGroup(n,t):Qd(n,t)})}function NZ(e,t,n){if(t.type.prop(n))return!0;var r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Yd(e,t,n){for(var r=ti(e).resolveInner(t.head),i=n?hn.closedBy:hn.openedBy,o=t.head;;){var a=n?r.childAfter(o):r.childBefore(o);if(!a)break;NZ(e,a,i)?r=a:o=n?a.to:a.from}var s,u;return u=r.type.prop(i)&&(s=n?aa(e,r.from,1):aa(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,Ht.cursor(u,n?-1:1)}function p9(e,t){return wo(e,function(n){if(!n.empty)return Qd(n,t);var r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}var m9=function(e){return p9(e,!1)},g9=function(e){return p9(e,!0)};function y9(e){var t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){var o,a=at(e.state.facet(we.scrollMargins));try{for(a.s();!(o=a.n()).done;){var s=(0,o.value)(e);s!=null&&s.top&&(r=Math.max(s==null?void 0:s.top,r)),s!=null&&s.bottom&&(i=Math.max(s==null?void 0:s.bottom,i))}}catch(u){a.e(u)}finally{a.f()}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function b9(e,t){var n,r=y9(e),i=e.state,o=Sc(i.selection,function(l){return l.empty?e.moveVertically(l,t,r.height):Qd(l,t)});if(o.eq(i.selection))return!1;if(r.selfScroll){var a=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),u=s.top+r.marginTop,c=s.bottom-r.marginBottom;a&&a.top>u&&a.bottom<c&&(n=we.scrollIntoView(o.main.head,{y:"start",yMargin:a.top-u}))}return e.dispatch(sa(i,o),{effects:n}),!0}var w9=function(e){return b9(e,!1)},ty=function(e){return b9(e,!0)};function vs(e,t,n){var r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){var o=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&t.head!=r.from+o&&(i=Ht.cursor(r.from+o))}return i}function Gi(e,t){var n=Sc(e.state.selection,function(r){var i=t(r);return Ht.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(sa(e.state,n)),!0)}function x9(e,t){return Gi(e,function(n){return e.moveByChar(n,t)})}var k9=function(e){return x9(e,!ei(e))},j9=function(e){return x9(e,ei(e))};function S9(e,t){return Gi(e,function(n){return e.moveByGroup(n,t)})}function C9(e,t){return Gi(e,function(n){return e.moveVertically(n,t)})}var $9=function(e){return C9(e,!1)},_9=function(e){return C9(e,!0)};function O9(e,t){return Gi(e,function(n){return e.moveVertically(n,t,y9(e).height)})}var M9=function(e){return O9(e,!1)},E9=function(e){return O9(e,!0)},A9=function(e){var t=e.state;return(0,e.dispatch)(sa(t,{anchor:0})),!0},P9=function(e){var t=e.state;return(0,e.dispatch)(sa(t,{anchor:t.doc.length})),!0},T9=function(e){var t=e.state;return(0,e.dispatch)(sa(t,{anchor:t.selection.main.anchor,head:0})),!0},R9=function(e){var t=e.state;return(0,e.dispatch)(sa(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0};function Zd(e,t){if(e.state.readOnly)return!1;var n="delete.selection",r=e.state,i=r.changeByRange(function(o){var a=o.from,s=o.to;if(a==s){var u=t(a);u<a?(n="delete.backward",u=Xd(e,u,!1)):u>a&&(n="delete.forward",u=Xd(e,u,!0)),a=Math.min(a,u),s=Math.max(s,u)}else a=Xd(e,a,!1),s=Xd(e,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:Ht.cursor(a)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?we.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Xd(e,t,n){if(e instanceof we){var r,i=at(e.state.facet(we.atomicRanges).map(function(o){return o(e)}));try{for(i.s();!(r=i.n()).done;)r.value.between(t,t,function(o,a){o<t&&a>t&&(t=n?a:o)})}catch(o){i.e(o)}finally{i.f()}}return t}var N9=function(e,t){return Zd(e,function(n){var r,i,o=e.state,a=o.doc.lineAt(n);if(!t&&n>a.from&&n<a.from+200&&!/[^ \t]/.test(r=a.text.slice(0,n-a.from))){if(r[r.length-1]==" ")return n-1;for(var s=Nl(r,o.tabSize)%jc(o)||jc(o),u=0;u<s&&r[r.length-1-u]==" ";u++)n--;i=n}else(i=si(a.text,n-a.from,t,t)+a.from)==n&&a.number!=(t?o.doc.lines:1)&&(i+=t?1:-1);return i})},ey=function(e){return N9(e,!1)},I9=function(e){return N9(e,!0)},D9=function(e,t){return Zd(e,function(n){for(var r=n,i=e.state,o=i.doc.lineAt(r),a=i.charCategorizer(r),s=null;;){if(r==(t?o.to:o.from)){r==n&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}var u=si(o.text,r-o.from,t)+o.from,c=o.text.slice(Math.min(r,u)-o.from,Math.max(r,u)-o.from),l=a(c);if(s!=null&&l!=s)break;c==" "&&r==n||(s=l),r=u}return r})},L9=function(e){return D9(e,!1)},B9=function(e){return Zd(e,function(t){var n=e.lineBlockAt(t).to;return t<n?n:Math.min(e.state.doc.length,t+1)})};function tv(e){var t,n=[],r=-1,i=at(e.selection.ranges);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=e.doc.lineAt(o.from),s=e.doc.lineAt(o.to);if(o.empty||o.to!=s.from||(s=e.doc.lineAt(o.to-1)),r>=a.number){var u=n[n.length-1];u.to=s.to,u.ranges.push(o)}else n.push({from:a.from,to:s.to,ranges:[o]});r=s.number+1}}catch(c){i.e(c)}finally{i.f()}return n}function z9(e,t,n){if(e.readOnly)return!1;var r,i=[],o=[],a=at(tv(e));try{for(a.s();!(r=a.n()).done;){var s=r.value;if(n?s.to!=e.doc.length:s.from!=0){var u=e.doc.lineAt(n?s.to+1:s.from-1),c=u.length+1;if(n){i.push({from:s.to,to:u.to},{from:s.from,insert:u.text+e.lineBreak});var l,f=at(s.ranges);try{for(f.s();!(l=f.n()).done;){var h=l.value;o.push(Ht.range(Math.min(e.doc.length,h.anchor+c),Math.min(e.doc.length,h.head+c)))}}catch(m){f.e(m)}finally{f.f()}}else{i.push({from:u.from,to:s.from},{from:s.to,insert:e.lineBreak+u.text});var d,v=at(s.ranges);try{for(v.s();!(d=v.n()).done;){var p=d.value;o.push(Ht.range(p.anchor-c,p.head-c))}}catch(m){v.e(m)}finally{v.f()}}}}}catch(m){a.e(m)}finally{a.f()}return!!i.length&&(t(e.update({changes:i,scrollIntoView:!0,selection:Ht.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function F9(e,t,n){if(e.readOnly)return!1;var r,i=[],o=at(tv(e));try{for(o.s();!(r=o.n()).done;){var a=r.value;n?i.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):i.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)})}}catch(s){o.e(s)}finally{o.f()}return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var IZ=V9(!1),DZ=V9(!0);function V9(e){return function(t){var n=t.state,r=t.dispatch;if(n.readOnly)return!1;var i=n.changeByRange(function(o){var a=o.from,s=o.to,u=n.doc.lineAt(a),c=!e&&a==s&&function(d,v){if(/\(\)|\[\]|\{\}/.test(d.sliceDoc(v-1,v+1)))return{from:v,to:v};var p,m=ti(d).resolveInner(v),g=m.childBefore(v),y=m.childAfter(v);return g&&y&&g.to<=v&&y.from>=v&&(p=g.type.prop(hn.closedBy))&&p.indexOf(y.name)>-1&&d.doc.lineAt(g.to).from==d.doc.lineAt(y.from).from?{from:g.to,to:y.from}:null}(n,a);e&&(a=s=(s<=u.to?u:n.doc.lineAt(s)).to);var l=new Wd(n,{simulateBreak:a,simulateDoubleBreak:!!c}),f=B1(l,a);for(f==null&&(f=/^\s*/.exec(n.doc.lineAt(a).text)[0].length);s<u.to&&/\s/.test(u.text[s-u.from]);)s++;c?(a=c.from,s=c.to):a>u.from&&a<u.from+100&&!/\S/.test(u.text.slice(0,a))&&(a=u.from);var h=["",Yl(n,f)];return c&&h.push(Yl(n,l.lineIndent(u.from,-1))),{changes:{from:a,to:s,insert:Tn.of(h)},range:Ht.cursor(a+1+h[1].length)}});return r(n.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function ny(e,t){var n=-1;return e.changeByRange(function(r){for(var i=[],o=r.from;o<=r.to;){var a=e.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),o=a.to+1}var s=e.changes(i);return{changes:i,range:Ht.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}var W9=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(ny(t,function(r,i){i.push({from:r.from,insert:t.facet(Vd)})}),{userEvent:"input.indent"})),!0)},q9=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(ny(t,function(r,i){var o=/^\s*/.exec(r.text)[0];if(o){for(var a=Nl(o,t.tabSize),s=0,u=Yl(t,Math.max(0,a-jc(t)));s<o.length&&s<u.length&&o.charCodeAt(s)==u.charCodeAt(s);)s++;i.push({from:r.from+s,to:r.from+o.length,insert:u.slice(s)})}}),{userEvent:"delete.dedent"})),!0)},LZ=[{key:"Ctrl-b",run:h9,shift:k9,preventDefault:!0},{key:"Ctrl-f",run:d9,shift:j9},{key:"Ctrl-p",run:m9,shift:$9},{key:"Ctrl-n",run:g9,shift:_9},{key:"Ctrl-a",run:function(e){return wo(e,function(t){return Ht.cursor(e.lineBlockAt(t.head).from,1)})},shift:function(e){return Gi(e,function(t){return Ht.cursor(e.lineBlockAt(t.head).from)})}},{key:"Ctrl-e",run:function(e){return wo(e,function(t){return Ht.cursor(e.lineBlockAt(t.head).to,-1)})},shift:function(e){return Gi(e,function(t){return Ht.cursor(e.lineBlockAt(t.head).to)})}},{key:"Ctrl-d",run:I9},{key:"Ctrl-h",run:ey},{key:"Ctrl-k",run:B9},{key:"Ctrl-Alt-h",run:L9},{key:"Ctrl-o",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange(function(i){return{changes:{from:i.from,to:i.to,insert:Tn.of(["",""])},range:Ht.cursor(i.from)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=t.changeByRange(function(i){if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};var o=i.from,a=t.doc.lineAt(o),s=o==a.from?o-1:si(a.text,o-a.from,!1)+a.from,u=o==a.to?o+1:si(a.text,o-a.from,!0)+a.from;return{changes:{from:s,to:u,insert:t.doc.slice(o,u).append(t.doc.slice(s,o))},range:Ht.cursor(u)}});return!r.changes.empty&&(n(t.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:ty}],BZ=[{key:"ArrowLeft",run:h9,shift:k9,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:function(e){return v9(e,!ei(e))},shift:function(e){return S9(e,!ei(e))},preventDefault:!0},{mac:"Cmd-ArrowLeft",run:function(e){return wo(e,function(t){return vs(e,t,!ei(e))})},shift:function(e){return Gi(e,function(t){return vs(e,t,!ei(e))})},preventDefault:!0},{key:"ArrowRight",run:d9,shift:j9,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:function(e){return v9(e,ei(e))},shift:function(e){return S9(e,ei(e))},preventDefault:!0},{mac:"Cmd-ArrowRight",run:function(e){return wo(e,function(t){return vs(e,t,ei(e))})},shift:function(e){return Gi(e,function(t){return vs(e,t,ei(e))})},preventDefault:!0},{key:"ArrowUp",run:m9,shift:$9,preventDefault:!0},{mac:"Cmd-ArrowUp",run:A9,shift:T9},{mac:"Ctrl-ArrowUp",run:w9,shift:M9},{key:"ArrowDown",run:g9,shift:_9,preventDefault:!0},{mac:"Cmd-ArrowDown",run:P9,shift:R9},{mac:"Ctrl-ArrowDown",run:ty,shift:E9},{key:"PageUp",run:w9,shift:M9},{key:"PageDown",run:ty,shift:E9},{key:"Home",run:function(e){return wo(e,function(t){return vs(e,t,!1)})},shift:function(e){return Gi(e,function(t){return vs(e,t,!1)})},preventDefault:!0},{key:"Mod-Home",run:A9,shift:T9},{key:"End",run:function(e){return wo(e,function(t){return vs(e,t,!0)})},shift:function(e){return Gi(e,function(t){return vs(e,t,!0)})},preventDefault:!0},{key:"Mod-End",run:P9,shift:R9},{key:"Enter",run:IZ},{key:"Mod-a",run:function(e){var t=e.state;return(0,e.dispatch)(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0}},{key:"Backspace",run:ey,shift:ey},{key:"Delete",run:I9},{key:"Mod-Backspace",mac:"Alt-Backspace",run:L9},{key:"Mod-Delete",mac:"Alt-Delete",run:function(e){return D9(e,!0)}},{mac:"Mod-Backspace",run:function(e){return Zd(e,function(t){var n=e.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)})}},{mac:"Mod-Delete",run:B9}].concat(LZ.map(function(e){return{mac:e.key,run:e.run,shift:e.shift}})),zZ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(e){return wo(e,function(t){return Yd(e.state,t,!ei(e))})},shift:function(e){return Gi(e,function(t){return Yd(e.state,t,!ei(e))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(e){return wo(e,function(t){return Yd(e.state,t,ei(e))})},shift:function(e){return Gi(e,function(t){return Yd(e.state,t,ei(e))})}},{key:"Alt-ArrowUp",run:function(e){return z9(e.state,e.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(e){return F9(e.state,e.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(e){return z9(e.state,e.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(e){return F9(e.state,e.dispatch,!0)}},{key:"Escape",run:function(e){var t=e.state,n=e.dispatch,r=t.selection,i=null;return r.ranges.length>1?i=Ht.create([r.main]):r.main.empty||(i=Ht.create([Ht.cursor(r.main.head)])),!!i&&(n(sa(t,i)),!0)}},{key:"Mod-Enter",run:DZ},{key:"Alt-l",mac:"Ctrl-l",run:function(e){var t=e.state,n=e.dispatch,r=tv(t).map(function(i){var o=i.from,a=i.to;return Ht.range(o,Math.min(a+1,t.doc.length))});return n(t.update({selection:Ht.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(e){var t=e.state,n=e.dispatch,r=Sc(t.selection,function(i){for(var o,a=ti(t).resolveInner(i.head,1);!(a.from<i.from&&a.to>=i.to||a.to>i.to&&a.from<=i.from)&&(!((o=a.parent)===null||o===void 0)&&o.parent);)a=a.parent;return Ht.range(a.to,a.from)});return n(sa(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:q9},{key:"Mod-]",run:W9},{key:"Mod-Alt-\\",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=Object.create(null),i=new Wd(t,{overrideIndentation:function(a){var s=r[a];return s==null?-1:s}}),o=ny(t,function(a,s,u){var c=B1(i,a.from);if(c!=null){/\S/.test(a.text)||(c=0);var l=/^\s*/.exec(a.text)[0],f=Yl(t,c);(l!=f||u.from<a.from+l.length)&&(r[a.from]=c,s.push({from:a.from,to:a.from+l.length,insert:f}))}});return o.changes.empty||n(t.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:function(e){if(e.state.readOnly)return!1;var t=e.state,n=t.changes(tv(t).map(function(i){var o=i.from,a=i.to;return o>0?o--:a<t.doc.length&&a++,{from:o,to:a}})),r=Sc(t.selection,function(i){return e.moveVertically(i,!0)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:function(e){return function(t,n,r){var i=!1,o=Sc(t.selection,function(a){var s=aa(t,a.head,-1)||aa(t,a.head,1)||a.head>0&&aa(t,a.head-1,1)||a.head<t.doc.length&&aa(t,a.head+1,-1);if(!s||!s.end)return a;i=!0;var u=s.start.from==a.head?s.end.to:s.end.from;return r?Ht.range(a.anchor,u):Ht.cursor(u)});return!!i&&(n(sa(t,o)),!0)}(e.state,e.dispatch,!1)}},{key:"Mod-/",run:function(e){var t=e.state,n=t.doc.lineAt(t.selection.main.from),r=G1(e.state,n.from);return r.line?bZ(e):!!r.block&&xZ(e)}},{key:"Alt-A",run:wZ}].concat(BZ),FZ={key:"Tab",run:W9,shift:q9};function Un(){var e=arguments[0];typeof e=="string"&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&ee(n)=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)H9(e,arguments[t]);return e}function H9(e,t){if(typeof t=="string")e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)H9(e,t[n])}}var U9=typeof String.prototype.normalize=="function"?function(e){return e.normalize("NFKD")}:function(e){return e},Cc=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t.length,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;X(this,e),this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(r,i),this.bufferStart=r,this.normalize=o?function(s){return o(U9(s))}:U9,this.query=this.normalize(n)}return tt(e,[{key:"peek",value:function(){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 Vr(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var t=this.peek();if(t<0)return this.done=!0,this;var n=k0(t),r=this.bufferStart+this.bufferPos;this.bufferPos+=_i(t);for(var i=this.normalize(n),o=0,a=r;;o++){var s=i.charCodeAt(o),u=this.match(s,a);if(u)return this.value=u,this;if(o==i.length-1)break;a==r&&o<n.length&&n.charCodeAt(o)==s&&a++}}}},{key:"match",value:function(t,n){for(var r=null,i=0;i<this.matches.length;i+=2){var o=this.matches[i],a=!1;this.query.charCodeAt(o)==t&&(o==this.query.length-1?r={from:this.matches[i+1],to:n+1}:(this.matches[i]++,a=!0)),a||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==t&&(this.query.length==1?r={from:n,to:n+1}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferPos)&&(r=null),r}}]),e}();typeof Symbol!="undefined"&&(Cc.prototype[Symbol.iterator]=function(){return this});var J9={from:-1,to:-1,match:/.*/.exec("")},ry="gm"+(/x/.unicode==null?"":"u"),K9=function(){function e(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:t.length;if(X(this,e),this.text=t,this.to=o,this.curLine="",this.done=!1,this.value=J9,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new Q9(t,n,r,i,o);this.re=new RegExp(n,ry+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=t.iter();var a=t.lineAt(i);this.curLineStart=a.from,this.matchPos=ev(t,i),this.getLine(this.curLineStart)}return tt(e,[{key:"getLine",value:function(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;var n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){var r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=ev(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}]),e}(),iy=new WeakMap,G9=function(){function e(t,n){X(this,e),this.from=t,this.text=n}return tt(e,[{key:"to",get:function(){return this.from+this.text.length}}],[{key:"get",value:function(t,n,r){var i=iy.get(t);if(!i||i.from>=r||i.to<=n){var o=new e(n,t.sliceString(n,r));return iy.set(t,o),o}if(i.from==n&&i.to==r)return i;var a=i.text,s=i.from;return s>n&&(a=t.sliceString(n,s)+a,s=n),i.to<r&&(a+=t.sliceString(i.to,r)),iy.set(t,new e(s,a)),new e(n,a.slice(n-s,r-s))}}]),e}(),Q9=function(){function e(t,n,r,i,o){X(this,e),this.text=t,this.to=o,this.done=!1,this.value=J9,this.matchPos=ev(t,i),this.re=new RegExp(n,ry+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=G9.get(t,i,this.chunkEnd(i+5e3))}return tt(e,[{key:"chunkEnd",value:function(t){return t>=this.to?this.to:this.text.lineAt(t).to}},{key:"next",value:function(){for(;;){var t=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==t&&(this.re.lastIndex=t+1,n=this.re.exec(this.flat.text)),n){var r=this.flat.from+n.index,i=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,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=ev(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=G9.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),e}();function ev(e,t){if(t>=e.length)return t;for(var n,r=e.lineAt(t);t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function oy(e){var t=Un("input",{class:"cm-textfield",name:"line"});function n(){var r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(r){var i=e.state,o=i.doc.lineAt(i.selection.main.head),a=ke(r,5),s=a[1],u=a[2],c=a[3],l=a[4],f=c?+c.slice(1):0,h=u?+u:o.number;if(u&&l){var d=h/100;s&&(d=d*(s=="-"?-1:1)+o.number/i.doc.lines),h=Math.round(i.doc.lines*d)}else u&&s&&(h=h*(s=="-"?-1:1)+o.number);var v=i.doc.line(Math.max(1,Math.min(i.doc.lines,h)));e.dispatch({effects:nv.of(!1),selection:Ht.cursor(v.from+Math.max(0,Math.min(f,v.length))),scrollIntoView:!0}),e.focus()}}return{dom:Un("form",{class:"cm-gotoLine",onkeydown:function(r){r.keyCode==27?(r.preventDefault(),e.dispatch({effects:nv.of(!1)}),e.focus()):r.keyCode==13&&(r.preventDefault(),n())},onsubmit:function(r){r.preventDefault(),n()}},Un("label",e.state.phrase("Go to line"),": ",t)," ",Un("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}typeof Symbol!="undefined"&&(K9.prototype[Symbol.iterator]=Q9.prototype[Symbol.iterator]=function(){return this});var nv=cn.define(),Y9=Wr.define({create:function(){return!0},update:function(e,t){var n,r=at(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(nv)&&(e=i.value)}}catch(o){r.e(o)}finally{r.f()}return e},provide:function(e){return Hl.from(e,function(t){return t?oy:null})}}),VZ=we.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),WZ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Z9=Se.define({combine:function(e){return Ui(e,WZ,{highlightWordAroundCursor:function(t,n){return t||n},minSelectionLength:Math.min,maxMatches:Math.min})}}),qZ=Te.mark({class:"cm-selectionMatch"}),HZ=Te.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function X9(e,t,n,r){return!(n!=0&&e(t.sliceDoc(n-1,n))==lr.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==lr.Word)}var UZ=zr.fromClass(function(){function e(t){X(this,e),this.decorations=this.getDeco(t)}return tt(e,[{key:"update",value:function(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}},{key:"getDeco",value:function(t){var n=t.state.facet(Z9),r=t.state,i=r.selection;if(i.ranges.length>1)return Te.none;var o,a=i.main,s=null;if(a.empty){if(!n.highlightWordAroundCursor)return Te.none;var u=r.wordAt(a.head);if(!u)return Te.none;s=r.charCategorizer(a.head),o=r.sliceDoc(u.from,u.to)}else{var c=a.to-a.from;if(c<n.minSelectionLength||c>200)return Te.none;if(n.wholeWords){if(o=r.sliceDoc(a.from,a.to),!X9(s=r.charCategorizer(a.head),r,a.from,a.to)||!function(y,b,w,j){return y(b.sliceDoc(w,w+1))==lr.Word&&y(b.sliceDoc(j-1,j))==lr.Word}(s,r,a.from,a.to))return Te.none}else if(!(o=r.sliceDoc(a.from,a.to).trim()))return Te.none}var l,f=[],h=at(t.visibleRanges);try{for(h.s();!(l=h.n()).done;)for(var d=l.value,v=new Cc(r.doc,o,d.from,d.to);!v.next().done;){var p=v.value,m=p.from,g=p.to;if((!s||X9(s,r,m,g))&&(a.empty&&m<=a.from&&g>=a.to?f.push(HZ.range(m,g)):(m>=a.to||g<=a.from)&&f.push(qZ.range(m,g)),f.length>n.maxMatches))return Te.none}}catch(y){h.e(y)}finally{h.f()}return Te.set(f)}}]),e}(),{decorations:function(e){return e.decorations}}),JZ=we.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ys=Se.define({combine:function(e){return Ui(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:function(t){return new rX(t)},scrollToMatch:function(t){return we.scrollIntoView(t)}})}});function KZ(e){return e?[Ys.of(e),dy]:dy}var tT=function(){function e(t){X(this,e),this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(n){try{return new RegExp(n,ry),!0}catch(r){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}return tt(e,[{key:"unquote",value:function(t){return this.literal?t:t.replace(/\\([nrt\\])/g,function(n,r){return r=="n"?`
|
|
`:r=="r"?"\r":r=="t"?" ":"\\"})}},{key:"eq",value:function(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}},{key:"create",value:function(){return this.regexp?new QZ(this):new GZ(this)}},{key:"getCursor",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,i=t.doc?t:Hn.create({doc:t});return r==null&&(r=i.doc.length),this.regexp?_c(this,i,n,r):$c(this,i,n,r)}}]),e}(),eT=tt(function e(t){X(this,e),this.spec=t});function $c(e,t,n,r){return new Cc(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:function(i){return i.toLowerCase()},e.wholeWord?function(i,o){return function(a,s,u,c){return(c>a||c+u.length<s)&&(c=Math.max(0,a-2),u=i.sliceString(c,Math.min(i.length,s+2))),!(o(rv(u,a-c))==lr.Word&&o(iv(u,a-c))==lr.Word||o(iv(u,s-c))==lr.Word&&o(rv(u,s-c))==lr.Word)}}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}var GZ=function(e){Ot(n,eT);var t=Mt(n);function n(r){return X(this,n),t.call(this,r)}return tt(n,[{key:"nextMatch",value:function(r,i,o){var a=$c(this.spec,r,o,r.doc.length).nextOverlapping();return a.done&&(a=$c(this.spec,r,0,i).nextOverlapping()),a.done?null:a.value}},{key:"prevMatchInRange",value:function(r,i,o){for(var a=o;;){for(var s=Math.max(i,a-1e4-this.spec.unquoted.length),u=$c(this.spec,r,s,a),c=null;!u.nextOverlapping().done;)c=u.value;if(c)return c;if(s==i)return null;a-=1e4}}},{key:"prevMatch",value:function(r,i,o){return this.prevMatchInRange(r,0,i)||this.prevMatchInRange(r,o,r.doc.length)}},{key:"getReplacement",value:function(r){return this.spec.unquote(this.spec.replace)}},{key:"matchAll",value:function(r,i){for(var o=$c(this.spec,r,0,r.doc.length),a=[];!o.next().done;){if(a.length>=i)return null;a.push(o.value)}return a}},{key:"highlight",value:function(r,i,o,a){for(var s=$c(this.spec,r,Math.max(0,i-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,r.doc.length));!s.next().done;)a(s.value.from,s.value.to)}}]),n}();function _c(e,t,n,r){return new K9(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),function(o,a,s){return!s[0].length||(i(rv(s.input,s.index))!=lr.Word||i(iv(s.input,s.index))!=lr.Word)&&(i(iv(s.input,s.index+s[0].length))!=lr.Word||i(rv(s.input,s.index+s[0].length))!=lr.Word)}):void 0},n,r);var i}function rv(e,t){return e.slice(si(e,t,!1),t)}function iv(e,t){return e.slice(t,si(e,t))}var QZ=function(e){Ot(n,eT);var t=Mt(n);function n(){return X(this,n),t.apply(this,arguments)}return tt(n,[{key:"nextMatch",value:function(r,i,o){var a=_c(this.spec,r,o,r.doc.length).next();return a.done&&(a=_c(this.spec,r,0,i).next()),a.done?null:a.value}},{key:"prevMatchInRange",value:function(r,i,o){for(var a=1;;a++){for(var s=Math.max(i,o-1e4*a),u=_c(this.spec,r,s,o),c=null;!u.next().done;)c=u.value;if(c&&(s==i||c.from>s+10))return c;if(s==i)return null}}},{key:"prevMatch",value:function(r,i,o){return this.prevMatchInRange(r,0,i)||this.prevMatchInRange(r,o,r.doc.length)}},{key:"getReplacement",value:function(r){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(i,o){return o=="$"?"$":o=="&"?r.match[0]:o!="0"&&+o<r.match.length?r.match[o]:i}))}},{key:"matchAll",value:function(r,i){for(var o=_c(this.spec,r,0,r.doc.length),a=[];!o.next().done;){if(a.length>=i)return null;a.push(o.value)}return a}},{key:"highlight",value:function(r,i,o,a){for(var s=_c(this.spec,r,Math.max(0,i-250),Math.min(o+250,r.doc.length));!s.next().done;)a(s.value.from,s.value.to)}}]),n}(),ef=cn.define(),ay=cn.define(),ps=Wr.define({create:function(e){return new sy(cy(e).create(),null)},update:function(e,t){var n,r=at(t.effects);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.is(ef)?e=new sy(i.value.create(),e.panel):i.is(ay)&&(e=new sy(e.query,i.value?uy:null))}}catch(o){r.e(o)}finally{r.f()}return e},provide:function(e){return Hl.from(e,function(t){return t.panel})}}),sy=tt(function e(t,n){X(this,e),this.query=t,this.panel=n}),YZ=Te.mark({class:"cm-searchMatch"}),ZZ=Te.mark({class:"cm-searchMatch cm-searchMatch-selected"}),XZ=zr.fromClass(function(){function e(t){X(this,e),this.view=t,this.decorations=this.highlight(t.state.field(ps))}return tt(e,[{key:"update",value:function(t){var n=t.state.field(ps);(n!=t.startState.field(ps)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(n))}},{key:"highlight",value:function(t){var n=t.query;if(!t.panel||!n.spec.valid)return Te.none;for(var r=this.view,i=new Ks,o=0,a=r.visibleRanges,s=a.length;o<s;o++){for(var u=a[o],c=u.from,l=u.to;o<s-1&&l>a[o+1].from-500;)l=a[++o].to;n.highlight(r.state,c,l,function(f,h){var d=r.state.selection.ranges.some(function(v){return v.from==f&&v.to==h});i.add(f,h,d?ZZ:YZ)})}return i.finish()}}]),e}(),{decorations:function(e){return e.decorations}});function nf(e){return function(t){var n=t.state.field(ps,!1);return n&&n.query.spec.valid?e(t,n):ly(t)}}var ov=nf(function(e,t){var n=t.query,r=e.state.selection.main.to,i=n.nextMatch(e.state,r,r);if(!i)return!1;var o=Ht.single(i.from,i.to),a=e.state.facet(Ys);return e.dispatch({selection:o,effects:[hy(e,i),a.scrollToMatch(o.main,e)],userEvent:"select.search"}),iT(e),!0}),av=nf(function(e,t){var n=t.query,r=e.state,i=r.selection.main.from,o=n.prevMatch(r,i,i);if(!o)return!1;var a=Ht.single(o.from,o.to),s=e.state.facet(Ys);return e.dispatch({selection:a,effects:[hy(e,o),s.scrollToMatch(a.main,e)],userEvent:"select.search"}),iT(e),!0}),tX=nf(function(e,t){var n=t.query.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:Ht.create(n.map(function(r){return Ht.range(r.from,r.to)})),userEvent:"select.search.matches"}),!0)}),nT=nf(function(e,t){var n=t.query,r=e.state,i=r.selection.main,o=i.from,a=i.to;if(r.readOnly)return!1;var s=n.nextMatch(r,o,o);if(!s)return!1;var u,c,l=[],f=[];if(s.from==o&&s.to==a&&(c=r.toText(n.getReplacement(s)),l.push({from:s.from,to:s.to,insert:c}),s=n.nextMatch(r,s.from,s.to),f.push(we.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(o).number)+"."))),s){var h=l.length==0||l[0].from>=s.to?0:s.to-s.from-c.length;u=Ht.single(s.from-h,s.to-h),f.push(hy(e,s)),f.push(r.facet(Ys).scrollToMatch(u.main,e))}return e.dispatch({changes:l,selection:u,effects:f,userEvent:"input.replace"}),!0}),eX=nf(function(e,t){var n=t.query;if(e.state.readOnly)return!1;var r=n.matchAll(e.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:n.getReplacement(o)}});if(!r.length)return!1;var i=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:we.announce.of(i),userEvent:"input.replace.all"}),!0});function uy(e){return e.state.facet(Ys).createPanel(e)}function cy(e,t){var n,r,i,o,a,s=e.selection.main,u=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!u)return t;var c=e.facet(Ys);return new tT({search:((n=t==null?void 0:t.literal)!==null&&n!==void 0?n:c.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(r=t==null?void 0:t.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=t==null?void 0:t.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=t==null?void 0:t.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=t==null?void 0:t.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function rT(e){var t=ql(e,uy);return t&&t.dom.querySelector("[main-field]")}function iT(e){var t=rT(e);t&&t==e.root.activeElement&&t.select()}var ly=function(e){var t=e.state.field(ps,!1);if(t&&t.panel){var n=rT(e);if(n&&n!=e.root.activeElement){var r=cy(e.state,t.query.spec);r.valid&&e.dispatch({effects:ef.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[ay.of(!0),t?ef.of(cy(e.state,t.query.spec)):cn.appendConfig.of(dy)]});return!0},fy=function(e){var t=e.state.field(ps,!1);if(!t||!t.panel)return!1;var n=ql(e,uy);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:ay.of(!1)}),!0},nX=[{key:"Mod-f",run:ly,scope:"editor search-panel"},{key:"F3",run:ov,shift:av,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ov,shift:av,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:fy,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(e){var t=e.state,n=e.dispatch,r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;for(var i=r.main,o=i.from,a=i.to,s=[],u=0,c=new Cc(t.doc,t.sliceDoc(o,a));!c.next().done;){if(s.length>1e3)return!1;c.value.from==o&&(u=s.length),s.push(Ht.range(c.value.from,c.value.to))}return n(t.update({selection:Ht.create(s,u),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(e){var t=ql(e,oy);if(!t){var n=[nv.of(!0)];e.state.field(Y9,!1)==null&&n.push(cn.appendConfig.of([Y9,VZ])),e.dispatch({effects:n}),t=ql(e,oy)}return t&&t.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(e){var t=e.state,n=e.dispatch,r=t.selection.ranges;if(r.some(function(a){return a.from===a.to}))return function(a){var s=a.state,u=a.dispatch,c=s.selection,l=Ht.create(c.ranges.map(function(f){return s.wordAt(f.head)||Ht.cursor(f.head)}),c.mainIndex);return!l.eq(c)&&(u(s.update({selection:l})),!0)}({state:t,dispatch:n});var i=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some(function(a){return t.sliceDoc(a.from,a.to)!=i}))return!1;var o=function(a,s){for(var u=a.selection,c=u.main,l=u.ranges,f=a.wordAt(c.head),h=f&&f.from==c.from&&f.to==c.to,d=function(g,y){if(y.next(),!y.done){if(g&&l.some(function(w){return w.from==y.value.from}))return v=g,p=y,"continue";if(h){var b=a.wordAt(y.value.from);if(!b||b.from!=y.value.from||b.to!=y.value.to)return v=g,p=y,"continue"}return{v:y.value}}if(g)return{v:null};y=new Cc(a.doc,s,0,Math.max(0,l[l.length-1].from-1)),v=g=!0,p=y},v=!1,p=new Cc(a.doc,s,l[l.length-1].to);;){var m=d(v,p);if(m!=="continue"&&ee(m)==="object")return m.v}}(t,i);return!!o&&(n(t.update({selection:t.selection.addRange(Ht.range(o.from,o.to),!1),effects:we.scrollIntoView(o.to)})),!0)},preventDefault:!0}],rX=function(){function e(t){var n=this;X(this,e),this.view=t;var r=this.query=t.state.field(ps).query.spec;function i(o,a,s){return Un("button",{class:"cm-button",name:o,onclick:a,type:"button"},s)}this.commit=this.commit.bind(this),this.searchField=Un("input",{value:r.search,placeholder:Ei(t,"Find"),"aria-label":Ei(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Un("input",{value:r.replace,placeholder:Ei(t,"Replace"),"aria-label":Ei(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Un("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=Un("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=Un("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit}),this.dom=Un("div",{onkeydown:function(o){return n.keydown(o)},class:"cm-search"},[this.searchField,i("next",function(){return ov(t)},[Ei(t,"next")]),i("prev",function(){return av(t)},[Ei(t,"previous")]),i("select",function(){return tX(t)},[Ei(t,"all")]),Un("label",null,[this.caseField,Ei(t,"match case")]),Un("label",null,[this.reField,Ei(t,"regexp")]),Un("label",null,[this.wordField,Ei(t,"by word")])].concat(Oe(t.state.readOnly?[]:[Un("br"),this.replaceField,i("replace",function(){return nT(t)},[Ei(t,"replace")]),i("replaceAll",function(){return eX(t)},[Ei(t,"replace all")])]),[Un("button",{name:"close",onclick:function(){return fy(t)},"aria-label":Ei(t,"close"),type:"button"},["\xD7"])]))}return tt(e,[{key:"commit",value:function(){var t=new tT({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:ef.of(t)}))}},{key:"keydown",value:function(t){(function(n,r,i){return tP(X7(n.state),r,n,i)})(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?av:ov)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),nT(this.view))}},{key:"update",value:function(t){var n,r=at(t.transactions);try{for(r.s();!(n=r.n()).done;){var i,o=at(n.value.effects);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.is(ef)&&!a.value.eq(this.query)&&this.setQuery(a.value)}}catch(s){o.e(s)}finally{o.f()}}}catch(s){r.e(s)}finally{r.f()}}},{key:"setQuery",value:function(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(Ys).top}}]),e}();function Ei(e,t){return e.state.phrase(t)}var sv=30,uv=/[\s\.,:;?!]/;function hy(e,t){var n=t.from,r=t.to,i=e.state.doc.lineAt(n),o=e.state.doc.lineAt(r).to,a=Math.max(i.from,n-sv),s=Math.min(o,r+sv),u=e.state.sliceDoc(a,s);if(a!=i.from){for(var c=0;c<sv;c++)if(!uv.test(u[c+1])&&uv.test(u[c])){u=u.slice(c);break}}if(s!=o){for(var l=u.length-1;l>u.length-sv;l--)if(!uv.test(u[l-1])&&uv.test(u[l])){u=u.slice(0,l);break}}return we.announce.of("".concat(e.state.phrase("current match"),". ").concat(u," ").concat(e.state.phrase("on line")," ").concat(i.number,"."))}var iX=we.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"}}),dy=[ps,uc.lowest(XZ),iX],oT=function(){function e(t,n,r){X(this,e),this.state=t,this.pos=n,this.explicit=r,this.abortListeners=[]}return tt(e,[{key:"tokenBefore",value:function(t){for(var n=ti(this.state).resolveInner(this.pos,-1);n&&t.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}},{key:"matchBefore",value:function(t){var n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(uT(t,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}},{key:"aborted",get:function(){return this.abortListeners==null}},{key:"addEventListener",value:function(t,n){t=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}]),e}();function aT(e){var t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),"[".concat(n?"\\w":"").concat(t.replace(/[^\w\s]/g,"\\$&"),"]")}function oX(e){var t=e.map(function(a){return typeof a=="string"?{label:a}:a}),n=t.every(function(a){return/^\w+$/.test(a.label)})?[/\w*$/,/\w+$/]:function(a){var s,u=Object.create(null),c=Object.create(null),l=at(a);try{for(l.s();!(s=l.n()).done;){var f=s.value.label;u[f[0]]=!0;for(var h=1;h<f.length;h++)c[f[h]]=!0}}catch(v){l.e(v)}finally{l.f()}var d=aT(u)+aT(c)+"*$";return[new RegExp("^"+d),new RegExp(d)]}(t),r=ke(n,2),i=r[0],o=r[1];return function(a){var s=a.matchBefore(o);return s||a.explicit?{from:s?s.from:a.pos,options:t,validFor:i}:null}}var sT=tt(function e(t,n,r){X(this,e),this.completion=t,this.source=n,this.match=r});function ms(e){return e.selection.main.head}function uT(e,t){var n,r=e.source,i=t&&r[0]!="^",o=r[r.length-1]!="$";return i||o?new RegExp("".concat(i?"^":"","(?:").concat(r,")").concat(o?"$":""),(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":""):e}function cT(e,t){var n=t.completion.apply||t.completion.label,r=t.source;typeof n=="string"?e.dispatch(function(i,o,a,s){return Object.assign(Object.assign({},i.changeByRange(function(u){if(u==i.selection.main)return{changes:{from:a,to:s,insert:o},range:Ht.cursor(a+o.length)};var c=s-a;return!u.empty||c&&i.sliceDoc(u.from-c,u.from)!=i.sliceDoc(a,s)?{range:u}:{changes:{from:u.from-c,to:u.from,insert:o},range:Ht.cursor(u.from-c+o.length)}})),{userEvent:"input.complete"})}(e.state,n,r.from,r.to)):n(e,t.completion,r.from,r.to)}var lT=new WeakMap;function aX(e){if(!Array.isArray(e))return e;var t=lT.get(e);return t||lT.set(e,t=oX(e)),t}var sX=function(){function e(t){X(this,e),this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(var n=0;n<t.length;){var r=Vr(t,n),i=_i(r);this.chars.push(r);var o=t.slice(n,n+i),a=o.toUpperCase();this.folded.push(Vr(a==o?o.toLowerCase():a,0)),n+=i}this.astral=t.length!=this.chars.length}return tt(e,[{key:"match",value:function(t){if(this.pattern.length==0)return[0];if(t.length<this.pattern.length)return null;var n=this.chars,r=this.folded,i=this.any,o=this.precise,a=this.byWord;if(n.length==1){var s=Vr(t,0);return s==n[0]?[0,0,_i(s)]:s==r[0]?[-200,0,_i(s)]:null}var u=t.indexOf(this.pattern);if(u==0)return[0,0,this.pattern.length];var c=n.length,l=0;if(u<0){for(var f=0,h=Math.min(t.length,200);f<h&&l<c;){var d=Vr(t,f);d!=n[l]&&d!=r[l]||(i[l++]=f),f+=_i(d)}if(l<c)return null}for(var v=0,p=0,m=!1,g=0,y=-1,b=-1,w=/[a-z]/.test(t),j=!0,x=0,R=Math.min(t.length,200),M=0;x<R&&p<c;){var E=Vr(t,x);u<0&&(v<c&&E==n[v]&&(o[v++]=x),g<c&&(E==n[g]||E==r[g]?(g==0&&(y=x),b=x+1,g++):g=0));var N=void 0,A=E<255?E>=48&&E<=57||E>=97&&E<=122?2:E>=65&&E<=90?1:0:(N=k0(E))!=N.toLowerCase()?1:N!=N.toUpperCase()?2:0;(!x||A==1&&w||M==0&&A!=0)&&(n[p]==E||r[p]==E&&(m=!0)?a[p++]=x:a.length&&(j=!1)),M=A,x+=_i(E)}return p==c&&a[0]==0&&j?this.result((m?-200:0)-100,a,t):g==c&&y==0?[-200-t.length,0,b]:u>-1?[-700-t.length,u,u+this.pattern.length]:g==c?[-900-t.length,y,b]:p==c?this.result((m?-200:0)-100-700+(j?0:-1100),a,t):n.length==2?null:this.result((i[0]?-700:0)-200-1100,i,t)}},{key:"result",value:function(t,n,r){var i,o=[t-r.length],a=1,s=at(n);try{for(s.s();!(i=s.n()).done;){var u=i.value,c=u+(this.astral?_i(Vr(r,u)):1);a>1&&o[a-1]==u?o[a-1]=c:(o[a++]=u,o[a++]=c)}}catch(l){s.e(l)}finally{s.f()}return o}}]),e}(),ua=Se.define({combine:function(e){return Ui(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(t,n){return t.label.localeCompare(n.label)}},{defaultKeymap:function(t,n){return t&&n},closeOnBlur:function(t,n){return t&&n},icons:function(t,n){return t&&n},optionClass:function(t,n){return function(r){return function(i,o){return i?o?i+" "+o:i:o}(t(r),n(r))}},addToOptions:function(t,n){return t.concat(n)}})}});function fT(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){var r=Math.floor(t/n);return{from:r*n,to:(r+1)*n}}var i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}var uX=function(){function e(t,n){var r=this;X(this,e),this.view=t,this.stateField=n,this.info=null,this.placeInfo={read:function(){return r.measureInfo()},write:function(c){return r.positionInfo(c)},key:this};var i=t.state.field(n),o=i.open,a=o.options,s=o.selected,u=t.state.facet(ua);this.optionContent=function(c){var l=c.addToOptions.slice();return c.icons&&l.push({render:function(f){var h,d=document.createElement("div");return d.classList.add("cm-completionIcon"),f.type&&(h=d.classList).add.apply(h,Oe(f.type.split(/\s+/g).map(function(v){return"cm-completionIcon-"+v}))),d.setAttribute("aria-hidden","true"),d},position:20}),l.push({render:function(f,h,d){var v=document.createElement("span");v.className="cm-completionLabel";for(var p=f.label,m=0,g=1;g<d.length;){var y=d[g++],b=d[g++];y>m&&v.appendChild(document.createTextNode(p.slice(m,y)));var w=v.appendChild(document.createElement("span"));w.appendChild(document.createTextNode(p.slice(y,b))),w.className="cm-completionMatchedText",m=b}return m<p.length&&v.appendChild(document.createTextNode(p.slice(m))),v},position:50},{render:function(f){if(!f.detail)return null;var h=document.createElement("span");return h.className="cm-completionDetail",h.textContent=f.detail,h},position:80}),l.sort(function(f,h){return f.position-h.position}).map(function(f){return f.render})}(u),this.optionClass=u.optionClass,this.range=fT(a.length,s,u.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",function(c){for(var l,f=c.target;f&&f!=r.dom;f=f.parentNode)if(f.nodeName=="LI"&&(l=/-(\d+)$/.exec(f.id))&&+l[1]<a.length)return cT(t,a[+l[1]]),void c.preventDefault()}),this.list=this.dom.appendChild(this.createListBox(a,i.id,this.range)),this.list.addEventListener("scroll",function(){r.info&&r.view.requestMeasure(r.placeInfo)})}return tt(e,[{key:"mount",value:function(){this.updateSel()}},{key:"update",value:function(t){t.state.field(this.stateField)!=t.startState.field(this.stateField)&&this.updateSel()}},{key:"positioned",value:function(){this.info&&this.view.requestMeasure(this.placeInfo)}},{key:"updateSel",value:function(){var t=this,n=this.view.state.field(this.stateField),r=n.open;if((r.selected<this.range.from||r.selected>=this.range.to)&&(this.range=fT(r.options.length,r.selected,this.view.state.facet(ua).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(r.options,n.id,this.range)),this.list.addEventListener("scroll",function(){t.info&&t.view.requestMeasure(t.placeInfo)})),this.updateSelectedOption(r.selected)){this.info&&(this.info.remove(),this.info=null);var i=r.options[r.selected].completion,o=i.info;if(!o)return;var a=typeof o=="string"?document.createTextNode(o):o(i);if(!a)return;"then"in a?a.then(function(s){s&&t.view.state.field(t.stateField,!1)==n&&t.addInfoPane(s)}).catch(function(s){return Mi(t.view.state,s,"completion info")}):this.addInfoPane(a)}}},{key:"addInfoPane",value:function(t){var n=this.info=document.createElement("div");n.className="cm-tooltip cm-completionInfo",n.appendChild(t),this.dom.appendChild(n),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(t){for(var n=null,r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)i==t?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&function(o,a){var s=o.getBoundingClientRect(),u=a.getBoundingClientRect();u.top<s.top?o.scrollTop-=s.top-u.top:u.bottom>s.bottom&&(o.scrollTop+=u.bottom-s.bottom)}(this.list,n),n}},{key:"measureInfo",value:function(){var t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;var n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=t.getBoundingClientRect();if(i.top>Math.min(innerHeight,n.bottom)-10||i.bottom<Math.max(0,n.top)+10)return null;var o=Math.max(0,Math.min(i.top,innerHeight-r.height))-n.top,a=this.view.textDirection==dr.RTL,s=n.left,u=innerWidth-n.right;return a&&s<Math.min(r.width,u)?a=!1:!a&&u<Math.min(r.width,s)&&(a=!0),{top:o,left:a}}},{key:"positionInfo",value:function(t){this.info&&(this.info.style.top=(t?t.top:-1e6)+"px",t&&(this.info.classList.toggle("cm-completionInfo-left",t.left),this.info.classList.toggle("cm-completionInfo-right",!t.left)))}},{key:"createListBox",value:function(t,n,r){var i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));for(var o=r.from;o<r.to;o++){var a=t[o],s=a.completion,u=a.match,c=i.appendChild(document.createElement("li"));c.id=n+"-"+o,c.setAttribute("role","option");var l=this.optionClass(s);l&&(c.className=l);var f,h=at(this.optionContent);try{for(h.s();!(f=h.n()).done;){var d=(0,f.value)(s,this.view.state,u);d&&c.appendChild(d)}}catch(v){h.e(v)}finally{h.f()}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<t.length&&i.classList.add("cm-completionListIncompleteBottom"),i}}]),e}();function hT(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}var cX=function(){function e(t,n,r,i,o){X(this,e),this.options=t,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o}return tt(e,[{key:"setSelected",value:function(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,dT(n,t),this.tooltip,this.timestamp,t)}},{key:"map",value:function(t){return new e(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(t,n,r,i,o){var a=function(f,h){var d,v=[],p=0,m=at(f);try{for(m.s();!(d=m.n()).done;){var g=d.value;if(g.hasResult())if(g.result.filter===!1){var y,b=g.result.getMatch,w=at(g.result.options);try{for(w.s();!(y=w.n()).done;){var j=y.value,x=[1e9-p++];if(b){var R,M=at(b(j));try{for(M.s();!(R=M.n()).done;){var E=R.value;x.push(E)}}catch(D){M.e(D)}finally{M.f()}}v.push(new sT(j,g,x))}}catch(D){w.e(D)}finally{w.f()}}else{var N,A=new sX(h.sliceDoc(g.from,g.to)),L=void 0,W=at(g.result.options);try{for(W.s();!(N=W.n()).done;){var O=N.value;(L=A.match(O.label))&&(O.boost!=null&&(L[0]+=O.boost),v.push(new sT(O,g,L)))}}catch(D){W.e(D)}finally{W.f()}}}}catch(D){m.e(D)}finally{m.f()}var I,q=[],P=null,_=h.facet(ua).compareCompletions,S=at(v.sort(function(D,B){return B.match[0]-D.match[0]||_(D.completion,B.completion)}));try{for(S.s();!(I=S.n()).done;){var $=I.value;!P||P.label!=$.completion.label||P.detail!=$.completion.detail||P.type!=null&&$.completion.type!=null&&P.type!=$.completion.type||P.apply!=$.completion.apply?q.push($):hT($.completion)>hT(P)&&(q[q.length-1]=$),P=$.completion}}catch(D){S.e(D)}finally{S.f()}return q}(t,n);if(!a.length)return null;var s,u=n.facet(ua).selectOnOpen?0:-1;if(i&&i.selected!=u&&i.selected!=-1){for(var c=i.options[i.selected].completion,l=0;l<a.length;l++)if(a[l].completion==c){u=l;break}}return new e(a,dT(r,u),{pos:t.reduce(function(f,h){return h.hasResult()?Math.min(f,h.from):f},1e8),create:(s=Qi,function(f){return new uX(f,s)}),above:o.aboveCursor},i?i.timestamp:Date.now(),u)}}]),e}(),lX=function(){function e(t,n,r){X(this,e),this.active=t,this.id=n,this.open=r}return tt(e,[{key:"update",value:function(t){var n=this,r=t.state,i=r.facet(ua),o=(i.override||r.languageDataAt("autocomplete",ms(r)).map(aX)).map(function(l){var f=n.active.find(function(h){return h.source==l})||new Zs(l,n.active.some(function(h){return h.state!=0})?1:0);return f.update(t,i)});o.length==this.active.length&&o.every(function(l,f){return l==n.active[f]})&&(o=this.active);var a=t.selection||o.some(function(l){return l.hasResult()&&t.changes.touchesRange(l.from,l.to)})||!function(l,f){if(l==f)return!0;for(var h=0,d=0;;){for(;h<l.length&&!l[h].hasResult;)h++;for(;d<f.length&&!f[d].hasResult;)d++;var v=h==l.length,p=d==f.length;if(v||p)return v==p;if(l[h++].result!=f[d++].result)return!1}}(o,this.active)?cX.build(o,r,this.id,this.open,i):this.open&&t.docChanged?this.open.map(t.changes):this.open;!a&&o.every(function(l){return l.state!=1})&&o.some(function(l){return l.hasResult()})&&(o=o.map(function(l){return l.hasResult()?new Zs(l.source,0):l}));var s,u=at(t.effects);try{for(u.s();!(s=u.n()).done;){var c=s.value;c.is(pT)&&(a=a&&a.setSelected(c.value,this.id))}}catch(l){u.e(l)}finally{u.f()}return o==this.active&&a==this.open?this:new e(o,this.id,a)}},{key:"tooltip",get:function(){return this.open?this.open.tooltip:null}},{key:"attrs",get:function(){return this.open?this.open.attrs:fX}}],[{key:"start",value:function(){return new e(hX,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}}]),e}(),fX={"aria-autocomplete":"list"};function dT(e,t){var n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}var hX=[];function vy(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}var Zs=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;X(this,e),this.source=t,this.state=n,this.explicitPos=r}return tt(e,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(t,n){var r=vy(t),i=this;r?i=i.handleUserEvent(t,r,n):t.docChanged?i=i.handleChange(t):t.selection&&i.state!=0&&(i=new e(i.source,0));var o,a=at(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.is(py))i=new e(i.source,1,s.value?ms(t.state):-1);else if(s.is(cv))i=new e(i.source,0);else if(s.is(vT)){var u,c=at(s.value);try{for(c.s();!(u=c.n()).done;){var l=u.value;l.source==i.source&&(i=l)}}catch(f){c.e(f)}finally{c.f()}}}}catch(f){a.e(f)}finally{a.f()}return i}},{key:"handleUserEvent",value:function(t,n,r){return n!="delete"&&r.activateOnTyping?new e(this.source,1):this.map(t.changes)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(ms(t.startState))?new e(this.source,0):this.map(t.changes)}},{key:"map",value:function(t){return t.empty||this.explicitPos<0?this:new e(this.source,this.state,t.mapPos(this.explicitPos))}}]),e}(),dX=function(e){Ot(n,Zs);var t=Mt(n);function n(r,i,o,a,s){var u;return X(this,n),(u=t.call(this,r,2,i)).result=o,u.from=a,u.to=s,u}return tt(n,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(r,i,o){var a,s=r.changes.mapPos(this.from),u=r.changes.mapPos(this.to,1),c=ms(r.state);if((this.explicitPos<0?c<=s:c<this.from)||c>u||i=="delete"&&ms(r.startState)==this.from)return new Zs(this.source,i=="input"&&o.activateOnTyping?1:0);var l,f=this.explicitPos<0?-1:r.changes.mapPos(this.explicitPos);return function(h,d,v,p){if(!h)return!1;var m=d.sliceDoc(v,p);return typeof h=="function"?h(m,v,p,d):uT(h,!0).test(m)}(this.result.validFor,r.state,s,u)?new n(this.source,f,this.result,s,u):this.result.update&&(l=this.result.update(this.result,s,u,new oT(r.state,c,f>=0)))?new n(this.source,f,l,l.from,(a=l.to)!==null&&a!==void 0?a:ms(r.state)):new Zs(this.source,1,f)}},{key:"handleChange",value:function(r){return r.changes.touchesRange(this.from,this.to)?new Zs(this.source,0):this.map(r.changes)}},{key:"map",value:function(r){return r.empty?this:new n(this.source,this.explicitPos<0?-1:r.mapPos(this.explicitPos),this.result,r.mapPos(this.from),r.mapPos(this.to,1))}}]),n}(),py=cn.define(),cv=cn.define(),vT=cn.define({map:function(e,t){return e.map(function(n){return n.map(t)})}}),pT=cn.define(),Qi=Wr.define({create:function(){return lX.start()},update:function(e,t){return e.update(t)},provide:function(e){return[Md.from(e,function(t){return t.tooltip}),we.contentAttributes.from(e,function(t){return t.attrs})]}});function lv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"option";return function(n){var r=n.state.field(Qi,!1);if(!r||!r.open||Date.now()-r.open.timestamp<75)return!1;var i,o=1;t=="page"&&(i=function(u,c){var l=u.plugin(vP);if(!l)return null;var f=l.manager.tooltips.indexOf(c);return f<0?null:l.manager.tooltipViews[f]}(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));var a=r.open.options.length,s=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:a-1;return s<0?s=t=="page"?0:a-1:s>=a&&(s=t=="page"?a-1:0),n.dispatch({effects:pT.of(s)}),!0}}var vX=tt(function e(t,n){X(this,e),this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}),pX=zr.fromClass(function(){function e(t){X(this,e),this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var n,r=at(t.state.field(Qi).active);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.state==1&&this.startQuery(i)}}catch(o){r.e(o)}finally{r.f()}}return tt(e,[{key:"update",value:function(t){var n=this,r=t.state.field(Qi);if(t.selectionSet||t.docChanged||t.startState.field(Qi)!=r){for(var i=t.transactions.some(function(v){return(v.selection||v.docChanged)&&!vy(v)}),o=0;o<this.running.length;o++){var a=this.running[o];if(i||a.updates.length+t.transactions.length>50&&Date.now()-a.time>1e3){var s,u=at(a.context.abortListeners);try{for(u.s();!(s=u.n()).done;){var c=s.value;try{c()}catch(v){Mi(this.view.state,v)}}}catch(v){u.e(v)}finally{u.f()}a.context.abortListeners=null,this.running.splice(o--,1)}else{var l;(l=a.updates).push.apply(l,Oe(t.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=r.active.some(function(v){return v.state==1&&!n.running.some(function(p){return p.active.source==v.source})})?setTimeout(function(){return n.startUpdate()},50):-1,this.composing!=0){var f,h=at(t.transactions);try{for(h.s();!(f=h.n()).done;){var d=f.value;vy(d)=="input"?this.composing=2:this.composing==2&&d.selection&&(this.composing=3)}}catch(v){h.e(v)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var t=this;this.debounceUpdate=-1;var n,r=at(this.view.state.field(Qi).active);try{var i=function(){var o=n.value;o.state!=1||t.running.some(function(a){return a.active.source==o.source})||t.startQuery(o)};for(r.s();!(n=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}}},{key:"startQuery",value:function(t){var n=this,r=this.view.state,i=ms(r),o=new oT(r,i,t.explicitPos==i),a=new vX(t,o);this.running.push(a),Promise.resolve(t.source(o)).then(function(s){a.context.aborted||(a.done=s||null,n.scheduleAccept())},function(s){n.view.dispatch({effects:cv.of(null)}),Mi(n.view.state,s)})}},{key:"scheduleAccept",value:function(){var t=this;this.running.every(function(n){return n.done!==void 0})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return t.accept()},50))}},{key:"accept",value:function(){var t,n=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var r=[],i=this.view.state.facet(ua),o=function(s){var u=n.running[s];if(u.done===void 0)return a=s,"continue";if(n.running.splice(s--,1),u.done){var c,l=new dX(u.active.source,u.active.explicitPos,u.done,u.done.from,(t=u.done.to)!==null&&t!==void 0?t:ms(u.updates.length?u.updates[0].startState:n.view.state)),f=at(u.updates);try{for(f.s();!(c=f.n()).done;){var h=c.value;l=l.update(h,i)}}catch(y){f.e(y)}finally{f.f()}if(l.hasResult())return r.push(l),a=s,"continue"}var d=n.view.state.field(Qi).active.find(function(y){return y.source==u.active.source});if(d&&d.state==1)if(u.done==null){var v,p=new Zs(u.active.source,0),m=at(u.updates);try{for(m.s();!(v=m.n()).done;){var g=v.value;p=p.update(g,i)}}catch(y){m.e(y)}finally{m.f()}p.state!=1&&r.push(p)}else n.startQuery(d);a=s},a=0;a<this.running.length;a++)o(a);r.length&&this.view.dispatch({effects:vT.of(r)})}}]),e}(),{eventHandlers:{blur:function(){var e=this.view.state.field(Qi,!1);e&&e.tooltip&&this.view.state.facet(ua).closeOnBlur&&this.view.dispatch({effects:cv.of(null)})},compositionstart:function(){this.composing=1},compositionend:function(){var e=this;this.composing==3&&setTimeout(function(){return e.view.dispatch({effects:py.of(!1)})},20),this.composing=0}}}),mX=we.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",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",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"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),fv={brackets:["(","[","{","'",'"'],before:")]}:;>"},Xs=cn.define({map:function(e,t){var n=t.mapPos(e,-1,ui.TrackAfter);return n==null?void 0:n}}),my=cn.define({map:function(e,t){return t.mapPos(e)}}),gy=new(function(e){Ot(n,Js);var t=Mt(n);function n(){return X(this,n),t.apply(this,arguments)}return tt(n)}());gy.startSide=1,gy.endSide=-1;var mT=Wr.define({create:function(){return Qn.empty},update:function(e,t){if(t.selection){var n=t.state.doc.lineAt(t.selection.main.head).from,r=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(r,-1)&&(e=Qn.empty)}e=e.map(t.changes);var i,o=at(t.effects);try{var a=function(){var s=i.value;s.is(Xs)?e=e.update({add:[gy.range(s.value,s.value+1)]}):s.is(my)&&(e=e.update({filter:function(u){return u!=s.value}}))};for(o.s();!(i=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}return e}}),yy="()[]{}<>";function gT(e){for(var t=0;t<yy.length;t+=2)if(yy.charCodeAt(t)==e)return yy.charAt(t+1);return k0(e<128?e:e+1)}function yT(e,t){return e.languageDataAt("closeBrackets",t)[0]||fv}var gX=(typeof navigator=="undefined"?"undefined":ee(navigator))=="object"&&/Android\b/.test(navigator.userAgent),yX=we.inputHandler.of(function(e,t,n,r){if((gX?e.composing:e.compositionStarted)||e.state.readOnly)return!1;var i=e.state.selection.main;if(r.length>2||r.length==2&&_i(Vr(r,0))==1||t!=i.from||n!=i.to)return!1;var o=function(a,s){var u,c=yT(a,a.selection.main.head),l=c.brackets||fv.brackets,f=at(l);try{for(f.s();!(u=f.n()).done;){var h=u.value,d=gT(Vr(h,0));if(s==h)return d==h?kX(a,h,l.indexOf(h+h+h)>-1):wX(a,h,d,c.before||fv.before);if(s==d&&bT(a,a.selection.main.from))return xX(a,h,d)}}catch(v){f.e(v)}finally{f.f()}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}),bX=[{key:"Backspace",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=yT(t,t.selection.main.head).brackets||fv.brackets,i=null,o=t.changeByRange(function(a){if(a.empty){var s,u=function(f,h){var d=f.sliceString(h-2,h);return _i(Vr(d,0))==d.length?d:d.slice(1)}(t.doc,a.head),c=at(r);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(l==u&&hv(t.doc,a.head)==gT(Vr(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:Ht.cursor(a.head-l.length),userEvent:"delete.backward"}}}catch(f){c.e(f)}finally{c.f()}}return{range:i=a}});return i||n(t.update(o,{scrollIntoView:!0})),!i}}];function bT(e,t){var n=!1;return e.field(mT).between(0,e.doc.length,function(r){r==t&&(n=!0)}),n}function hv(e,t){var n=e.sliceString(t,t+2);return n.slice(0,_i(Vr(n,0)))}function wX(e,t,n,r){var i=null,o=e.changeByRange(function(a){if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Xs.of(a.to+t.length),range:Ht.range(a.anchor+t.length,a.head+t.length)};var s=hv(e.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:t+n,from:a.head},effects:Xs.of(a.head+t.length),range:Ht.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function xX(e,t,n){var r=null,i=e.selection.ranges.map(function(o){return o.empty&&hv(e.doc,o.head)==n?Ht.cursor(o.head+n.length):r=o});return r?null:e.update({selection:Ht.create(i,e.selection.mainIndex),scrollIntoView:!0,effects:e.selection.ranges.map(function(o){var a=o.from;return my.of(a)})})}function kX(e,t,n){var r=null,i=e.changeByRange(function(o){if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:t,from:o.to}],effects:Xs.of(o.to+t.length),range:Ht.range(o.anchor+t.length,o.head+t.length)};var a=o.head,s=hv(e.doc,a);if(s==t){if(wT(e,a))return{changes:{insert:t+t,from:a},effects:Xs.of(a+t.length),range:Ht.cursor(a+t.length)};if(bT(e,a)){var u=n&&e.sliceDoc(a,a+3*t.length)==t+t+t;return{range:Ht.cursor(a+t.length*(u?3:1)),effects:my.of(a)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&wT(e,a-2*t.length))return{changes:{insert:t+t+t+t,from:a},effects:Xs.of(a+t.length),range:Ht.cursor(a+t.length)};if(e.charCategorizer(a)(s)!=lr.Word){var c=e.sliceDoc(a-1,a);if(c!=t&&e.charCategorizer(a)(c)!=lr.Word&&!function(l,f,h){for(var d=ti(l).resolveInner(f,-1),v=0;v<5;v++){if(l.sliceDoc(d.from,d.from+h.length)==h){for(var p=d.firstChild;p&&p.from==d.from&&p.to-p.from>h.length;){if(l.sliceDoc(p.to-h.length,p.to)==h)return!1;p=p.firstChild}return!0}var m=d.to==f&&d.parent;if(!m)break;d=m}return!1}(e,a,t))return{changes:{insert:t+t,from:a},effects:Xs.of(a+t.length),range:Ht.cursor(a+t.length)}}}return{range:r=o}});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function wT(e,t){var n=ti(e).resolveInner(t+1);return n.parent&&n.from==t}function jX(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[Qi,ua.of(e),pX,SX,mX]}var xT=[{key:"Ctrl-Space",run:function(e){return!!e.state.field(Qi,!1)&&(e.dispatch({effects:py.of(!0)}),!0)}},{key:"Escape",run:function(e){var t=e.state.field(Qi,!1);return!(!t||!t.active.some(function(n){return n.state!=0}))&&(e.dispatch({effects:cv.of(null)}),!0)}},{key:"ArrowDown",run:lv(!0)},{key:"ArrowUp",run:lv(!1)},{key:"PageDown",run:lv(!0,"page")},{key:"PageUp",run:lv(!1,"page")},{key:"Enter",run:function(e){var t=e.state.field(Qi,!1);return!(e.state.readOnly||!t||!t.open||Date.now()-t.open.timestamp<75||t.open.selected<0)&&(cT(e,t.open.options[t.open.selected]),!0)}}],SX=uc.highest(Cd.computeN([ua],function(e){return e.facet(ua).defaultKeymap?[xT]:[]})),CX=tt(function e(t,n,r){X(this,e),this.from=t,this.to=n,this.diagnostic=r}),rf=function(){function e(t,n,r){X(this,e),this.diagnostics=t,this.panel=n,this.selected=r}return tt(e,null,[{key:"init",value:function(t,n,r){var i=t,o=r.facet(tu).markerFilter;o&&(i=o(i));var a=Te.set(i.map(function(s){return s.from==s.to||s.from==s.to-1&&r.doc.lineAt(s.from).to==s.from?Te.widget({widget:new EX(s),diagnostic:s}).range(s.from):Te.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity},diagnostic:s}).range(s.from,s.to)}),!0);return new e(a,n,Oc(a))}}]),e}();function Oc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=null;return e.between(n,1e9,function(i,o,a){var s=a.spec;if(!t||s.diagnostic==t)return r=new CX(i,o,s.diagnostic),!1}),r}function kT(e,t){var n=e.startState.doc.lineAt(t.pos);return!(!e.effects.some(function(r){return r.is(dv)})&&!e.changes.touchesRange(n.from,n.to))}function jT(e,t){return e.field(Ai,!1)?t:t.concat(cn.appendConfig.of(TT))}var dv=cn.define(),by=cn.define(),ST=cn.define(),Ai=Wr.define({create:function(){return new rf(Te.none,null,null)},update:function(e,t){if(t.docChanged){var n=e.diagnostics.map(t.changes),r=null;if(e.selected){var i=t.changes.mapPos(e.selected.from,1);r=Oc(n,e.selected.diagnostic,i)||Oc(n,null,i)}e=new rf(n,e.panel,r)}var o,a=at(t.effects);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.is(dv)?e=rf.init(s.value,e.panel,t.state):s.is(by)?e=new rf(e.diagnostics,s.value?ET.open:null,e.selected):s.is(ST)&&(e=new rf(e.diagnostics,e.panel,s.value))}}catch(u){a.e(u)}finally{a.f()}return e},provide:function(e){return[Hl.from(e,function(t){return t.panel}),we.decorations.from(e,function(t){return t.diagnostics})]}}),$X=Te.mark({class:"cm-lintRange cm-lintRange-active"});function _X(e,t,n){var r=e.state.field(Ai).diagnostics,i=[],o=2e8,a=0;r.between(t-(n<0?1:0),t+(n>0?1:0),function(u,c,l){var f=l.spec;t>=u&&t<=c&&(u==c||(t>u||n>0)&&(t<c||n<0))&&(i.push(f.diagnostic),o=Math.min(u,o),a=Math.max(c,a))});var s=e.state.facet(tu).tooltipFilter;return s&&(i=s(i)),i.length?{pos:o,end:a,above:e.state.doc.lineAt(o).to<a,create:function(){return{dom:CT(e,i)}}}:null}function CT(e,t){return Un("ul",{class:"cm-tooltip-lint"},t.map(function(n){return OT(e,n,!1)}))}var $T=function(e){var t=e.state.field(Ai,!1);return!(!t||!t.panel)&&(e.dispatch({effects:by.of(!1)}),!0)},OX=[{key:"Mod-Shift-m",run:function(e){var t=e.state.field(Ai,!1);t&&t.panel||e.dispatch({effects:jT(e.state,[by.of(!0)])});var n=ql(e,ET.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:function(e){var t=e.state.field(Ai,!1);if(!t)return!1;var n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(!(r=t.diagnostics.iter(0)).value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],MX=zr.fromClass(function(){function e(t){X(this,e),this.view=t,this.timeout=-1,this.set=!0;var n=t.state.facet(tu).delay;this.lintTime=Date.now()+n,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,n)}return tt(e,[{key:"run",value:function(){var t=this,n=Date.now();if(n<this.lintTime-10)setTimeout(this.run,this.lintTime-n);else{this.set=!1;var r=this.view.state,i=r.facet(tu).sources;Promise.all(i.map(function(o){return Promise.resolve(o(t.view))})).then(function(o){var a=o.reduce(function(s,u){return s.concat(u)});t.view.state.doc==r.doc&&t.view.dispatch(function(s,u){return{effects:jT(s,[dv.of(u)])}}(t.view.state,a))},function(o){Mi(t.view.state,o)})}}},{key:"update",value:function(t){var n=t.state.facet(tu);(t.docChanged||n!=t.startState.facet(tu)||n.needsRefresh&&n.needsRefresh(t))&&(this.lintTime=Date.now()+n.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,n.delay)))}},{key:"force",value:function(){this.set&&(this.lintTime=Date.now(),this.run())}},{key:"destroy",value:function(){clearTimeout(this.timeout)}}]),e}()),tu=Se.define({combine:function(e){return Object.assign({sources:e.map(function(t){return t.source})},Ui(e.map(function(t){return t.config}),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:function(t,n){return t?n?function(r){return t(r)||n(r)}:t:n}}))}});function _T(e){var t=[];if(e){var n,r=at(e);try{t:for(r.s();!(n=r.n()).done;){for(var i=n.value.name,o=function(){var s=i[a];if(/[a-zA-Z]/.test(s)&&!t.some(function(u){return u.toLowerCase()==s.toLowerCase()}))return t.push(s),"continue|actions"},a=0;a<i.length;a++)if(o()==="continue|actions")continue t;t.push("")}}catch(s){r.e(s)}finally{r.f()}}return t}function OT(e,t,n){var r,i=n?_T(t.actions):[];return Un("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Un("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),(r=t.actions)===null||r===void 0?void 0:r.map(function(o,a){var s=!1,u=function(h){if(h.preventDefault(),!s){s=!0;var d=Oc(e.state.field(Ai).diagnostics,t);d&&o.apply(e,d.from,d.to)}},c=o.name,l=i[a]?c.indexOf(i[a]):-1,f=l<0?c:[c.slice(0,l),Un("u",c.slice(l,l+1)),c.slice(l+1)];return Un("button",{type:"button",class:"cm-diagnosticAction",onclick:u,onmousedown:u,"aria-label":" Action: ".concat(c).concat(l<0?"":' (access key "'.concat(i[a],')"'),".")},f)}),t.source&&Un("div",{class:"cm-diagnosticSource"},t.source))}var EX=function(e){Ot(n,ss);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).diagnostic=r,i}return tt(n,[{key:"eq",value:function(r){return r.diagnostic==this.diagnostic}},{key:"toDOM",value:function(){return Un("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}]),n}(),MT=tt(function e(t,n){X(this,e),this.diagnostic=n,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=OT(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}),ET=function(){function e(t){var n=this;X(this,e),this.view=t,this.items=[],this.list=Un("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:function(r){if(r.keyCode==27)$T(n.view),n.view.focus();else if(r.keyCode==38||r.keyCode==33)n.moveSelection((n.selectedIndex-1+n.items.length)%n.items.length);else if(r.keyCode==40||r.keyCode==34)n.moveSelection((n.selectedIndex+1)%n.items.length);else if(r.keyCode==36)n.moveSelection(0);else if(r.keyCode==35)n.moveSelection(n.items.length-1);else if(r.keyCode==13)n.view.focus();else{if(!(r.keyCode>=65&&r.keyCode<=90&&n.selectedIndex>=0))return;for(var i=n.items[n.selectedIndex].diagnostic,o=_T(i.actions),a=0;a<o.length;a++)if(o[a].toUpperCase().charCodeAt(0)==r.keyCode){var s=Oc(n.view.state.field(Ai).diagnostics,i);s&&i.actions[a].apply(t,s.from,s.to)}}r.preventDefault()},onclick:function(r){for(var i=0;i<n.items.length;i++)n.items[i].dom.contains(r.target)&&n.moveSelection(i)}}),this.dom=Un("div",{class:"cm-panel-lint"},this.list,Un("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:function(){return $T(n.view)}},"\xD7")),this.update()}return tt(e,[{key:"selectedIndex",get:function(){var t=this.view.state.field(Ai).selected;if(!t)return-1;for(var n=0;n<this.items.length;n++)if(this.items[n].diagnostic==t.diagnostic)return n;return-1}},{key:"update",value:function(){var t=this,n=this.view.state.field(Ai),r=n.diagnostics,i=n.selected,o=0,a=!1,s=null;for(r.between(0,this.view.state.doc.length,function(u,c,l){for(var f,h=l.spec,d=-1,v=o;v<t.items.length;v++)if(t.items[v].diagnostic==h.diagnostic){d=v;break}d<0?(f=new MT(t.view,h.diagnostic),t.items.splice(o,0,f),a=!0):(f=t.items[d],d>o&&(t.items.splice(o,d-o),a=!0)),i&&f.diagnostic==i.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),o++});o<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)a=!0,this.items.pop();this.items.length==0&&(this.items.push(new MT(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),a=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:function(){return{sel:s.dom.getBoundingClientRect(),panel:t.list.getBoundingClientRect()}},write:function(u){var c=u.sel,l=u.panel;c.top<l.top?t.list.scrollTop-=l.top-c.top:c.bottom>l.bottom&&(t.list.scrollTop+=c.bottom-l.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),a&&this.sync()}},{key:"sync",value:function(){var t=this.list.firstChild;function n(){var a=t;t=a.nextSibling,a.remove()}var r,i=at(this.items);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.dom.parentNode==this.list){for(;t!=o.dom;)n();t=o.dom.nextSibling}else this.list.insertBefore(o.dom,t)}}catch(a){i.e(a)}finally{i.f()}for(;t;)n()}},{key:"moveSelection",value:function(t){if(!(this.selectedIndex<0)){var n=Oc(this.view.state.field(Ai).diagnostics,this.items[t].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:ST.of(n)})}}}],[{key:"open",value:function(t){return new e(t)}}]),e}();function vv(e){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" `.concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(e),"</svg>')")}function wy(e){return vv('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(e,'" fill="none" stroke-width=".7"/>'),'width="6" height="3"')}var AX=we.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-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:wy("#d11")},".cm-lintRange-warning":{backgroundImage:wy("orange")},".cm-lintRange-info":{backgroundImage:wy("#999")},".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-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}}}),PX=function(e){Ot(n,na);var t=Mt(n);function n(r){var i;return X(this,n),(i=t.call(this)).diagnostics=r,i.severity=r.reduce(function(o,a){var s=a.severity;return s=="error"||s=="warning"&&o=="info"?s:o},"info"),i}return tt(n,[{key:"toDOM",value:function(r){var i=document.createElement("div");i.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,a=r.state.facet(pv).tooltipFilter;return a&&(o=a(o)),o.length&&(i.onmouseover=function(){return function(s,u,c){function l(){var v=s.elementAtHeight(u.getBoundingClientRect().top+5-s.documentTop);s.coordsAtPos(v.from)&&s.dispatch({effects:xy.of({pos:v.from,above:!1,create:function(){return{dom:CT(s,c),getCoords:function(){return u.getBoundingClientRect()}}}})}),u.onmouseout=u.onmousemove=null,function(p,m){var g=function y(b){var w=m.getBoundingClientRect();if(!(b.clientX>w.left-10&&b.clientX<w.right+10&&b.clientY>w.top-10&&b.clientY<w.bottom+10)){for(var j=b.target;j;j=j.parentNode)if(j.nodeType==1&&j.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",y),p.state.field(PT)&&p.dispatch({effects:xy.of(null)})}};window.addEventListener("mousemove",g)}(s,u)}var f=s.state.facet(pv),h=f.hoverTime,d=setTimeout(l,h);u.onmouseout=function(){clearTimeout(d),u.onmouseout=u.onmousemove=null},u.onmousemove=function(){clearTimeout(d),d=setTimeout(l,h)}}(r,i,o)}),i}}]),n}();function TX(e,t){var n,r=Object.create(null),i=at(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=e.lineAt(o.from);(r[a.from]||(r[a.from]=[])).push(o)}}catch(c){i.e(c)}finally{i.f()}var s=[];for(var u in r)s.push(new PX(r[u]).range(+u));return Qn.of(s,!0)}var RX=bP({class:"cm-gutter-lint",markers:function(e){return e.state.field(AT)}}),AT=Wr.define({create:function(){return Qn.empty},update:function(e,t){e=e.map(t.changes);var n,r=t.state.facet(pv).markerFilter,i=at(t.effects);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.is(dv)){var a=o.value;r&&(a=r(a||[])),e=TX(t.state.doc,a.slice(0))}}}catch(s){i.e(s)}finally{i.f()}return e}}),xy=cn.define(),PT=Wr.define({create:function(){return null},update:function(e,t){return e&&t.docChanged&&(e=kT(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce(function(n,r){return r.is(xy)?r.value:n},e)},provide:function(e){return Md.from(e)}}),NX=we.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:vv('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:vv('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:vv('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),TT=[Ai,we.decorations.compute([Ai],function(e){var t=e.field(Ai),n=t.selected,r=t.panel;return n&&r&&n.from!=n.to?Te.set([$X.range(n.from,n.to)]):Te.none}),mY(_X,{hideOn:kT}),AX],pv=Se.define({combine:function(e){return Ui(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function IX(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[pv.of(e),AT,RX,NX,PT]}var RT,DX=function(){return[jY(),CY,tY(),CZ(),tZ(),UQ(),[Wl,QQ],Hn.allowMultipleSelections.of(!0),Hn.transactionFilter.of(function(n){if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;var r=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!r.length)return n;var i=n.newDoc,o=n.newSelection.main.head,a=i.lineAt(o);if(o>a.from+200)return n;var s=i.sliceString(a.from,o);if(!r.some(function(y){return y.test(s)}))return n;var u,c=n.state,l=-1,f=[],h=at(c.selection.ranges);try{for(h.s();!(u=h.n()).done;){var d=u.value.head,v=c.doc.lineAt(d);if(v.from!=l){l=v.from;var p=B1(c,v.from);if(p!=null){var m=/^\s*/.exec(v.text)[0],g=Yl(c,p);m!=g&&f.push({from:v.from,to:v.from+m.length,insert:g})}}}}catch(y){h.e(y)}finally{h.f()}return f.length?[n,{changes:f,sequential:!0}]:n}),ZP(iZ,{fallback:!0}),fZ(),[yX,mT],jX(),aY(),cY(),iY,(t=[JZ,UZ],e&&t.push(Z9.of(e)),t),Cd.of([].concat(bX,Oe(zZ),nX,RZ,YY,xT,OX))];var e,t}(),LX=function(){function e(t,n,r,i,o,a,s,u,c){var l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,f=arguments.length>10?arguments[10]:void 0;X(this,e),this.p=t,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=u,this.curContext=c,this.lookAhead=l,this.parent=f}return tt(e,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(t,n){return n%3==0}).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}},{key:"reduce",value:function(t){var n=t>>19,r=65535&t,i=this.p.parser,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),n==0)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,4,!0),void this.reduceContext(r,this.reducePos);var a=this.stack.length-3*(n-1)-(262144&t?6:0),s=this.stack[a-2],u=this.stack[a-1],c=this.bufferBase+this.buffer.length-u;if(r<i.minRepeatTerm||131072&t){var l=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,s,l,c+4,!0)}if(262144&t)this.state=this.stack[a];else{var f=this.stack[a-3];this.state=i.getGoto(f,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,s)}},{key:"storeNode",value:function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:4,o=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){var a=this,s=this.buffer.length;if(s==0&&a.parent&&(s=a.bufferBase-a.parent.bufferBase,a=a.parent),s>0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n)return void(a.buffer[s-2]=r)}}if(o&&this.pos!=r){var u=this.buffer.length;if(u>0&&this.buffer[u-4]!=0)for(;u>0&&this.buffer[u-2]>r;)this.buffer[u]=this.buffer[u-4],this.buffer[u+1]=this.buffer[u-3],this.buffer[u+2]=this.buffer[u-2],this.buffer[u+3]=this.buffer[u-1],u-=4,i>4&&(i-=4);this.buffer[u]=t,this.buffer[u+1]=n,this.buffer[u+2]=r,this.buffer[u+3]=i}else this.buffer.push(t,n,r,i)}},{key:"shift",value:function(t,n,r){var i=this.pos;if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{var o=t,a=this.p.parser;(r>this.pos||n<=a.maxNode)&&(this.pos=r,a.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}}},{key:"apply",value:function(t,n,r){65536&t?this.reduce(t):this.shift(t,n,r)}},{key:"useNode",value:function(t,n){var r=this.p.reused.length-1;(r<0||this.p.reused[r]!=t)&&(this.p.reused.push(t),r++);var i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}},{key:"split",value:function(){for(var t=this,n=t.buffer.length;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;for(var r=t.buffer.slice(n),i=t.bufferBase+n;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}},{key:"recoverByDelete",value:function(t,n){var r=t<=this.p.parser.maxNode;r&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}},{key:"canShift",value:function(t){for(var n=new BX(this);;){var r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(!(65536&r))return!0;if(r==0)return!1;n.reduce(r)}}},{key:"recoverByInsert",value:function(t){if(this.stack.length>=300)return[];var n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){for(var r,i=[],o=0;o<n.length;o+=2)(r=n[o+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(n[o],r);if(this.stack.length<120)for(var a=function(){var h=n[s+1];i.some(function(d,v){return 1&v&&d==h})||i.push(n[s],h)},s=0;i.length<8&&s<n.length;s+=2)a();n=i}for(var u=[],c=0;c<n.length&&u.length<4;c+=2){var l=n[c+1];if(l!=this.state){var f=this.split();f.pushState(l,this.pos),f.storeNode(0,f.pos,f.pos,4,!0),f.shiftContext(n[c],this.pos),f.score-=200,u.push(f)}}return u}},{key:"forceReduce",value:function(){var t=this.p.parser.stateSlot(this.state,5);if(!(65536&t))return!1;var n=this.p.parser;if(!n.validAction(this.state,t)){var r=t>>19,i=65535&t,o=this.stack.length-3*r;if(o<0||n.getGoto(this.stack[o],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(this.stack.length!=3)return!1;var t=this.p.parser;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(var n=0;n<this.stack.length;n+=3)if(this.stack[n]!=t.stack[n])return!1;return!0}},{key:"parser",get:function(){return this.p.parser}},{key:"dialectEnabled",value:function(t){return this.p.parser.dialect.flags[t]}},{key:"shiftContext",value:function(t,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(n)))}},{key:"reduceContext",value:function(t,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(n)))}},{key:"emitContext",value:function(){var t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.reducePos,this.reducePos,-3)}},{key:"emitLookAhead",value:function(){var t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.reducePos,this.reducePos,-4)}},{key:"updateContext",value:function(t){if(t!=this.curContext.context){var n=new NT(this.curContext.tracker,t);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}},{key:"setLookAhead",value:function(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new NT(i,i.start):null,0,null)}}]),e}(),NT=tt(function e(t,n){X(this,e),this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0});(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(RT||(RT={}));var BX=function(){function e(t){X(this,e),this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}return tt(e,[{key:"reduce",value:function(t){var n=65535&t,r=t>>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-=3*(r-1);var i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}]),e}(),zX=function(){function e(t,n,r){X(this,e),this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,this.index==0&&this.maybeNext()}return tt(e,[{key:"maybeNext",value:function(){var t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}},{key:"fork",value:function(){return new e(this.stack,this.pos,this.index)}}],[{key:"create",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.bufferBase+t.buffer.length;return new e(t,n,n-t.bufferBase)}}]),e}(),mv=tt(function e(){X(this,e),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),IT=new mv,FX=function(){function e(t,n){X(this,e),this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=IT,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return tt(e,[{key:"resolveOffset",value:function(t,n){for(var r=this.range,i=this.rangeIndex,o=this.pos+t;o<r.from;){if(!i)return null;var a=this.ranges[--i];o-=r.from-a.to,r=a}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;var s=this.ranges[++i];o+=s.from-r.to,r=s}return o}},{key:"clipPos",value:function(t){if(t>=this.range.from&&t<this.range.to)return t;var n,r=at(this.ranges);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.to>t)return Math.max(t,i.from)}}catch(o){r.e(o)}finally{r.f()}return this.end}},{key:"peek",value:function(t){var n,r,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)n=this.pos+t,r=this.chunk.charCodeAt(i);else{var o=this.resolveOffset(t,1);if(o==null)return-1;if((n=o)>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{for(var a=this.rangeIndex,s=this.range;s.to<=n;)s=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}},{key:"acceptToken",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=r}},{key:"getChunk",value:function(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){var t=this.chunk,n=this.chunkPos;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;var r=this.input.chunk(this.pos),i=this.pos+r.length;this.chunk=i>this.range.to?r.slice(0,this.range.to-this.pos):r,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(t,n){if(n?(this.token=n,n.start=t,n.lookAhead=t+1,n.value=n.extended=-1):this.token=IT,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}},{key:"read",value:function(t,n){if(t>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,n-this.chunkPos);if(t>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,n-this.chunk2Pos);if(t>=this.range.from&&n<=this.range.to)return this.input.read(t,n);var r,i="",o=at(this.ranges);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a.from>=n)break;a.to>t&&(i+=this.input.read(Math.max(a.from,t),Math.min(a.to,n)))}}catch(s){o.e(s)}finally{o.f()}return i}}]),e}(),gv=function(){function e(t,n){X(this,e),this.data=t,this.id=n}return tt(e,[{key:"token",value:function(t,n){(function(r,i,o,a){var s=0,u=1<<a,c=o.p.parser,l=c.dialect;t:for(;u&r[s];){for(var f=r[s+1],h=s+3;h<f;h+=2)if((r[h+1]&u)>0){var d=r[h];if(l.allows(d)&&(i.token.value==-1||i.token.value==d||c.overrides(d,i.token.value))){i.acceptToken(d);break}}var v=i.next,p=0,m=r[s+2];if(!(i.next<0&&m>p&&r[f+3*m-3]==65535)){for(;p<m;){var g=p+m>>1,y=f+g+(g<<1),b=r[y],w=r[y+1];if(v<b)m=g;else{if(!(v>=w)){s=r[y+2],i.advance();continue t}p=g+1}}break}s=r[f+3*m-1]}})(this.data,t,n,this.id)}}]),e}();function yv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uint16Array;if(typeof e!="string")return e;for(var n=null,r=0,i=0;r<e.length;){for(var o=0;;){var a=e.charCodeAt(r++),s=!1;if(a==126){o=65535;break}a>=92&&a--,a>=34&&a--;var u=a-32;if(u>=46&&(u-=46,s=!0),o+=u,s)break;o*=46}n?n[i++]=o:n=new t(o)}return n}gv.prototype.contextual=gv.prototype.fallback=gv.prototype.extend=!1;var DT,xo=typeof RN!="undefined"&&{NODE_ENV:"production",PUBLIC_PATH:"/"}&&/\bparse\b/.test({NODE_ENV:"production",PUBLIC_PATH:"/"}.LOG),ky=null;function LT(e,t,n){var r=e.cursor(Hr.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}(function(e){e[e.Margin=25]="Margin"})(DT||(DT={}));var BT,VX=function(){function e(t,n){X(this,e),this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return tt(e,[{key:"nextFragment",value:function(){var t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?LT(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?LT(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){var n=this.trees.length-1;if(n<0)return this.nextFragment(),null;var r=this.trees[n],i=this.index[n];if(i!=r.children.length){var o=r.children[i],a=this.start[n]+r.positions[i];if(a>t)return this.nextStart=a,null;if(o instanceof Ur){if(a==t){if(a<this.safeFrom)return null;var s=a+o.length;if(s<=this.safeTo){var u=o.prop(hn.lookAhead);if(!u||s+u<this.fragment.to)return o}}this.index[n]++,a+o.length>=Math.max(this.safeFrom,t)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),e}(),WX=function(){function e(t,n){X(this,e),this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(function(r){return new mv})}return tt(e,[{key:"getActions",value:function(t){for(var n=0,r=null,i=t.p.parser,o=i.tokenizers,a=i.stateSlot(t.state,3),s=t.curContext?t.curContext.hash:0,u=0,c=0;c<o.length;c++)if(1<<c&a){var l=o[c],f=this.tokens[c];if((!r||l.fallback)&&((l.contextual||f.start!=t.pos||f.mask!=a||f.context!=s)&&(this.updateCachedToken(f,l,t),f.mask=a,f.context=s),f.lookAhead>f.end+25&&(u=Math.max(f.lookAhead,u)),f.value!=0)){var h=n;if(f.extended>-1&&(n=this.addActions(t,f.extended,f.end,n)),n=this.addActions(t,f.value,f.end,n),!l.extend&&(r=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return u&&t.setLookAhead(u),r||t.pos!=this.stream.end||((r=new mv).value=t.p.parser.eofTerm,r.start=r.end=t.pos,n=this.addActions(t,r.value,r.end,n)),this.mainToken=r,this.actions}},{key:"getMainToken",value:function(t){if(this.mainToken)return this.mainToken;var n=new mv,r=t.pos,i=t.p;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}},{key:"updateCachedToken",value:function(t,n,r){var i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,t),r),t.value>-1){for(var o=r.p.parser,a=0;a<o.specialized.length;a++)if(o.specialized[a]==t.value){var s=o.specializers[a](this.stream.read(t.start,t.end),r);if(s>=0&&r.p.parser.dialect.allows(s>>1)){1&s?t.extended=s>>1:t.value=s>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}},{key:"putAction",value:function(t,n,r,i){for(var o=0;o<i;o+=3)if(this.actions[o]==t)return i;return this.actions[i++]=t,this.actions[i++]=n,this.actions[i++]=r,i}},{key:"addActions",value:function(t,n,r,i){for(var o=t.state,a=t.p.parser,s=a.data,u=0;u<2;u++)for(var c=a.stateSlot(o,u?2:1);;c+=3){if(s[c]==65535){if(s[c+1]!=1){i==0&&s[c+1]==2&&(i=this.putAction($a(s,c+2),n,r,i));break}c=$a(s,c+2)}s[c]==n&&(i=this.putAction($a(s,c+1),n,r,i))}return i}}]),e}();(function(e){e[e.Distance=5]="Distance",e[e.MaxRemainingPerStep=3]="MaxRemainingPerStep",e[e.MinBufferLengthPrune=500]="MinBufferLengthPrune",e[e.ForceReduceLimit=10]="ForceReduceLimit",e[e.CutDepth=15e3]="CutDepth",e[e.CutTo=9e3]="CutTo"})(BT||(BT={}));var qX=function(){function e(t,n,r,i){X(this,e),this.parser=t,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.stream=new FX(n,i),this.tokens=new WX(t,this.stream),this.topTerm=t.top[1];var o=i[0].from;this.stacks=[LX.start(this,t.top[0],o)],this.fragments=r.length&&this.stream.end-o>4*t.bufferLength?new VX(r,t.nodeSet):null}return tt(e,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var t,n,r=this.stacks,i=this.minStackPos,o=this.stacks=[],a=0;a<r.length;a++)for(var s=r[a];;){if(this.tokens.mainToken=null,s.pos>i)o.push(s);else{if(this.advanceStack(s,o,r))continue;t||(t=[],n=[]),t.push(s);var u=this.tokens.getMainToken(s);n.push(u.value,u.end)}break}if(!o.length){var c=t&&function(g){var y,b=null,w=at(g);try{for(w.s();!(y=w.n()).done;){var j=y.value,x=j.p.stoppedAt;(j.pos==j.p.stream.end||x!=null&&j.pos>x)&&j.p.parser.stateFlag(j.state,2)&&(!b||b.score<j.score)&&(b=j)}}catch(R){w.e(R)}finally{w.f()}return b}(t);if(c)return this.stackToTree(c);if(this.parser.strict)throw xo&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){var l=this.stoppedAt!=null&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,n,o);if(l)return this.stackToTree(l.forceAll())}if(this.recovering){var f=this.recovering==1?1:3*this.recovering;if(o.length>f)for(o.sort(function(g,y){return y.score-g.score});o.length>f;)o.pop();o.some(function(g){return g.reducePos>i})&&this.recovering--}else if(o.length>1)t:for(var h=0;h<o.length-1;h++)for(var d=o[h],v=h+1;v<o.length;v++){var p=o[v];if(d.sameState(p)||d.buffer.length>500&&p.buffer.length>500){if(!((d.score-p.score||d.buffer.length-p.buffer.length)>0)){o.splice(h--,1);continue t}o.splice(v--,1)}}this.minStackPos=o[0].pos;for(var m=1;m<o.length;m++)o[m].pos<this.minStackPos&&(this.minStackPos=o[m].pos);return null}},{key:"stopAt",value:function(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}},{key:"advanceStack",value:function(t,n,r){var i=t.pos,o=this.parser,a=xo?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments)for(var s=t.curContext&&t.curContext.tracker.strict,u=s?t.curContext.hash:0,c=this.fragments.nodeAt(i);c;){var l=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(t.state,c.type.id):-1;if(l>-1&&c.length&&(!s||(c.prop(hn.contextHash)||0)==u))return t.useNode(c,l),xo&&console.log(a+this.stackID(t)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ur)||c.children.length==0||c.positions[0]>0)break;var f=c.children[0];if(!(f instanceof Ur&&c.positions[0]==0))break;c=f}var h=o.stateSlot(t.state,4);if(h>0)return t.reduce(h),xo&&console.log(a+this.stackID(t)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(t.stack.length>=15e3)for(;t.stack.length>9e3&&t.forceReduce(););for(var d=this.tokens.getActions(t),v=0;v<d.length;){var p=d[v++],m=d[v++],g=d[v++],y=v==d.length||!r,b=y?t:t.split();if(b.apply(p,m,g),xo&&console.log(a+this.stackID(b)+" (via ".concat(65536&p?"reduce of ".concat(o.getName(65535&p)):"shift"," for ").concat(o.getName(m)," @ ").concat(i).concat(b==t?"":", split",")")),y)return!0;b.pos>i?n.push(b):r.push(b)}return!1}},{key:"advanceFully",value:function(t,n){for(var r=t.pos;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>r)return zT(t,n),!0}}},{key:"runRecovery",value:function(t,n,r){for(var i=null,o=!1,a=0;a<t.length;a++){var s=t[a],u=n[a<<1],c=n[1+(a<<1)],l=xo?this.stackID(s)+" -> ":"";if(!(s.deadEnd&&(o||(o=!0,s.restart(),xo&&console.log(l+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))){for(var f=s.split(),h=l,d=0;f.forceReduce()&&d<10&&(xo&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,r));d++)xo&&(h=this.stackID(f)+" -> ");var v,p=at(s.recoverByInsert(u));try{for(p.s();!(v=p.n()).done;){var m=v.value;xo&&console.log(l+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,r)}}catch(g){p.e(g)}finally{p.f()}this.stream.end>s.pos?(c==s.pos&&(c++,u=0),s.recoverByDelete(u,c),xo&&console.log(l+this.stackID(s)+" (via recover-delete ".concat(this.parser.getName(u),")")),zT(s,r)):(!i||i.score<s.score)&&(i=s)}}return i}},{key:"stackToTree",value:function(t){return t.close(),Ur.build({buffer:zX.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}},{key:"stackID",value:function(t){var n=(ky||(ky=new WeakMap)).get(t);return n||ky.set(t,n=String.fromCodePoint(this.nextStackID++)),n+t}}]),e}();function zT(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.pos==e.pos&&r.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}var HX=function(){function e(t,n,r){X(this,e),this.source=t,this.flags=n,this.disabled=r}return tt(e,[{key:"allows",value:function(t){return!this.disabled||this.disabled[t]==0}}]),e}(),UX=function(e){Ot(n,MP);var t=Mt(n);function n(r){var i,o;if(X(this,n),(o=t.call(this)).wrappers=[],r.version!=14)throw new RangeError("Parser version (".concat(r.version,") doesn't match runtime version (",14,")"));var a=r.nodeNames.split(" ");o.minRepeatTerm=a.length;for(var s=0;s<r.repeatNodeCount;s++)a.push("");for(var u=Object.keys(r.topRules).map(function(x){return r.topRules[x][1]}),c=[],l=0;l<a.length;l++)c.push([]);function f(x,R,M){c[x].push([R,R.deserialize(String(M))])}if(r.nodeProps){var h,d=at(r.nodeProps);try{for(d.s();!(h=d.n()).done;){var v=h.value,p=v[0];typeof p=="string"&&(p=hn[p]);for(var m=1;m<v.length;){var g=v[m++];if(g>=0)f(g,p,v[m++]);else{for(var y=v[m+-g],b=-g;b>0;b--)f(v[m++],p,y);m++}}}}catch(x){d.e(x)}finally{d.f()}}o.nodeSet=new OY(a.map(function(x,R){return Ji.define({name:R>=o.minRepeatTerm?void 0:x,id:R,props:c[R],top:u.indexOf(R)>-1,error:R==0,skipped:r.skippedNodes&&r.skippedNodes.indexOf(R)>-1})})),r.propSources&&(o.nodeSet=(i=o.nodeSet).extend.apply(i,Oe(r.propSources))),o.strict=!1,o.bufferLength=1024;var w=yv(r.tokenData);o.context=r.context,o.specializerSpecs=r.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var j=0;j<o.specializerSpecs.length;j++)o.specialized[j]=o.specializerSpecs[j].term;return o.specializers=o.specializerSpecs.map(VT),o.states=yv(r.states,Uint32Array),o.data=yv(r.stateData),o.goto=yv(r.goto),o.maxTerm=r.maxTerm,o.tokenizers=r.tokenizers.map(function(x){return typeof x=="number"?new gv(w,x):x}),o.topRules=r.topRules,o.dialects=r.dialects||{},o.dynamicPrecedences=r.dynamicPrecedences||null,o.tokenPrecTable=r.tokenPrec,o.termNames=r.termNames||null,o.maxNode=o.nodeSet.types.length-1,o.dialect=o.parseDialect(),o.top=o.topRules[Object.keys(o.topRules)[0]],o}return tt(n,[{key:"createParse",value:function(r,i,o){var a,s=new qX(this,r,i,o),u=at(this.wrappers);try{for(u.s();!(a=u.n()).done;)s=(0,a.value)(s,r,i,o)}catch(c){u.e(c)}finally{u.f()}return s}},{key:"getGoto",value:function(r,i){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=this.goto;if(i>=a[0])return-1;for(var s=a[i+1];;){var u=a[s++],c=1&u,l=a[s++];if(c&&o)return l;for(var f=s+(u>>1);s<f;s++)if(a[s]==r)return l;if(c)return-1}}},{key:"hasAction",value:function(r,i){for(var o=this.data,a=0;a<2;a++)for(var s,u=this.stateSlot(r,a?2:1);;u+=3){if((s=o[u])==65535){if(o[u+1]!=1){if(o[u+1]==2)return $a(o,u+2);break}s=o[u=$a(o,u+2)]}if(s==i||s==0)return $a(o,u+1)}return 0}},{key:"stateSlot",value:function(r,i){return this.states[6*r+i]}},{key:"stateFlag",value:function(r,i){return(this.stateSlot(r,0)&i)>0}},{key:"validAction",value:function(r,i){if(i==this.stateSlot(r,4))return!0;for(var o=this.stateSlot(r,1);;o+=3){if(this.data[o]==65535){if(this.data[o+1]!=1)return!1;o=$a(this.data,o+2)}if(i==$a(this.data,o+1))return!0}}},{key:"nextStates",value:function(r){for(var i=this,o=[],a=function(u){if(i.data[u]==65535){if(i.data[u+1]!=1)return s=u,"break";u=$a(i.data,u+2)}if(!(1&i.data[u+2])){var c=i.data[u+1];o.some(function(l,f){return 1&f&&l==c})||o.push(i.data[u],c)}s=u},s=this.stateSlot(r,1);a(s)!=="break";s+=3);return o}},{key:"overrides",value:function(r,i){var o=FT(this.data,this.tokenPrecTable,i);return o<0||FT(this.data,this.tokenPrecTable,r)<o}},{key:"configure",value:function(r){var i,o=Object.assign(Object.create(n.prototype),this);if(r.props&&(o.nodeSet=(i=this.nodeSet).extend.apply(i,Oe(r.props))),r.top){var a=this.topRules[r.top];if(!a)throw new RangeError("Invalid top rule name ".concat(r.top));o.top=a}return r.tokenizers&&(o.tokenizers=this.tokenizers.map(function(s){var u=r.tokenizers.find(function(c){return c.from==s});return u?u.to:s})),r.specializers&&(o.specializers=this.specializers.slice(),o.specializerSpecs=this.specializerSpecs.map(function(s,u){var c=r.specializers.find(function(f){return f.from==s.external});if(!c)return s;var l=Object.assign(Object.assign({},s),{external:c.to});return o.specializers[u]=VT(l),l})),r.contextTracker&&(o.context=r.contextTracker),r.dialect&&(o.dialect=this.parseDialect(r.dialect)),r.strict!=null&&(o.strict=r.strict),r.wrap&&(o.wrappers=o.wrappers.concat(r.wrap)),r.bufferLength!=null&&(o.bufferLength=r.bufferLength),o}},{key:"hasWrappers",value:function(){return this.wrappers.length>0}},{key:"getName",value:function(r){return this.termNames?this.termNames[r]:String(r<=this.maxNode&&this.nodeSet.types[r].name||r)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(r){var i=this.dynamicPrecedences;return i==null?0:i[r]||0}},{key:"parseDialect",value:function(r){var i=Object.keys(this.dialects),o=i.map(function(){return!1});if(r){var a,s=at(r.split(" "));try{for(s.s();!(a=s.n()).done;){var u=a.value,c=i.indexOf(u);c>=0&&(o[c]=!0)}}catch(v){s.e(v)}finally{s.f()}}for(var l=null,f=0;f<i.length;f++)if(!o[f])for(var h,d=this.dialects[i[f]];(h=this.data[d++])!=65535;)(l||(l=new Uint8Array(this.maxTerm+1)))[h]=1;return new HX(r,o,l)}}],[{key:"deserialize",value:function(r){return new n(r)}}]),n}();function $a(e,t){return e[t]|e[t+1]<<16}function FT(e,t,n){for(var r,i=t;(r=e[i])!=65535;i++)if(r==n)return i-t;return-1}function VT(e){if(e.external){var t=e.extend?1:0;return function(n,r){return e.external(n,r)<<1|t}}return e.get}var JX=PP({String:Xt.string,Number:Xt.number,"True False":Xt.bool,PropertyName:Xt.propertyName,Null:Xt.null,",":Xt.separator,"[ ]":Xt.squareBracket,"{ }":Xt.brace}),KX=UX.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:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[JX],skippedNodes:[0],repeatNodeCount:2,tokenData:"(p~RaXY!WYZ!W]^!Wpq!Wrs!]|}$i}!O$n!Q!R$w!R![&V![!]&h!}#O&m#P#Q&r#Y#Z&w#b#c'f#h#i'}#o#p(f#q#r(k~!]Oc~~!`Upq!]qr!]rs!rs#O!]#O#P!w#P~!]~!wOe~~!zXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#g~#jR!Q![#s!c!i#s#T#Z#s~#vR!Q![$P!c!i$P#T#Z$P~$SR!Q![$]!c!i$]#T#Z$]~$`R!Q![!]!c!i!]#T#Z!]~$nOh~~$qQ!Q!R$w!R![&V~$|RT~!O!P%V!g!h%k#X#Y%k~%YP!Q![%]~%bRT~!Q![%]!g!h%k#X#Y%k~%nR{|%w}!O%w!Q![%}~%zP!Q![%}~&SPT~!Q![%}~&[ST~!O!P%V!Q![&V!g!h%k#X#Y%k~&mOg~~&rO]~~&wO[~~&zP#T#U&}~'QP#`#a'T~'WP#g#h'Z~'^P#X#Y'a~'fOR~~'iP#i#j'l~'oP#`#a'r~'uP#`#a'x~'}OS~~(QP#f#g(T~(WP#i#j(Z~(^P#X#Y(a~(fOQ~~(kOW~~(pOV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),GX=zY.define({name:"json",parser:KX.configure({props:[zP.add({Object:VP({except:/^\s*\}/}),Array:VP({except:/^\s*\]/})}),WP.add({"Object Array":function(e){var t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function QX(e){Ae(e,"svelte-1oo7hnc",".jse-status-bar.svelte-1oo7hnc.svelte-1oo7hnc{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);margin:0;border-top:var(--jse-panel-border);border-left:var(--jse-main-border);border-right:var(--jse-main-border);display:flex;gap:var(--jse-padding)}.jse-status-bar.svelte-1oo7hnc.svelte-1oo7hnc:last-child{border-bottom:var(--jse-main-border)}.jse-status-bar.svelte-1oo7hnc .jse-status-bar-info.svelte-1oo7hnc{padding:2px}")}function WT(e){var t,n,r;return{c:function(){t=G("div"),n=Jt("Line: "),r=Jt(e[0]),C(t,"class","jse-status-bar-info svelte-1oo7hnc")},m:function(i,o){ot(i,t,o),F(t,n),F(t,r)},p:function(i,o){1&o&&be(r,i[0])},d:function(i){i&&it(t)}}}function qT(e){var t,n,r;return{c:function(){t=G("div"),n=Jt("Column: "),r=Jt(e[1]),C(t,"class","jse-status-bar-info svelte-1oo7hnc")},m:function(i,o){ot(i,t,o),F(t,n),F(t,r)},p:function(i,o){2&o&&be(r,i[1])},d:function(i){i&&it(t)}}}function HT(e){var t,n,r,i;return{c:function(){t=G("div"),n=Jt("Selection: "),r=Jt(e[2]),i=Jt(" characters"),C(t,"class","jse-status-bar-info svelte-1oo7hnc")},m:function(o,a){ot(o,t,a),F(t,n),F(t,r),F(t,i)},p:function(o,a){4&a&&be(r,o[2])},d:function(o){o&&it(t)}}}function YX(e){var t,n,r,i=e[0]!==void 0&&WT(e),o=e[1]!==void 0&&qT(e),a=e[2]!==void 0&&e[2]>0&&HT(e);return{c:function(){t=G("div"),i&&i.c(),n=vt(),o&&o.c(),r=vt(),a&&a.c(),C(t,"class","jse-status-bar svelte-1oo7hnc")},m:function(s,u){ot(s,t,u),i&&i.m(t,null),F(t,n),o&&o.m(t,null),F(t,r),a&&a.m(t,null)},p:function(s,u){var c=ke(u,1)[0];s[0]!==void 0?i?i.p(s,c):((i=WT(s)).c(),i.m(t,n)):i&&(i.d(1),i=null),s[1]!==void 0?o?o.p(s,c):((o=qT(s)).c(),o.m(t,r)):o&&(o.d(1),o=null),s[2]!==void 0&&s[2]>0?a?a.p(s,c):((a=HT(s)).c(),a.m(t,null)):a&&(a.d(1),a=null)},i:It,o:It,d:function(s){s&&it(t),i&&i.d(),o&&o.d(),a&&a.d()}}}function ZX(e,t,n){var r,i,o,a,s,u=t.editorState;return e.$$set=function(c){"editorState"in c&&n(3,u=c.editorState)},e.$$.update=function(){var c,l,f,h,d,v,p,m;8&e.$$.dirty&&n(4,r=(c=u)===null||c===void 0||(l=c.selection)===null||l===void 0||(f=l.main)===null||f===void 0?void 0:f.head),24&e.$$.dirty&&n(5,i=(h=u)===null||h===void 0||(d=h.doc)===null||d===void 0?void 0:d.lineAt(r)),32&e.$$.dirty&&n(0,o=i?i.number:void 0),48&e.$$.dirty&&n(1,a=i?r-i.from+1:void 0),8&e.$$.dirty&&n(2,s=(v=u)===null||v===void 0||(p=v.selection)===null||p===void 0||(m=p.ranges)===null||m===void 0?void 0:m.reduce(function(g,y){return g+y.to-y.from},0))},[o,a,s,u,r,i]}var XX=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,ZX,YX,Sr,{editorState:3},QX),i}return tt(n)}(),jy=F1.define([{tag:Xt.propertyName,color:"var(--jse-key-color)"},{tag:Xt.number,color:"var(--jse-value-color-number)"},{tag:Xt.bool,color:"var(--jse-value-color-boolean)"},{tag:Xt.string,color:"var(--jse-value-color-string)"},{tag:Xt.keyword,color:"var(--jse-value-color-null)"}]),ttt=ZP(jy),ett=jy.style;function Sy(e){var t=e.selection.main.head;return e.doc.lineAt(t)}function UT(e,t){var n=0;t:for(var r=0;r<e.length;r++)switch(e[r]){case" ":n+=1;continue t;case" ":n+=t-n%t;continue t;case"\r":continue t;default:break t}return n}jy.style=function(e){return ett(e||[])};var bv=Se.define({combine:function(e){return Ui(e,{highlightActiveBlock:!0,hideFirstIndent:!1})}}),ntt=function(){function e(t,n,r){X(this,e),this.lines=t,this.state=n,this.map=new Map,this.unitWidth=r;var i,o=at(this.lines);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.add(a)}}catch(s){o.e(s)}finally{o.f()}this.state.facet(bv).highlightActiveBlock&&this.findAndSetActiveLines()}return tt(e,[{key:"has",value:function(t){return this.map.has(typeof t=="number"?t:t.number)}},{key:"get",value:function(t){var n=this.map.get(typeof t=="number"?t:t.number);if(!n)throw new Error("Line not found in indentation map");return n}},{key:"set",value:function(t,n,r){var i=!t.text.trim().length,o={line:t,col:n,level:r,empty:i};return this.map.set(o.line.number,o),o}},{key:"add",value:function(t){if(this.has(t))return this.get(t);if(!t.length||!t.text.trim().length){if(t.number===1)return this.set(t,0,0);if(t.number===this.state.doc.lines){var n=this.closestNonEmpty(t,-1);return this.set(t,0,n.level)}var r=this.closestNonEmpty(t,-1),i=this.closestNonEmpty(t,1);return r.level>=i.level?this.set(t,0,r.level):r.empty&&r.level===0&&i.level!==0?this.set(t,0,0):i.level>r.level?this.set(t,0,r.level+1):this.set(t,0,i.level)}var o=UT(t.text,this.state.tabSize),a=Math.floor(o/this.unitWidth);return this.set(t,o,a)}},{key:"closestNonEmpty",value:function(t,n){for(var r=t.number+n;n===-1?r>=1:r<=this.state.doc.lines;){if(this.has(r)){var i=this.get(r);if(!i.empty)return i}var o=this.state.doc.line(r);if(o.text.trim().length){var a=UT(o.text,this.state.tabSize),s=Math.floor(a/this.unitWidth);return this.set(o,a,s)}r+=n}var u=this.state.doc.line(n===-1?1:this.state.doc.lines);return this.set(u,0,0)}},{key:"findAndSetActiveLines",value:function(){var t=Sy(this.state);if(this.has(t)){var n=this.get(t);if(this.has(n.line.number+1)){var r=this.get(n.line.number+1);r.level>n.level&&(n=r)}if(this.has(n.line.number-1)){var i=this.get(n.line.number-1);i.level>n.level&&(n=i)}if(n.level!==0){var o,a;for(n.active=n.level,o=n.line.number;o>1;o--)if(this.has(o-1)){var s=this.get(o-1);if(s.level<n.level)break;s.active=n.level}for(a=n.line.number;a<this.state.doc.lines;a++)if(this.has(a+1)){var u=this.get(a+1);if(u.level<n.level)break;u.active=n.level}}}}}]),e}(),JT="1px",rtt=we.baseTheme({"&light":{"--indent-marker-bg-color":"#F0F1F2","--indent-marker-active-bg-color":"#E4E5E6"},"&dark":{"--indent-marker-bg-color":"#2B3245","--indent-marker-active-bg-color":"#3C445C"},".cm-line":{position:"relative"},".cm-indent-markers::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"var(--indent-markers)",pointerEvents:"none",zIndex:"-1"}});function wv(e,t,n,r){var i="repeating-linear-gradient(to right, var(".concat(e,") 0 ").concat(JT,", transparent ").concat(JT," ").concat(t,"ch)");return"".concat(i," ").concat(n*t,".5ch/calc(").concat(t*r,"ch - 1px) no-repeat")}function itt(e,t,n){var r=e.level,i=e.active;if(n&&r===0)return[];var o=n?1:0,a=[];if(i!==void 0){var s=i-o-1;s>0&&a.push(wv("--indent-marker-bg-color",t,o,s)),a.push(wv("--indent-marker-active-bg-color",t,i-1,1)),i!==r&&a.push(wv("--indent-marker-bg-color",t,i,r-i))}else a.push(wv("--indent-marker-bg-color",t,o,r-o));return a.join(",")}var ott=function(){function e(t){X(this,e),this.view=t,this.unitWidth=jc(t.state),this.currentLineNumber=Sy(t.state).number,this.generate(t.state)}return tt(e,[{key:"update",value:function(t){var n=jc(t.state),r=n!==this.unitWidth;r&&(this.unitWidth=n);var i=Sy(t.state).number,o=i!==this.currentLineNumber;this.currentLineNumber=i;var a=t.state.facet(bv).highlightActiveBlock&&o;(t.docChanged||t.viewportChanged||r||a)&&this.generate(t.state)}},{key:"generate",value:function(t){var n,r=new Ks,i=function(f){var h,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.state,v=new Set,p=at(f.visibleRanges);try{for(p.s();!(h=p.n()).done;)for(var m=h.value,g=m.from,y=m.to,b=g;b<=y;){var w=d.doc.lineAt(b);v.has(w)||v.add(w),b=w.to+1}}catch(j){p.e(j)}finally{p.f()}return v}(this.view,t),o=new ntt(i,t,this.unitWidth),a=t.facet(bv).hideFirstIndent,s=at(i);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=o.get(u.number);if(c!=null&&c.level){var l=itt(c,this.unitWidth,a);r.add(u.from,u.from,Te.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(l)}}))}}}catch(f){s.e(f)}finally{s.f()}this.decorations=r.finish()}}]),e}();function att(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return[bv.of(e),rtt,zr.fromClass(ott,{decorations:function(t){return t.decorations}})]}function stt(e){Ae(e,"svelte-10sadri",'.jse-text-mode.svelte-10sadri.svelte-10sadri{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-10sadri.svelte-10sadri{border-top:var(--jse-main-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-10sadri .jse-contents.jse-hidden.svelte-10sadri{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-activeLine,.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-10sadri .jse-contents.svelte-10sadri .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-10sadri .jse-contents.svelte-10sadri .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-10sadri .jse-contents .jse-loading-space.svelte-10sadri{flex:1}.jse-text-mode.svelte-10sadri .jse-contents .jse-loading.svelte-10sadri{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-10sadri .jse-contents.jse-preview.svelte-10sadri{flex:1;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function Cy(e){var t=e.slice(),n=t[11].length===0;return t[93]=n,t}function KT(e){var t,n;return t=new WG({props:{readOnly:e[1],onFormat:e[17],onCompact:e[18],onSort:e[19],onTransform:e[20],onToggleSearch:e[21],onUndo:e[22],onRedo:e[23],canFormat:!e[93],canCompact:!e[93],canSort:!e[93],canTransform:!e[93],canUndo:e[12],canRedo:e[13],onRenderMenu:e[4]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};2&i[0]&&(o.readOnly=r[1]),2048&i[0]&&(o.canFormat=!r[93]),2048&i[0]&&(o.canCompact=!r[93]),2048&i[0]&&(o.canSort=!r[93]),2048&i[0]&&(o.canTransform=!r[93]),4096&i[0]&&(o.canUndo=r[12]),8192&i[0]&&(o.canRedo=r[13]),16&i[0]&&(o.onRenderMenu=r[4]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function utt(e){var t;return{c:function(){(t=G("div")).innerHTML=`<div class="jse-loading-space svelte-10sadri"></div>
|
|
<div class="jse-loading svelte-10sadri">loading...</div>`,C(t,"class","jse-contents svelte-10sadri")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function ctt(e){var t,n,r,i,o,a=e[92]&>(e),s=!e[92]&&QT(e);return{c:function(){t=G("div"),n=vt(),a&&a.c(),r=vt(),s&&s.c(),i=vn(),C(t,"class","jse-contents svelte-10sadri"),At(t,"jse-hidden",e[92])},m:function(u,c){ot(u,t,c),e[50](t),ot(u,n,c),a&&a.m(u,c),ot(u,r,c),s&&s.m(u,c),ot(u,i,c),o=!0},p:function(u,c){(!o||268438016&c[0])&&At(t,"jse-hidden",u[92]),u[92]?a?(a.p(u,c),2560&c[0]&&T(a,1)):((a=GT(u)).c(),T(a,1),a.m(r.parentNode,r)):a&&(Dt(),z(a,1,1,function(){a=null}),Lt()),u[92]?s&&(Dt(),z(s,1,1,function(){s=null}),Lt()):s?(s.p(u,c),2560&c[0]&&T(s,1)):((s=QT(u)).c(),T(s,1),s.m(i.parentNode,i))},i:function(u){o||(T(a),T(s),o=!0)},o:function(u){z(a),z(s),o=!1},d:function(u){u&&it(t),e[50](null),u&&it(n),a&&a.d(u),u&&it(r),s&&s.d(u),u&&it(i)}}}function GT(e){var t,n,r,i,o,a=Uo(e[11]||"",Sf)+"";return t=new po({props:{icon:Fs,type:"error",message:"The JSON document is larger than ".concat(Xh(ap,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(Xh(e[11].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:e[24]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:e[25]},{text:"Cancel",title:"Cancel opening this large document.",onClick:e[26]}],onClose:e[5]}}),{c:function(){jt(t.$$.fragment),n=vt(),r=G("div"),i=Jt(a),C(r,"class","jse-contents jse-preview svelte-10sadri")},m:function(s,u){xt(t,s,u),ot(s,n,u),ot(s,r,u),F(r,i),o=!0},p:function(s,u){var c={};2048&u[0]&&(c.message="The JSON document is larger than ".concat(Xh(ap,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(Xh(s[11].length,1024),".")),t.$set(c),(!o||2048&u[0])&&a!==(a=Uo(s[11]||"",Sf)+"")&&be(i,a)},i:function(s){o||(T(t.$$.fragment,s),o=!0)},o:function(s){z(t.$$.fragment,s),o=!1},d:function(s){kt(t,s),s&&it(n),s&&it(r)}}}function QT(e){var t,n,r,i,o,a=!e[14]&&e[0]&&z6(e[11]),s=e[3]&&YT(e),u=e[14]&&ZT(e),c=a&&XT(e);return i=new a0({props:{validationErrors:e[10],selectError:e[27]}}),{c:function(){s&&s.c(),t=vt(),u&&u.c(),n=vt(),c&&c.c(),r=vt(),jt(i.$$.fragment)},m:function(l,f){s&&s.m(l,f),ot(l,t,f),u&&u.m(l,f),ot(l,n,f),c&&c.m(l,f),ot(l,r,f),xt(i,l,f),o=!0},p:function(l,f){l[3]?s?(s.p(l,f),8&f[0]&&T(s,1)):((s=YT(l)).c(),T(s,1),s.m(t.parentNode,t)):s&&(Dt(),z(s,1,1,function(){s=null}),Lt()),l[14]?u?(u.p(l,f),16384&f[0]&&T(u,1)):((u=ZT(l)).c(),T(u,1),u.m(n.parentNode,n)):u&&(Dt(),z(u,1,1,function(){u=null}),Lt()),18433&f[0]&&(a=!l[14]&&l[0]&&z6(l[11])),a?c?(c.p(l,f),18433&f[0]&&T(c,1)):((c=XT(l)).c(),T(c,1),c.m(r.parentNode,r)):c&&(Dt(),z(c,1,1,function(){c=null}),Lt());var h={};1024&f[0]&&(h.validationErrors=l[10]),i.$set(h)},i:function(l){o||(T(s),T(u),T(c),T(i.$$.fragment,l),o=!0)},o:function(l){z(s),z(u),z(c),z(i.$$.fragment,l),o=!1},d:function(l){s&&s.d(l),l&&it(t),u&&u.d(l),l&&it(n),c&&c.d(l),l&&it(r),kt(i,l)}}}function YT(e){var t,n;return t=new XX({props:{editorState:e[8]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};256&i[0]&&(o.editorState=r[8]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function ZT(e){var t,n;return t=new po({props:{type:"error",icon:Fs,message:e[14].message,actions:e[15],onClick:e[29],onClose:e[5]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};16384&i[0]&&(o.message=r[14].message),32768&i[0]&&(o.actions=r[15]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function XT(e){var t,n;return t=new po({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:d0,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:e[17]},{icon:Zu,text:"No thanks",title:"Close this message",onClick:e[51]}],onClose:e[5]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i[0]&&(o.actions=[{icon:d0,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:r[17]},{icon:Zu,text:"No thanks",title:"Close this message",onClick:r[51]}]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function ltt(e){var t,n,r,i,o,a=e[2]&&KT(Cy(e)),s=[ctt,utt],u=[];function c(l,f){return f===0?function(h){var d=h.slice(),v=d[28](d[11],d[9]);return d[92]=v,d}(l):l}return r=function(l,f){return l[16]?1:0}(e),i=u[r]=s[r](c(e,r)),{c:function(){t=G("div"),a&&a.c(),n=vt(),i.c(),C(t,"class","jse-text-mode svelte-10sadri"),At(t,"no-main-menu",!e[2])},m:function(l,f){ot(l,t,f),a&&a.m(t,null),F(t,n),u[r].m(t,null),e[52](t),o=!0},p:function(l,f){l[2]?a?(a.p(Cy(l),f),4&f[0]&&T(a,1)):((a=KT(Cy(l))).c(),T(a,1),a.m(t,n)):a&&(Dt(),z(a,1,1,function(){a=null}),Lt()),i.p(c(l,r),f),(!o||4&f[0])&&At(t,"no-main-menu",!l[2])},i:function(l){o||(T(a),T(i),o=!0)},o:function(l){z(a),z(i),o=!1},d:function(l){l&&it(t),a&&a.d(),u[r].d(),e[52](null)}}}function tR(e){return{from:e.from||0,to:e.to||0,message:e.message||"",actions:e.actions,severity:e.severity}}function ftt(e,t,n){var r,i,o,a,s,u,c=t.readOnly,l=t.mainMenuBar,f=t.statusBar,h=t.askToFormat,d=t.externalContent,v=t.indentation,p=t.tabSize,m=t.escapeUnicodeCharacters,g=t.parser,y=t.validator,b=t.validationParser,w=t.onChange,j=t.onChangeMode,x=t.onError,R=t.onFocus,M=t.onBlur,E=t.onRenderMenu,N=t.onSortModal,A=t.onTransformModal,L=Dr("jsoneditor:TextMode"),W={key:"Mod-i",run:Bt,shift:K,preventDefault:!0},O=typeof window=="undefined";L("isSSR:",O);var I=!1,q=[],P=new Us,_=new Us,S=new Us,$=new Us,D=new Us,B=d,k=Ch(B,v,g),H=m;Ti(Ee(Ft().mark(function bt(){return Ft().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!O){ie.next=2;break}return ie.abrupt("return");case 2:try{a=ft({target:o,initialText:Qe(k,I)?"":r.escapeValue(k),readOnly:c,indentation:v})}catch(Le){console.error(Le)}case 3:case"end":return ie.stop()}},bt)}))),xi(function(){a&&(L("Destroy CodeMirror editor"),a.destroy())});var U=!1,st=!1,ut=qa(),gt=qa();function St(){a&&(L("focus"),a.focus())}var Pt=!1;function pt(bt){L("patch",bt);var ie=g.parse(k),Le=so(ie,bt),yt=j3(ie,bt);return zt({text:g.stringify(Le,null,v)}),{json:Le,previousJson:ie,undo:yt,redo:bt}}function Bt(){if(L("format"),c)return!1;try{var bt=g.parse(k);return zt({text:g.stringify(bt,null,v)}),n(0,h=!0),!0}catch(ie){x(ie)}return!1}function K(){if(L("compact"),c)return!1;try{var bt=g.parse(k);return zt({text:g.stringify(bt)}),n(0,h=!1),!0}catch(ie){x(ie)}return!1}function $t(){if(L("repair"),!c)try{zt({text:Io(k)}),n(49,gn=lp),n(14,ln=null)}catch(bt){x(bt)}}function Kt(bt){var ie=bt.id,Le=bt.rootPath,yt=bt.onTransform,Zt=bt.onClose;try{var Gt=g.parse(k);Pt=!0,A({id:ie||gt,json:Gt,rootPath:Le||[],onTransform:function(fe){yt?yt({operations:fe,json:Gt,transformedJson:so(Gt,fe)}):(L("onTransform",fe),pt(fe))},onClose:function(){Pt=!1,St(),Zt&&Zt()}})}catch(fe){x(fe)}}function Ct(bt,ie){L("setSelection",{anchor:bt,head:ie}),a&&a.dispatch(a.state.update({selection:{anchor:bt,head:ie},scrollIntoView:!0}))}function V(bt,ie){if(ie.state.selection.ranges.length===1){var Le=ie.state.selection.ranges[0],yt=k.slice(Le.from,Le.to);if(yt==="{"||yt==="["){var Zt=Cf.parse(k),Gt=Object.keys(Zt.pointers).find(function(Nn){var tn;return((tn=Zt.pointers[Nn].value)===null||tn===void 0?void 0:tn.pos)===Le.from}),fe=Zt.pointers[Gt];Gt&&fe&&fe.value&&fe.valueEnd&&(L("pointer found, selecting inner contents of path:",Gt,fe),Ct(fe.value.pos+1,fe.valueEnd.pos-1))}}}function Q(){return function(bt){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return[tu.of({source:bt,config:ie}),MX,TT]}(ir,{delay:300})}function ft(bt){var ie=bt.target,Le=bt.initialText,yt=bt.readOnly,Zt=bt.indentation;L("Create CodeMirror editor",{readOnly:yt,indentation:Zt});var Gt=Hn.create({doc:Le,extensions:[Cd.of([FZ,W]),P.of(Q()),IX(),DX,ttt,att({hideFirstIndent:!0}),we.domEventHandlers({dblclick:V}),we.updateListener.of(function(fe){n(8,u=fe.state),fe.docChanged&&Bn()}),new qY(GX),KZ({top:!0}),_.of(Hn.readOnly.of(yt)),$.of(Hn.tabSize.of(p)),S.of(Ne(Zt)),D.of(we.theme({},{dark:wt()})),we.lineWrapping]});return a=new we({state:Gt,parent:ie})}function wt(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function _t(bt){var ie=bt.path,Le=bt.message,yt=function(Zt,Gt){try{var fe=Cf.parse(Zt),Nn=Qt(Gt),tn=fe.pointers[Nn];if(tn)return{path:Gt,line:tn.key?tn.key.line:tn.value?tn.value.line:0,column:tn.key?tn.key.column:tn.value?tn.value.column:0,from:tn.key?tn.key.pos:tn.value?tn.value.pos:0,to:tn.keyEnd?tn.keyEnd.pos:tn.valueEnd?tn.valueEnd.pos:0}}catch(Tr){console.error(Tr)}return null}(r.escapeValue(k),ie);return{path:ie,line:yt.line,column:yt.column,from:yt.from,to:yt.to,message:Le,severity:No.warning,actions:[]}}function Ut(bt,ie){var Le=bt.line,yt=bt.column,Zt=bt.position,Gt=bt.message;return{path:[],line:Le,column:yt,from:Zt,to:Zt,severity:No.error,message:Gt,actions:ie&&!c?[{name:"Auto repair",apply:function(){return $t()}}]:null}}function zt(bt){var ie=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Le=Ch(bt,v,g),yt=!rn(bt,B),Zt=B;B=bt,n(11,k=Le),L("setCodeMirrorContent",{isChanged:yt,forceUpdate:ie}),a&&(yt||ie)&&(Qe(k,I)||a.dispatch({changes:{from:0,to:a.state.doc.length,insert:r.escapeValue(k)}}),Xe(),yt&&_n(B,Zt))}function $e(){return($e=Ee(Ft().mark(function bt(){return Ft().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return L("refresh"),ie.next=3,De();case 3:case"end":return ie.stop()}},bt)}))).apply(this,arguments)}function qe(){if(a){var bt=a?r.unescapeValue(a.state.doc.toString()):"",ie=bt!==k;if(L("onChangeCodeMirrorValue",{isChanged:ie}),ie){var Le=B;n(11,k=bt),B={text:k},Xe(),_n(B,Le)}}}function De(){return re.apply(this,arguments)}function re(){return(re=Ee(Ft().mark(function bt(){var ie;return Ft().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.next=2,pr();case 2:a&&(ie=wt(),L("updateTheme",{dark:ie}),a.dispatch({effects:[D.reconfigure(we.theme({},{dark:ie}))]}));case 3:case"end":return Le.stop()}},bt)}))).apply(this,arguments)}function Ne(bt){return Vd.of(typeof bt=="number"?" ".repeat(bt):bt)}function Xe(){n(12,U=OZ(a.state)>0),n(13,st=MZ(a.state)>0),L({canUndo:U,canRedo:st})}xi(function(){ue()}),o0({onMount:Ti,onDestroy:xi,getWindow:function(){return Bu(s)},hasFocus:function(){return Pt&&document.hasFocus()||_h(s)},onFocus:R,onBlur:function(){ue(),M()}});var Bn=Eu(qe,300);function ue(){Bn.flush()}function _n(bt,ie){w&&w(bt,ie,{contentErrors:or(),patchResult:null})}function Qe(bt,ie){return!!bt&&bt.length>ap&&!ie}var gn=lp,ln=null;function ir(){if(Qe(k,I))return[];var bt=or();return iM(bt)?[tR(Ut(bt.parseError,bt.isRepairable))]:MU(bt)?bt.validationErrors.map(_t).map(tR):[]}function or(){L("validate:start"),ue();var bt=ar(r.escapeValue(k),y,g,b);return iM(bt)?(n(49,gn=bt.isRepairable?p3:"invalid"),n(14,ln=bt.parseError),n(10,q=[])):(n(49,gn=lp),n(14,ln=null),n(10,q=(bt==null?void 0:bt.validationErrors)||[])),L("validate:end"),bt}var ar=Ol(dU);function zn(){ln&&function(bt){L("select parse error",bt);var ie=Ut(bt,!1);Ct(ie.from,ie.to),St()}(ln)}var an={icon:Qq,text:"Show me",title:"Move to the parse error location",onClick:zn};return e.$$set=function(bt){"readOnly"in bt&&n(1,c=bt.readOnly),"mainMenuBar"in bt&&n(2,l=bt.mainMenuBar),"statusBar"in bt&&n(3,f=bt.statusBar),"askToFormat"in bt&&n(0,h=bt.askToFormat),"externalContent"in bt&&n(30,d=bt.externalContent),"indentation"in bt&&n(31,v=bt.indentation),"tabSize"in bt&&n(32,p=bt.tabSize),"escapeUnicodeCharacters"in bt&&n(33,m=bt.escapeUnicodeCharacters),"parser"in bt&&n(34,g=bt.parser),"validator"in bt&&n(35,y=bt.validator),"validationParser"in bt&&n(36,b=bt.validationParser),"onChange"in bt&&n(37,w=bt.onChange),"onChangeMode"in bt&&n(38,j=bt.onChangeMode),"onError"in bt&&n(39,x=bt.onError),"onFocus"in bt&&n(40,R=bt.onFocus),"onBlur"in bt&&n(41,M=bt.onBlur),"onRenderMenu"in bt&&n(4,E=bt.onRenderMenu),"onSortModal"in bt&&n(42,N=bt.onSortModal),"onTransformModal"in bt&&n(43,A=bt.onTransformModal)},e.$$.update=function(){4&e.$$.dirty[1]&&(r=$g({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),1073741824&e.$$.dirty[0]&&zt(d),16&e.$$.dirty[1]&&function(bt){L("updateLinter",bt),a&&a.dispatch({effects:P.reconfigure(Q())})}(y),1&e.$$.dirty[1]&&function(bt){a&&(L("updateIndentation",bt),a.dispatch({effects:S.reconfigure(Ne(bt))}))}(v),2&e.$$.dirty[1]&&function(bt){a&&(L("updateTabSize",bt),a.dispatch({effects:$.reconfigure(Hn.tabSize.of(bt))}))}(p),2&e.$$.dirty[0]&&function(bt){a&&(L("updateReadOnly",bt),a.dispatch({effects:[_.reconfigure(Hn.readOnly.of(bt))]}))}(c),131076&e.$$.dirty[1]&&H!==m&&(n(48,H=m),L("forceUpdateText",{escapeUnicodeCharacters:m}),a&&a.dispatch({changes:{from:0,to:a.state.doc.length,insert:r.escapeValue(k)}})),2&e.$$.dirty[0]|262144&e.$$.dirty[1]&&n(15,i=gn!==p3||c?[an]:[{icon:Ih,text:"Auto repair",title:"Automatically repair JSON",onClick:$t},an])},[h,c,l,f,E,St,o,s,u,I,q,k,U,st,ln,i,O,Bt,K,function(){var bt;if(!c)try{var ie=g.parse(k);Pt=!0,N({id:ut,json:ie,rootPath:[],onSort:(bt=Ee(Ft().mark(function Le(yt){var Zt;return Ft().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:Zt=yt.operations,L("onSort",Zt),pt(Zt);case 3:case"end":return Gt.stop()}},Le)})),function(Le){return bt.apply(this,arguments)}),onClose:function(){Pt=!1,St()}})}catch(Le){x(Le)}},function(){c||Kt({rootPath:[]})},function(){a&&(o&&o.querySelector(".cm-search")?fy(a):ly(a))},function(){c||a&&(Z1(a),St())},function(){c||a&&(Kd(a),St())},function(){n(9,I=!0),zt(d,!0)},function(){j(Lr.tree)},function(){qe()},function(bt){L("select validation error",bt);var ie=_t(bt);Ct(ie.from,ie.to),St()},Qe,zn,d,v,p,m,g,y,b,w,j,x,R,M,N,A,pt,Kt,function(){return $e.apply(this,arguments)},or,H,gn,function(bt){He[bt?"unshift":"push"](function(){n(6,o=bt)})},function(){return n(0,h=!1)},function(bt){He[bt?"unshift":"push"](function(){n(7,s=bt)})}]}var htt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,ftt,ltt,Be,{readOnly:1,mainMenuBar:2,statusBar:3,askToFormat:0,externalContent:30,indentation:31,tabSize:32,escapeUnicodeCharacters:33,parser:34,validator:35,validationParser:36,onChange:37,onChangeMode:38,onError:39,onFocus:40,onBlur:41,onRenderMenu:4,onSortModal:42,onTransformModal:43,focus:5,patch:44,openTransformModal:45,refresh:46,validate:47},stt,[-1,-1,-1,-1]),i}return tt(n,[{key:"focus",get:function(){return this.$$.ctx[5]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),n}();function dtt(e){var t,n;return t=new Gh({props:{items:e[0]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&ke(i,1)[0]&&(o.items=r[0]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function vtt(e,t,n){var r,i,o=t.json,a=t.readOnly,s=t.historyState,u=t.onSort,c=t.onTransform,l=t.onContextMenu,f=t.onUndo,h=t.onRedo,d=t.onRenderMenu;return e.$$set=function(v){"json"in v&&n(1,o=v.json),"readOnly"in v&&n(2,a=v.readOnly),"historyState"in v&&n(3,s=v.historyState),"onSort"in v&&n(4,u=v.onSort),"onTransform"in v&&n(5,c=v.onTransform),"onContextMenu"in v&&n(6,l=v.onContextMenu),"onUndo"in v&&n(7,f=v.onUndo),"onRedo"in v&&n(8,h=v.onRedo),"onRenderMenu"in v&&n(9,d=v.onRenderMenu)},e.$$.update=function(){510&e.$$.dirty&&n(10,r=a?[{type:"space"}]:[{type:"button",icon:Lh,title:"Sort",className:"jse-sort",onClick:u,disabled:a||o===void 0},{type:"button",icon:Nh,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:a||o===void 0},{type:"button",icon:U_,title:up,className:"jse-contextmenu",onClick:l},{type:"separator"},{type:"button",icon:Kg,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:f,disabled:!s.canUndo},{type:"button",icon:Jg,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!s.canRedo},{type:"space"}]),1536&e.$$.dirty&&n(0,i=d(r)||r)},[i,o,a,s,u,c,l,f,h,d,r]}var ptt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,vtt,dtt,Be,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),i}return tt(n)}();function eR(e,t,n){var r=e.slice();return r[9]=t[n],r}function nR(e){var t,n,r,i=[e[9].props],o=e[9].component;function a(s){for(var u={},c=0;c<i.length;c+=1)u=hi(u,i[c]);return{props:u}}return o&&(t=Ro(o,a())),{c:function(){t&&jt(t.$$.fragment),n=vn()},m:function(s,u){t&&xt(t,s,u),ot(s,n,u),r=!0},p:function(s,u){var c=1&u?ha(i,[zc(s[9].props)]):{};if(1&u&&o!==(o=s[9].component)){if(t){Dt();var l=t;z(l.$$.fragment,1,0,function(){kt(l,1)}),Lt()}o?(jt((t=Ro(o,a())).$$.fragment),T(t.$$.fragment,1),xt(t,n.parentNode,n)):t=null}else o&&t.$set(c)},i:function(s){r||(t&&T(t.$$.fragment,s),r=!0)},o:function(s){t&&z(t.$$.fragment,s),r=!1},d:function(s){s&&it(n),t&&kt(t,s)}}}function mtt(e){for(var t,n,r=e[0],i=[],o=0;o<r.length;o+=1)i[o]=nR(eR(e,r,o));var a=function(s){return z(i[s],1,1,function(){i[s]=null})};return{c:function(){for(var s=0;s<i.length;s+=1)i[s].c();t=vn()},m:function(s,u){for(var c=0;c<i.length;c+=1)i[c]&&i[c].m(s,u);ot(s,t,u),n=!0},p:function(s,u){var c=ke(u,1)[0];if(1&c){var l;for(r=s[0],l=0;l<r.length;l+=1){var f=eR(s,r,l);i[l]?(i[l].p(f,c),T(i[l],1)):(i[l]=nR(f),i[l].c(),T(i[l],1),i[l].m(t.parentNode,t))}for(Dt(),l=r.length;l<i.length;l+=1)a(l);Lt()}},i:function(s){if(!n){for(var u=0;u<r.length;u+=1)T(i[u]);n=!0}},o:function(s){i=i.filter(Boolean);for(var u=0;u<i.length;u+=1)z(i[u]);n=!1},d:function(s){ur(i,s),s&&it(t)}}}function gtt(e,t,n){var r,i,o=t.path,a=t.value,s=t.context,u=t.enforceString,c=t.selection,l=t.searchResultItems;function f(h,d){return s.onPatch(function(v,p){return v.flatMap(function(m){if(dp(m)){var g=ao(m.path);if(g.length>0){for(var y=[m],b=Ze(g);b.length>0&&!Ni(p,b);)y.unshift({op:"add",path:Qt(b),value:{}}),b=Ze(b);return y}}return m})}(h,s.getJson()),d)}return e.$$set=function(h){"path"in h&&n(1,o=h.path),"value"in h&&n(2,a=h.value),"context"in h&&n(3,s=h.context),"enforceString"in h&&n(4,u=h.enforceString),"selection"in h&&n(5,c=h.selection),"searchResultItems"in h&&n(6,l=h.searchResultItems)},e.$$.update=function(){40&e.$$.dirty&&n(7,r=!s.readOnly&&Ge(c)&&Ka(c)),254&e.$$.dirty&&n(0,i=s.onRenderValue({path:o,value:a,readOnly:s.readOnly,enforceString:u,isEditing:r,parser:s.parser,normalization:s.normalization,selection:c,searchResultItems:l,onPatch:f,onPasteJson:s.onPasteJson,onSelect:s.onSelect,onFind:s.onFind,findNextInside:s.findNextInside,focus:s.focus}))},[i,o,a,s,u,c,l,r]}var ytt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,gtt,mtt,Be,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),i}return tt(n)}();function btt(e){Ae(e,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function wtt(e){var t,n,r,i,o=Uo(e[2].stringify(e[1]),50)+"";return{c:function(){t=G("button"),n=Jt(o),C(t,"type","button"),C(t,"class","jse-inline-value svelte-l28mqd"),At(t,"jse-selected",e[3])},m:function(a,s){ot(a,t,s),F(t,n),r||(i=Nt(t,"dblclick",e[6]),r=!0)},p:function(a,s){var u=ke(s,1)[0];6&u&&o!==(o=Uo(a[2].stringify(a[1]),50)+"")&&be(n,o),8&u&&At(t,"jse-selected",a[3])},i:It,o:It,d:function(a){a&&it(t),r=!1,i()}}}function xtt(e,t,n){var r,i=t.path,o=t.value,a=t.parser,s=t.isSelected,u=t.onEdit;return e.$$set=function(c){"path"in c&&n(0,i=c.path),"value"in c&&n(1,o=c.value),"parser"in c&&n(2,a=c.parser),"isSelected"in c&&n(3,s=c.isSelected),"onEdit"in c&&n(4,u=c.onEdit)},e.$$.update=function(){2&e.$$.dirty&&n(5,r=An(o)?o.length:Object.keys(o).length),e.$$.dirty},[i,o,a,s,u,r,function(){return u(i)}]}var ktt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,xtt,wtt,Be,{path:0,value:1,parser:2,isSelected:3,onEdit:4},btt),i}return tt(n)}();function jtt(e){Ae(e,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function rR(e){var t,n,r,i;return n=new on({props:{data:e[1]===Ri.asc?qi:H_}}),{c:function(){t=G("span"),jt(n.$$.fragment),C(t,"class","jse-column-sort-icon svelte-h4fort"),C(t,"title",r="Currently sorted in ".concat(e[2]," order"))},m:function(o,a){ot(o,t,a),xt(n,t,null),i=!0},p:function(o,a){var s={};2&a&&(s.data=o[1]===Ri.asc?qi:H_),n.$set(s),(!i||4&a&&r!==(r="Currently sorted in ".concat(o[2]," order")))&&C(t,"title",r)},i:function(o){i||(T(n.$$.fragment,o),i=!0)},o:function(o){z(n.$$.fragment,o),i=!1},d:function(o){o&&it(t),kt(n)}}}function Stt(e){var t,n,r,i,o,a,s,u,c=Uo(e[3],50)+"",l=e[1]!==void 0&&rR(e);return{c:function(){t=G("button"),n=G("span"),r=Jt(c),i=vt(),l&&l.c(),C(n,"class","jse-column-name"),C(t,"type","button"),C(t,"class","jse-column-header svelte-h4fort"),C(t,"title",o=e[0]?e[3]:e[3]+" (Click to sort the data by this column)"),At(t,"jse-readonly",e[0])},m:function(f,h){ot(f,t,h),F(t,n),F(n,r),F(t,i),l&&l.m(t,null),a=!0,s||(u=Nt(t,"click",e[4]),s=!0)},p:function(f,h){var d=ke(h,1)[0];(!a||8&d)&&c!==(c=Uo(f[3],50)+"")&&be(r,c),f[1]!==void 0?l?(l.p(f,d),2&d&&T(l,1)):((l=rR(f)).c(),T(l,1),l.m(t,null)):l&&(Dt(),z(l,1,1,function(){l=null}),Lt()),(!a||9&d&&o!==(o=f[0]?f[3]:f[3]+" (Click to sort the data by this column)"))&&C(t,"title",o),(!a||1&d)&&At(t,"jse-readonly",f[0])},i:function(f){a||(T(l),a=!0)},o:function(f){z(l),a=!1},d:function(f){f&&it(t),l&&l.d(),s=!1,u()}}}function Ctt(e,t,n){var r,i,o,a=t.path,s=t.sortedColumn,u=t.readOnly,c=t.onSort;return e.$$set=function(l){"path"in l&&n(5,a=l.path),"sortedColumn"in l&&n(6,s=l.sortedColumn),"readOnly"in l&&n(0,u=l.readOnly),"onSort"in l&&n(7,c=l.onSort)},e.$$.update=function(){var l;32&e.$$.dirty&&n(3,r=Ue(a)?"values":pi(a)),96&e.$$.dirty&&n(1,i=rn(a,(l=s)===null||l===void 0?void 0:l.path)?s.sortDirection:void 0),2&e.$$.dirty&&n(2,o=sI[i])},[u,i,o,r,function(){u||c({path:a,sortDirection:i===Ri.asc?Ri.desc:Ri.asc})},a,s,c]}var xv,kv,$tt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Ctt,Stt,Be,{path:5,sortedColumn:6,readOnly:0,onSort:7},jtt),i}return tt(n)}();function iR(e,t){return xv||(kv=new WeakMap,xv=new ResizeObserver(function(n){var r,i=at(n);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=kv.get(o.target);a&&a(o.target)}}catch(s){i.e(s)}finally{i.f()}})),kv.set(e,t),xv.observe(e),{destroy:function(){kv.delete(e),xv.unobserve(e)}}}function _tt(e){var t,n;return t=new OM({props:{items:e[1],tip:e[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};2&i[0]&&(o.items=r[1]),1&i[0]&&(o.tip=r[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function Ott(e,t,n){var r,i,o,a,s,u,c,l,f,h,d,v=t.json,p=t.documentState,m=t.parser,g=t.showTip,y=t.onCloseContextMenu,b=t.onEditValue,w=t.onEditRow,j=t.onToggleEnforceString,x=t.onCut,R=t.onCopy,M=t.onPaste,E=t.onRemove,N=t.onDuplicateRow,A=t.onInsertBeforeRow,L=t.onInsertAfterRow,W=t.onRemoveRow;function O(){y(),b()}function I(){y(),w()}function q(){y(),j()}function P(){y(),x(!0)}function _(){y(),x(!1)}function S(){y(),R(!0)}function $(){y(),R(!1)}function D(){y(),M()}function B(){y(),E()}function k(){y(),N()}function H(){y(),A()}function U(){y(),L()}function st(){y(),W()}return e.$$set=function(ut){"json"in ut&&n(2,v=ut.json),"documentState"in ut&&n(3,p=ut.documentState),"parser"in ut&&n(4,m=ut.parser),"showTip"in ut&&n(0,g=ut.showTip),"onCloseContextMenu"in ut&&n(5,y=ut.onCloseContextMenu),"onEditValue"in ut&&n(6,b=ut.onEditValue),"onEditRow"in ut&&n(7,w=ut.onEditRow),"onToggleEnforceString"in ut&&n(8,j=ut.onToggleEnforceString),"onCut"in ut&&n(9,x=ut.onCut),"onCopy"in ut&&n(10,R=ut.onCopy),"onPaste"in ut&&n(11,M=ut.onPaste),"onRemove"in ut&&n(12,E=ut.onRemove),"onDuplicateRow"in ut&&n(13,N=ut.onDuplicateRow),"onInsertBeforeRow"in ut&&n(14,A=ut.onInsertBeforeRow),"onInsertAfterRow"in ut&&n(15,L=ut.onInsertAfterRow),"onRemoveRow"in ut&&n(16,W=ut.onRemoveRow)},e.$$.update=function(){8&e.$$.dirty[0]&&n(22,r=p.selection),4&e.$$.dirty[0]&&n(25,i=v!==void 0),4194304&e.$$.dirty[0]&&n(17,o=r!=null),4194304&e.$$.dirty[0]&&n(26,a=r!=null&&Ue(r.focusPath)),4194308&e.$$.dirty[0]&&n(23,s=v!==void 0&&r!=null?se(v,r.focusPath):void 0),37748736&e.$$.dirty[0]&&n(18,u=i&&(yn(r)||yr(r)||Ge(r))),e.$$.dirty[0],104857600&e.$$.dirty[0]&&i&&r!=null&&(yn(r)||Ge(r)),71303172&e.$$.dirty[0]&&v!==void 0&&r!=null&&yl(r)&&!a&&Array.isArray(se(v,Ze(r.focusPath))),37748736&e.$$.dirty[0]&&n(21,c=i&&r!=null&&yl(r)),10485760&e.$$.dirty[0]&&n(19,l=c&&!Jn(s)),262144&e.$$.dirty[0]&&n(24,f=u),e.$$.dirty[0],e.$$.dirty[0],29491200&e.$$.dirty[0]&&f&&Bs(r)&&In(s),29491200&e.$$.dirty[0]&&f&&Bs(r)&&Array.isArray(s),29491200&e.$$.dirty[0]&&f&&Bs(r)&&Jn(s),12582936&e.$$.dirty[0]&&n(20,h=r!=null&&ja(s,p.enforceStringMap,Qt(r.focusPath),m)),4063232&e.$$.dirty[0]&&n(1,d=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:O,icon:Qu,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:Qu,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:O,disabled:!c},{type:"button",icon:h?vl:pl,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:q,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:P,icon:Gu,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!u},width:"10em",items:[{type:"button",icon:Gu,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:P,disabled:!u},{type:"button",icon:Gu,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:_,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:S,icon:Ya,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!u},width:"12em",items:[{type:"button",icon:Ya,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:S,disabled:!u},{type:"button",icon:Ya,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:$,disabled:!u}]},{type:"button",onClick:D,icon:V_,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:B,icon:Ug,text:"Remove",title:"Remove selected contents (Delete)",disabled:!u}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:I,icon:Qu,text:"Edit row",title:"Edit the current row",disabled:!u},{type:"button",onClick:k,icon:G_,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:H,icon:Yu,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:U,icon:Yu,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:st,icon:Ug,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[g,d,v,p,m,y,b,w,j,x,R,M,E,N,A,L,W,o,u,l,h,c,r,s,f,i,a]}var Mtt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Ott,_tt,Be,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),i}return tt(n)}();function Ett(e){Ae(e,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function oR(e,t,n){var r=e.slice();r[12]=t[n];var i=se(r[0],r[12]).length;return r[13]=i,r}function Att(e){var t,n;return{c:function(){t=Jt(e[5]),n=Jt(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(r,i){ot(r,t,i),ot(r,n,i)},p:function(r,i){32&i&&be(t,r[5])},d:function(r){r&&it(t),r&&it(n)}}}function Ptt(e){var t;return{c:function(){t=Jt(`An object cannot be opened in table mode. You can open a nested array instead, or open the
|
|
document in tree mode.`)},m:function(n,r){ot(n,t,r)},p:It,d:function(n){n&&it(t)}}}function aR(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v=pi(e[12])+"",p=e[13]+"",m=e[13]!==1?"items":"item";function g(){return e[10](e[12])}return{c:function(){t=G("button"),n=Jt(e[6]),r=Jt(' "'),i=Jt(v),o=Jt(`"
|
|
`),a=G("span"),s=Jt("("),u=Jt(p),c=vt(),l=Jt(m),f=Jt(")"),C(a,"class","jse-nested-array-count svelte-1te5h1h"),C(t,"type","button"),C(t,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,b){ot(y,t,b),F(t,n),F(t,r),F(t,i),F(t,o),F(t,a),F(a,s),F(a,u),F(a,c),F(a,l),F(a,f),h||(d=Nt(t,"click",g),h=!0)},p:function(y,b){e=y,64&b&&be(n,e[6]),8&b&&v!==(v=pi(e[12])+"")&&be(i,v),9&b&&p!==(p=e[13]+"")&&be(u,p),9&b&&m!==(m=e[13]!==1?"items":"item")&&be(l,m)},d:function(y){y&&it(t),h=!1,d()}}}function Ttt(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g;function y(M,E){return M[4]?Ptt:Att}for(var b=y(e),w=b(e),j=e[3],x=[],R=0;R<j.length;R+=1)x[R]=aR(oR(e,j,R));return{c:function(){t=G("div"),n=G("div"),r=vt(),i=G("div"),o=G("div"),a=Jt(e[5]),s=vt(),u=G("div"),w.c(),c=vt();for(var M=0;M<x.length;M+=1)x[M].c();l=vt(),f=G("button"),h=Jt(e[6]),d=Jt(" in tree mode"),v=vt(),p=G("div"),C(n,"class","jse-space jse-before svelte-1te5h1h"),C(o,"class","jse-nested-arrays-title"),C(u,"class","jse-nested-arrays-info svelte-1te5h1h"),C(f,"type","button"),C(f,"class","jse-nested-array-action svelte-1te5h1h"),C(i,"class","jse-nested-arrays svelte-1te5h1h"),C(p,"class","jse-space jse-after svelte-1te5h1h"),C(t,"class","jse-table-mode-welcome svelte-1te5h1h")},m:function(M,E){ot(M,t,E),F(t,n),F(t,r),F(t,i),F(i,o),F(o,a),F(i,s),F(i,u),w.m(u,null),F(i,c);for(var N=0;N<x.length;N+=1)x[N]&&x[N].m(i,null);F(i,l),F(i,f),F(f,h),F(f,d),F(t,v),F(t,p),m||(g=Nt(f,"click",e[11]),m=!0)},p:function(M,E){var N=ke(E,1)[0];if(32&N&&be(a,M[5]),b===(b=y(M))&&w?w.p(M,N):(w.d(1),(w=b(M))&&(w.c(),w.m(u,null))),75&N){var A;for(j=M[3],A=0;A<j.length;A+=1){var L=oR(M,j,A);x[A]?x[A].p(L,N):(x[A]=aR(L),x[A].c(),x[A].m(i,l))}for(;A<x.length;A+=1)x[A].d(1);x.length=j.length}64&N&&be(h,M[6])},i:It,o:It,d:function(M){M&&it(t),w.d(),ur(x,M),m=!1,g()}}}function Rtt(e,t,n){var r,i,o,a,s=t.text,u=t.json,c=t.readOnly,l=t.parser,f=t.openJSONEditorModal,h=t.onChangeMode;return e.$$set=function(d){"text"in d&&n(7,s=d.text),"json"in d&&n(0,u=d.json),"readOnly"in d&&n(8,c=d.readOnly),"parser"in d&&n(9,l=d.parser),"openJSONEditorModal"in d&&n(1,f=d.openJSONEditorModal),"onChangeMode"in d&&n(2,h=d.onChangeMode)},e.$$.update=function(){256&e.$$.dirty&&n(6,r=c?"View":"Edit"),1&e.$$.dirty&&n(3,a=u?function(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,p=[];return function m(g,y){nr(g)&&y.length<v&&Object.keys(g).forEach(function(b){m(g[b],y.concat(b))}),An(g)&&p.push(y)}(d,[]),p}(u).slice(0,99).filter(function(d){return d.length>0}):[]),8&e.$$.dirty&&n(4,i=!Ue(a)),657&e.$$.dirty&&n(5,o=i?"Object with nested arrays":u!==void 0||s!==""&&s!==void 0?nr(u)?"An object":An(u)?"An empty array":"A ".concat(Np(u,l)):"An empty document")},[u,f,h,a,i,o,r,s,c,l,function(d){return f(d)},function(){return h(Lr.tree)}]}var Ntt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Rtt,Ttt,Be,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},Ett),i}return tt(n)}();function Itt(e){Ae(e,"svelte-py7l9h",".jse-column-header.svelte-py7l9h{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-py7l9h:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-py7l9h:not(.jse-column-header.jse-readonly){cursor:pointer}")}function Dtt(e){var t,n,r,i,o,a;return n=new on({props:{data:nH}}),{c:function(){t=G("button"),jt(n.$$.fragment),C(t,"type","button"),C(t,"class","jse-column-header svelte-py7l9h"),C(t,"title",r="The Columns are created by sampling ".concat(e[1]," items out of ").concat(e[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(s,u){ot(s,t,u),xt(n,t,null),i=!0,o||(a=Nt(t,"click",e[3]),o=!0)},p:function(s,u){var c=ke(u,1)[0];(!i||3&c&&r!==(r="The Columns are created by sampling ".concat(s[1]," items out of ").concat(s[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&C(t,"title",r)},i:function(s){i||(T(n.$$.fragment,s),i=!0)},o:function(s){z(n.$$.fragment,s),i=!1},d:function(s){s&&it(t),kt(n),o=!1,a()}}}function Ltt(e,t,n){var r=t.count,i=t.maxSampleCount,o=t.onRefresh;return e.$$set=function(a){"count"in a&&n(0,r=a.count),"maxSampleCount"in a&&n(1,i=a.maxSampleCount),"onRefresh"in a&&n(2,o=a.onRefresh)},[r,i,o,function(){return o()}]}var Btt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Ltt,Dtt,Be,{count:0,maxSampleCount:1,onRefresh:2},Itt),i}return tt(n)}();function ztt(e){Ae(e,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function sR(e,t,n){var r=e.slice();r[121]=t[n],r[125]=n;var i=r[23].startIndex+r[125];r[122]=i;var o=r[22].rows[r[122]];return r[123]=o,r}function uR(e,t,n){var r,i=e.slice();i[126]=t[n],i[132]=n;var o=[String(i[122])].concat(i[126]);i[127]=o;var a=se(i[121],i[126]);i[128]=a;var s=i[47](i[127],i[11].selection);i[129]=s;var u=(r=i[123])===null||r===void 0?void 0:r.columns[i[132]];return i[130]=u,i}function cR(e,t,n){var r=e.slice();return r[126]=t[n],r}function lR(e){var t,n;return t=new ptt({props:{json:e[8],readOnly:e[0],historyState:e[20],onSort:e[41],onTransform:e[42],onUndo:e[43],onRedo:e[44],onContextMenu:e[33],onRenderMenu:e[5]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};256&i[0]&&(o.json=r[8]),1&i[0]&&(o.readOnly=r[0]),1048576&i[0]&&(o.historyState=r[20]),32&i[0]&&(o.onRenderMenu=r[5]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function Ftt(e){var t;return{c:function(){(t=G("div")).innerHTML=`<div class="jse-loading-space svelte-hs49xj"></div>
|
|
<div class="jse-loading svelte-hs49xj">loading...</div>`,C(t,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(n,r){ot(n,t,r)},p:It,i:It,o:It,d:function(n){n&&it(t)}}}function Vtt(e){var t,n,r,i,o,a,s,u,c,l=[Htt,qtt,Wtt],f=[];function h(d,v){return d[25]?0:d[17]&&d[16]!==void 0&&d[16]!==""?1:2}return i=h(e),o=f[i]=l[i](e),{c:function(){t=G("label"),n=G("input"),r=vt(),o.c(),a=vn(),C(n,"type","text"),n.readOnly="readonly",C(n,"tabindex","-1"),C(n,"class","jse-hidden-input svelte-hs49xj"),C(t,"class","jse-hidden-input-label svelte-hs49xj")},m:function(d,v){ot(d,t,v),F(t,n),e[71](n),ot(d,r,v),f[i].m(d,v),ot(d,a,v),s=!0,u||(c=Nt(n,"paste",e[38]),u=!0)},p:function(d,v){var p=i;(i=h(d))===p?f[i].p(d,v):(Dt(),z(f[p],1,1,function(){f[p]=null}),Lt(),(o=f[i])?o.p(d,v):(o=f[i]=l[i](d)).c(),T(o,1),o.m(a.parentNode,a))},i:function(d){s||(T(o),s=!0)},o:function(d){z(o),s=!1},d:function(d){d&&it(t),e[71](null),d&&it(r),f[i].d(d),d&&it(a),u=!1,c()}}}function Wtt(e){var t,n;return t=new Ntt({props:{text:e[16],json:e[8],readOnly:e[0],parser:e[2],openJSONEditorModal:e[40],onChangeMode:e[4]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};65536&i[0]&&(o.text=r[16]),256&i[0]&&(o.json=r[8]),1&i[0]&&(o.readOnly=r[0]),4&i[0]&&(o.parser=r[2]),16&i[0]&&(o.onChangeMode=r[4]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function qtt(e){var t,n,r,i;return t=new po({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:e[0]?[]:[{icon:Qa,text:"Repair manually",onClick:e[36]}]}}),r=new RE({props:{text:e[16]||"",json:e[8],indentation:e[3],parser:e[2]}}),{c:function(){jt(t.$$.fragment),n=vt(),jt(r.$$.fragment)},m:function(o,a){xt(t,o,a),ot(o,n,a),xt(r,o,a),i=!0},p:function(o,a){var s={};1&a[0]&&(s.actions=o[0]?[]:[{icon:Qa,text:"Repair manually",onClick:o[36]}]),t.$set(s);var u={};65536&a[0]&&(u.text=o[16]||""),256&a[0]&&(u.json=o[8]),8&a[0]&&(u.indentation=o[3]),4&a[0]&&(u.parser=o[2]),r.$set(u)},i:function(o){i||(T(t.$$.fragment,o),T(r.$$.fragment,o),i=!0)},o:function(o){z(t.$$.fragment,o),z(r.$$.fragment,o),i=!1},d:function(o){kt(t,o),o&&it(n),kt(r,o)}}}function Htt(e){for(var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E=!Ue((t=e[22])===null||t===void 0?void 0:t.root),N=E&&fR(e),A=e[10],L=[],W=0;W<A.length;W+=1)L[W]=hR(cR(e,A,W));for(var O=function(B){return z(L[B],1,1,function(){L[B]=null})},I=e[24]&&dR(e),q=e[23].visibleItems,P=[],_=0;_<q.length;_+=1)P[_]=wR(sR(e,q,_));var S=function(B){return z(P[B],1,1,function(){P[B]=null})},$=e[18]&&xR(e),D=e[19]&&kR(e);return j=new a0({props:{validationErrors:e[12],selectError:e[39]}}),{c:function(){n=G("div"),r=G("table"),i=G("tbody"),o=G("tr"),a=G("th"),N&&N.c(),s=vt();for(var B=0;B<L.length;B+=1)L[B].c();u=vt(),I&&I.c(),c=vt(),l=G("tr"),f=G("td"),d=vt();for(var k=0;k<P.length;k+=1)P[k].c();v=vt(),p=G("tr"),m=G("td"),y=vt(),$&&$.c(),b=vt(),D&&D.c(),w=vt(),jt(j.$$.fragment),C(a,"class","jse-table-cell jse-table-cell-header svelte-hs49xj"),C(o,"class","jse-table-row jse-table-row-header svelte-hs49xj"),C(f,"colspan",h=e[10].length),C(f,"class","svelte-hs49xj"),Ra(f,"height",e[23].startHeight+"px"),C(l,"class","jse-table-invisible-start-section"),C(m,"colspan",g=e[10].length),C(m,"class","svelte-hs49xj"),Ra(m,"height",e[23].endHeight+"px"),C(p,"class","jse-table-invisible-end-section"),C(r,"class","jse-table-main svelte-hs49xj"),C(r,"cellpadding","0"),C(r,"cellspacing","0"),C(n,"class","jse-contents svelte-hs49xj")},m:function(B,k){ot(B,n,k),F(n,r),F(r,i),F(i,o),F(o,a),N&&N.m(a,null),F(o,s);for(var H=0;H<L.length;H+=1)L[H]&&L[H].m(o,null);F(o,u),I&&I.m(o,null),F(i,c),F(i,l),F(l,f),F(i,d);for(var U=0;U<P.length;U+=1)P[U]&&P[U].m(i,null);F(i,v),F(i,p),F(p,m),e[74](n),ot(B,y,k),$&&$.m(B,k),ot(B,b,k),D&&D.m(B,k),ot(B,w,k),xt(j,B,k),x=!0,R||(M=[Nr(iR.call(null,n,e[45])),Nt(n,"scroll",e[29])],R=!0)},p:function(B,k){var H;if(4194304&k[0]&&(E=!Ue((H=B[22])===null||H===void 0?void 0:H.root)),E?N?(N.p(B,k),4194304&k[0]&&T(N,1)):((N=fR(B)).c(),T(N,1),N.m(a,null)):N&&(Dt(),z(N,1,1,function(){N=null}),Lt()),268438529&k[0]){var U;for(A=B[10],U=0;U<A.length;U+=1){var st=cR(B,A,U);L[U]?(L[U].p(st,k),T(L[U],1)):(L[U]=hR(st),L[U].c(),T(L[U],1),L[U].m(o,u))}for(Dt(),U=A.length;U<L.length;U+=1)O(U);Lt()}if(B[24]?I?(I.p(B,k),16777216&k[0]&&T(I,1)):((I=dR(B)).c(),T(I,1),I.m(o,null)):I&&(Dt(),z(I,1,1,function(){I=null}),Lt()),(!x||1024&k[0]&&h!==(h=B[10].length))&&C(f,"colspan",h),8388608&k[0]&&Ra(f,"height",B[23].startHeight+"px"),165678085&k[0]|98817&k[1]){var ut;for(q=B[23].visibleItems,ut=0;ut<q.length;ut+=1){var gt=sR(B,q,ut);P[ut]?(P[ut].p(gt,k),T(P[ut],1)):(P[ut]=wR(gt),P[ut].c(),T(P[ut],1),P[ut].m(i,v))}for(Dt(),ut=q.length;ut<P.length;ut+=1)S(ut);Lt()}(!x||1024&k[0]&&g!==(g=B[10].length))&&C(m,"colspan",g),8388608&k[0]&&Ra(m,"height",B[23].endHeight+"px"),B[18]?$?($.p(B,k),262144&k[0]&&T($,1)):(($=xR(B)).c(),T($,1),$.m(b.parentNode,b)):$&&(Dt(),z($,1,1,function(){$=null}),Lt()),B[19]?D?(D.p(B,k),524288&k[0]&&T(D,1)):((D=kR(B)).c(),T(D,1),D.m(w.parentNode,w)):D&&(Dt(),z(D,1,1,function(){D=null}),Lt());var St={};4096&k[0]&&(St.validationErrors=B[12]),j.$set(St)},i:function(B){if(!x){T(N);for(var k=0;k<A.length;k+=1)T(L[k]);T(I);for(var H=0;H<q.length;H+=1)T(P[H]);T($),T(D),T(j.$$.fragment,B),x=!0}},o:function(B){z(N),L=L.filter(Boolean);for(var k=0;k<L.length;k+=1)z(L[k]);z(I),P=P.filter(Boolean);for(var H=0;H<P.length;H+=1)z(P[H]);z($),z(D),z(j.$$.fragment,B),x=!1},d:function(B){B&&it(n),N&&N.d(),ur(L,B),I&&I.d(),ur(P,B),e[74](null),B&&it(y),$&&$.d(B),B&&it(b),D&&D.d(B),B&&it(w),kt(j,B),R=!1,Mn(M)}}}function fR(e){var t,n,r,i;return r=new ic({props:{validationError:oc([],(t=e[22])===null||t===void 0?void 0:t.root),onExpand:Zo}}),{c:function(){n=G("div"),jt(r.$$.fragment),C(n,"class","jse-table-root-error svelte-hs49xj")},m:function(o,a){ot(o,n,a),xt(r,n,null),i=!0},p:function(o,a){var s,u={};4194304&a[0]&&(u.validationError=oc([],(s=o[22])===null||s===void 0?void 0:s.root)),r.$set(u)},i:function(o){i||(T(r.$$.fragment,o),i=!0)},o:function(o){z(r.$$.fragment,o),i=!1},d:function(o){o&&it(n),kt(r)}}}function hR(e){var t,n,r;return n=new $tt({props:{path:e[126],sortedColumn:e[11].sortedColumn,readOnly:e[0],onSort:e[28]}}),{c:function(){t=G("th"),jt(n.$$.fragment),C(t,"class","jse-table-cell jse-table-cell-header svelte-hs49xj")},m:function(i,o){ot(i,t,o),xt(n,t,null),r=!0},p:function(i,o){var a={};1024&o[0]&&(a.path=i[126]),2048&o[0]&&(a.sortedColumn=i[11].sortedColumn),1&o[0]&&(a.readOnly=i[0]),n.$set(a)},i:function(i){r||(T(n.$$.fragment,i),r=!0)},o:function(i){z(n.$$.fragment,i),r=!1},d:function(i){i&&it(t),kt(n)}}}function dR(e){var t,n,r;return n=new Btt({props:{count:e[8].length,maxSampleCount:e[9],onRefresh:e[72]}}),{c:function(){t=G("th"),jt(n.$$.fragment),C(t,"class","jse-table-cell jse-table-cell-header svelte-hs49xj")},m:function(i,o){ot(i,t,o),xt(n,t,null),r=!0},p:function(i,o){var a={};256&o[0]&&(a.count=i[8].length),512&o[0]&&(a.maxSampleCount=i[9]),512&o[0]&&(a.onRefresh=i[72]),n.$set(a)},i:function(i){r||(T(n.$$.fragment,i),r=!0)},o:function(i){z(n.$$.fragment,i),r=!1},d:function(i){i&&it(t),kt(n)}}}function vR(e){var t,n;return t=new ic({props:{validationError:oc([String(e[122])],e[123].row),onExpand:Zo}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};12582912&i[0]&&(o.validationError=oc([String(r[122])],r[123].row)),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function pR(e){var t,n,r,i,o,a,s,u,c=e[122]+"",l=!Ue((t=e[123])===null||t===void 0?void 0:t.row),f=l&&vR(e);function h(){for(var d,v=arguments.length,p=new Array(v),m=0;m<v;m++)p[m]=arguments[m];return(d=e)[73].apply(d,[e[122]].concat(p))}return{c:function(){n=G("th"),r=Jt(c),i=vt(),f&&f.c(),C(n,"class","jse-table-cell jse-table-cell-gutter svelte-hs49xj")},m:function(d,v){ot(d,n,v),F(n,r),F(n,i),f&&f.m(n,null),a=!0,s||(u=Nr(o=iR.call(null,n,h)),s=!0)},p:function(d,v){var p;e=d,(!a||8388608&v[0])&&c!==(c=e[122]+"")&&be(r,c),12582912&v[0]&&(l=!Ue((p=e[123])===null||p===void 0?void 0:p.row)),l?f?(f.p(e,v),12582912&v[0]&&T(f,1)):((f=vR(e)).c(),T(f,1),f.m(n,null)):f&&(Dt(),z(f,1,1,function(){f=null}),Lt()),o&&Rr(o.update)&&8388608&v[0]&&o.update.call(null,h)},i:function(d){a||(T(f),a=!0)},o:function(d){z(f),a=!1},d:function(d){d&&it(n),f&&f.d(),s=!1,u()}}}function Utt(e){var t,n;return t=new ytt({props:{path:e[127],value:e[128]!==void 0?e[128]:"",enforceString:ja(e[128],e[11].enforceStringMap,Qt(e[127]),e[21].parser),selection:e[129]?e[11].selection:void 0,searchResultItems:e[27],context:e[21]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};8389632&i[0]&&(o.path=r[127]),8389632&i[0]&&(o.value=r[128]!==void 0?r[128]:""),10488832&i[0]&&(o.enforceString=ja(r[128],r[11].enforceStringMap,Qt(r[127]),r[21].parser)),8391680&i[0]&&(o.selection=r[129]?r[11].selection:void 0),2097152&i[0]&&(o.context=r[21]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function Jtt(e){var t,n;return t=new ktt({props:{path:e[127],value:e[128],parser:e[2],isSelected:e[129],onEdit:e[40]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};8389632&i[0]&&(o.path=r[127]),8389632&i[0]&&(o.value=r[128]),4&i[0]&&(o.parser=r[2]),8391680&i[0]&&(o.isSelected=r[129]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function mR(e){var t,n,r,i;return n=new ts({props:{selected:!0,onContextMenu:e[31]}}),{c:function(){t=G("div"),jt(n.$$.fragment),r=vt(),C(t,"class","jse-context-menu-anchor svelte-hs49xj")},m:function(o,a){ot(o,t,a),xt(n,t,null),ot(o,r,a),i=!0},p:It,i:function(o){i||(T(n.$$.fragment,o),i=!0)},o:function(o){z(n.$$.fragment,o),i=!1},d:function(o){o&&it(t),kt(n),o&&it(r)}}}function gR(e){var t,n;return t=new ic({props:{validationError:oc(e[127],e[130]),onExpand:Zo}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};12583936&i[0]&&(o.validationError=oc(r[127],r[130])),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function yR(e){var t,n,r,i,o,a,s,u,c=!Ue(e[130]),l=[Jtt,Utt],f=[];function h(p,m){return 8389632&m[0]&&(n=null),n==null&&(n=!!Jn(p[128])),n?0:1}r=h(e,[-1,-1,-1,-1,-1]),i=f[r]=l[r](e);var d=!e[0]&&e[129]&&!e[11].selection.edit&&mR(e),v=c&&gR(e);return{c:function(){t=G("td"),i.c(),o=vn(),d&&d.c(),a=vn(),v&&v.c(),C(t,"class","jse-table-cell svelte-hs49xj"),C(t,"data-path",s=zu(e[127])),At(t,"jse-selected-value",e[129]&&Ge(e[11].selection))},m:function(p,m){ot(p,t,m),f[r].m(t,null),F(t,o),d&&d.m(t,null),F(t,a),v&&v.m(t,null),u=!0},p:function(p,m){var g=r;(r=h(p,m))===g?f[r].p(p,m):(Dt(),z(f[g],1,1,function(){f[g]=null}),Lt(),(i=f[r])?i.p(p,m):(i=f[r]=l[r](p)).c(),T(i,1),i.m(t,o)),p[0]||!p[129]||p[11].selection.edit?d&&(Dt(),z(d,1,1,function(){d=null}),Lt()):d?(d.p(p,m),8391681&m[0]&&T(d,1)):((d=mR(p)).c(),T(d,1),d.m(t,a)),12582912&m[0]&&(c=!Ue(p[130])),c?v?(v.p(p,m),12582912&m[0]&&T(v,1)):((v=gR(p)).c(),T(v,1),v.m(t,null)):v&&(Dt(),z(v,1,1,function(){v=null}),Lt()),(!u||8389632&m[0]&&s!==(s=zu(p[127])))&&C(t,"data-path",s),(!u||8391680&m[0]|65536&m[1])&&At(t,"jse-selected-value",p[129]&&Ge(p[11].selection))},i:function(p){u||(T(i),T(d),T(v),u=!0)},o:function(p){z(i),z(d),z(v),u=!1},d:function(p){p&&it(t),f[r].d(),d&&d.d(),v&&v.d()}}}function bR(e){var t;return{c:function(){C(t=G("td"),"class","jse-table-cell svelte-hs49xj")},m:function(n,r){ot(n,t,r)},d:function(n){n&&it(t)}}}function wR(e){for(var t,n,r,i,o=e[122],a=pR(e),s=e[10],u=[],c=0;c<s.length;c+=1)u[c]=yR(uR(e,s,c));var l=function(h){return z(u[h],1,1,function(){u[h]=null})},f=e[24]&&bR();return{c:function(){t=G("tr"),a.c(),n=vt();for(var h=0;h<u.length;h+=1)u[h].c();r=vt(),f&&f.c(),C(t,"class","jse-table-row svelte-hs49xj")},m:function(h,d){ot(h,t,d),a.m(t,null),F(t,n);for(var v=0;v<u.length;v+=1)u[v]&&u[v].m(t,null);F(t,r),f&&f.m(t,null),i=!0},p:function(h,d){if(8388608&d[0]&&Be(o,o=h[122])?(Dt(),z(a,1,1,It),Lt(),(a=pR(h)).c(),T(a,1),a.m(t,n)):a.p(h,d),148900869&d[0]|66049&d[1]){var v;for(s=h[10],v=0;v<s.length;v+=1){var p=uR(h,s,v);u[v]?(u[v].p(p,d),T(u[v],1)):(u[v]=yR(p),u[v].c(),T(u[v],1),u[v].m(t,r))}for(Dt(),v=s.length;v<u.length;v+=1)l(v);Lt()}h[24]?f||((f=bR()).c(),f.m(t,null)):f&&(f.d(1),f=null)},i:function(h){if(!i){T(a);for(var d=0;d<s.length;d+=1)T(u[d]);i=!0}},o:function(h){z(a),u=u.filter(Boolean);for(var d=0;d<u.length;d+=1)z(u[d]);i=!1},d:function(h){h&&it(t),a.d(h),ur(u,h),f&&f.d()}}}function xR(e){var t,n;return t=new po({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(e[18].contents)?"array":"object"," as text"),actions:[{icon:Ih,text:"Paste as JSON instead",onMouseDown:e[34]},{text:"Leave as is",onClick:e[35]}],onClose:e[75]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};262144&i[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(r[18].contents)?"array":"object"," as text")),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function kR(e){var t,n;return t=new po({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:e[0]?[]:[{icon:xl,text:"Ok",onClick:e[7]},{icon:Qa,text:"Repair manually instead",onClick:e[36]}],onClose:e[6]}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};1&i[0]&&(o.actions=r[0]?[]:[{icon:xl,text:"Ok",onClick:r[7]},{icon:Qa,text:"Repair manually instead",onClick:r[36]}]),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function Ktt(e){var t,n,r,i,o,a,s,u=e[1]&&lR(e),c=[Vtt,Ftt],l=[];return r=function(f,h){return f[26]?1:0}(e),i=l[r]=c[r](e),{c:function(){t=G("div"),u&&u.c(),n=vt(),i.c(),C(t,"class","jse-table-mode svelte-hs49xj"),At(t,"no-main-menu",!e[1])},m:function(f,h){ot(f,t,h),u&&u.m(t,null),F(t,n),l[r].m(t,null),e[76](t),o=!0,a||(s=[Nt(t,"mousedown",e[30]),Nt(t,"keydown",e[37]),Nt(t,"contextmenu",e[32])],a=!0)},p:function(f,h){f[1]?u?(u.p(f,h),2&h[0]&&T(u,1)):((u=lR(f)).c(),T(u,1),u.m(t,n)):u&&(Dt(),z(u,1,1,function(){u=null}),Lt()),i.p(f,h),(!o||2&h[0])&&At(t,"no-main-menu",!f[1])},i:function(f){o||(T(u),T(i),o=!0)},o:function(f){z(u),z(i),o=!1},d:function(f){f&&it(t),u&&u.d(),l[r].d(),e[76](null),a=!1,Mn(s)}}}var of=18;function Gtt(e,t,n){var r,i,o,a,s=Dr("jsoneditor:TableMode"),u=Ir("simple-modal").open,c=Ir("absolute-popup"),l=c.openAbsolutePopup,f=c.closeAbsolutePopup,h=qO(),d=qa(),v=qa(),p=typeof window=="undefined";s("isSSR:",p);var m,g,y,b,w,j,x=t.readOnly,R=t.externalContent,M=t.mainMenuBar,E=t.escapeControlCharacters,N=t.escapeUnicodeCharacters,A=t.flattenColumns,L=t.parser,W=t.parseMemoizeOne,O=t.validator,I=t.validationParser,q=t.indentation,P=t.onChange,_=t.onChangeMode,S=t.onRenderValue,$=t.onRenderMenu,D=t.onFocus,B=t.onBlur,k=t.onSortModal,H=t.onTransformModal,U=t.onJSONEditorModal;o0({onMount:Ti,onDestroy:xi,getWindow:function(){return Bu(g)},hasFocus:function(){return Pt&&document.hasFocus()||_h(g)},onFocus:function(){D&&D()},onBlur:function(){B&&B()}});var st,ut=void 0,gt=1e4,St=[],Pt=!1,pt={},Bt=600,K=0;function $t(nt){s("updateSelection",nt);var Et=typeof nt=="function"?nt(Ct.selection):nt;rn(Et,Ct.selection)||n(11,Ct=dt(dt({},Ct),{},{selection:Et}))}function Kt(nt){Ct.selection!==void 0&&nt!==void 0&&(Ct.selection&&Ni(nt,Ct.selection.anchorPath)&&Ni(nt,Ct.selection.focusPath)||(s("clearing selection: path does not exist anymore",Ct.selection),n(11,Ct=dt(dt({},Ct),{},{selection:qu(nt,Ct)}))))}var Ct=Eh(),V=!1,Q,ft=HO({onChange:function(nt){n(20,wt=nt)}}),wt=ft.getState();function _t(nt){var Et=w,Vt=Lu(nt)?nt.text!==j:!rn(Et,nt.json);if(s("update external content",{isChanged:Vt}),Vt){var ne={json:w,text:j},oe=w,Ie=Ct,Ye=j,pe=V;if(Lu(nt))try{n(8,w=W(nt.text)),n(16,j=nt.text),n(19,V=!1),n(17,ut=void 0)}catch(me){try{n(8,w=W(Io(nt.text))),n(16,j=nt.text),n(19,V=!0),n(17,ut=void 0)}catch(xe){n(8,w=void 0),n(16,j=R.text),n(19,V=!1),n(17,ut=j!==void 0&&j!==""?Du(j,me.message||me.toString()):void 0)}}else n(8,w=nt.json),n(16,j=void 0),n(19,V=!1),n(17,ut=void 0);Kt(w),Ct.sortedColumn&&n(11,Ct=dt(dt({},Ct),{},{sortedColumn:void 0})),Ut({previousJson:oe,previousState:Ie,previousText:Ye,previousTextIsRepaired:pe}),Xe(ne,null)}}function Ut(nt){var Et=nt.previousJson,Vt=nt.previousState,ne=nt.previousText,oe=nt.previousTextIsRepaired;Et===void 0&&ne===void 0||(w!==void 0?Et!==void 0?ft.add({undo:{patch:[{op:"replace",path:"",value:Et}],state:Yr(Vt),json:void 0,text:ne,textIsRepaired:oe},redo:{patch:[{op:"replace",path:"",value:w}],state:Yr(Ct),json:void 0,text:j,textIsRepaired:V}}):ft.add({undo:{patch:void 0,json:void 0,text:ne,state:Yr(Vt),textIsRepaired:oe},redo:{patch:void 0,json:w,state:Yr(Ct),text:j,textIsRepaired:V}}):Et!==void 0&&ft.add({undo:{patch:void 0,json:Et,state:Yr(Vt),text:ne,textIsRepaired:oe},redo:{patch:void 0,json:void 0,text:j,textIsRepaired:V,state:Yr(Ct)}}))}var zt=[],$e=Ol(UO);function qe(nt,Et,Vt,ne){tc(function(){var oe;try{oe=$e(nt,Et,Vt,ne)}catch(Ie){oe=[{path:[],message:"Failed to validate: "+Ie.message,severity:No.warning}]}rn(oe,zt)||(s("validationErrors changed:",oe),n(12,zt=oe))},function(oe){return s("validationErrors updated in ".concat(oe," ms"))})}function De(){return s("validate"),ut?{parseError:ut,isRepairable:!1}:(qe(w,O,L,I),Ue(zt)?null:{validationErrors:zt})}function re(nt,Et){if(s("patch",nt,Et),w===void 0)throw new Error("Cannot apply patch: no JSON");var Vt={json:w},ne=w,oe=Ct,Ie=V,Ye=P_(w,nt),pe=h_(w,Ct,nt).json,me=sG(Ct,nt,St),xe=typeof Et=="function"?Et(pe,me):void 0;n(8,w=xe&&xe.json!==void 0?xe.json:pe);var wn=xe&&xe.state!==void 0?xe.state:me;n(11,Ct=wn),n(16,j=void 0),n(19,V=!1),n(18,st=void 0),n(17,ut=void 0),ft.add({undo:{patch:Ye,json:void 0,text:void 0,state:Yr(oe),textIsRepaired:Ie},redo:{patch:nt,json:void 0,state:Yr(wn),text:void 0,textIsRepaired:V}});var xn={json:w,previousJson:ne,undo:Ye,redo:nt};return Xe(Vt,xn),xn}function Ne(nt,Et){if(!x)return re(nt,Et)}function Xe(nt,Et){(nt.json!==void 0||(nt==null?void 0:nt.text)!==void 0)&&(j!==void 0?P({text:j,json:void 0},nt,{contentErrors:De(),patchResult:Et}):w!==void 0&&P({text:void 0,json:w},nt,{contentErrors:De(),patchResult:Et}))}function Bn(nt){s("handleFind",nt)}function ue(nt){s("pasted json as text",nt),n(18,st=nt)}function _n(nt){var Et=parseInt(nt[0]),Vt=[String(Et+1)].concat(Oe(nt.slice(1)));return Ni(w,Vt)?un(Vt,!1):un(nt,!1)}function Qe(){b&&(b.focus(),b.select())}function gn(){Ct.selection||$t(function(){if(An(w)&&!Ue(w)&&!Ue(St))return un(["0"].concat(Oe(St[0])),!1)}())}function ln(nt){var Et=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],Vt=m0(nt,St,pt,of),ne=Vt-K,oe=ar(nt);s("scrollTo",{path:nt,top:Vt,scrollTop:K,elem:oe});var Ie=y.getBoundingClientRect();if(oe&&!Et){var Ye=oe.getBoundingClientRect();if(Ye.bottom>Ie.top&&Ye.top<Ie.bottom)return}var pe=-Ie.height/4;return new Promise(oe?function(me){h(oe,{container:y,offset:pe,duration:300,callback:function(){ir(nt),me()}})}:function(me){var xe;h(ne,{container:y,offset:pe,duration:300,callback:(xe=Ee(Ft().mark(function wn(){return Ft().wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,pr();case 2:if(m0(nt,St,pt,of)===Vt){xn.next=8;break}return xn.next=6,ln(nt,Et);case 6:xn.next=9;break;case 8:ir(nt);case 9:me();case 10:case"end":return xn.stop()}},wn)})),function(){return xe.apply(this,arguments)})})})}function ir(nt){var Et=ar(nt);if(Et){var Vt=y.getBoundingClientRect(),ne=Et.getBoundingClientRect();if(ne.right>Vt.right){var oe=ne.right-Vt.right;n(14,y.scrollLeft+=oe,y)}if(ne.left<Vt.left){var Ie=Vt.left-ne.left;n(14,y.scrollLeft-=Ie,y)}}}function or(nt){(function(Et){var Vt=Hi(Et,St).rowIndex,ne=m0(Et,St,pt,of),oe=ne+(pt[Vt]||of),Ie=y.getBoundingClientRect(),Ye=K,pe=K+Ie.height-18;if(oe>pe){var me=oe-pe;n(14,y.scrollTop+=me,y)}if(ne<Ye){var xe=Ye-ne;n(14,y.scrollTop-=xe,y)}})(nt),ir(nt)}function ar(nt){return y?y.querySelector('td[data-path="'.concat(zu(nt),'"]')):null}function zn(nt){var Et=nt.anchor,Vt=nt.left,ne=nt.top,oe=nt.width,Ie=nt.height,Ye=nt.offsetTop,pe=nt.offsetLeft,me=nt.showTip;Pt=!0;var xe=l(Mtt,{json:w,documentState:Ct,parser:L,showTip:me,onEditValue:bt,onEditRow:ie,onToggleEnforceString:Le,onCut:Gt,onCopy:Nn,onPaste:Zt,onRemove:Tr,onDuplicateRow:Z,onInsertBeforeRow:ct,onInsertAfterRow:lt,onRemoveRow:rt,onCloseContextMenu:function(){f(xe),Qe()}},{left:Vt,top:ne,offsetTop:Ye,offsetLeft:pe,width:oe,height:Ie,anchor:Et,closeOnOuterClick:!0,onClose:function(){Pt=!1,Qe()}})}function an(nt){if(!x&&!Ka(Ct.selection)){if(nt&&(nt.stopPropagation(),nt.preventDefault()),nt&&nt.type==="contextmenu"&&nt.target!==b)zn({left:nt.clientX,top:nt.clientY,width:pa,height:va,showTip:!1});else{var Et,Vt=(Et=y)===null||Et===void 0?void 0:Et.querySelector(".jse-table-cell.jse-selected-value");if(Vt)zn({anchor:Vt,offsetTop:2,width:pa,height:va,showTip:!1});else{var ne,oe=(ne=y)===null||ne===void 0?void 0:ne.getBoundingClientRect();oe&&zn({top:oe.top+2,left:oe.left+2,width:pa,height:va,showTip:!1})}}return!1}}function bt(){if(!x&&Ct.selection){var nt=Ct.selection.focusPath;Jn(se(w,nt))?ze(nt):$t(un(nt,!0))}}function ie(){!x&&Ct.selection&&ze(Ct.selection.focusPath.slice(0,1))}function Le(){if(!x&&Ge(Ct.selection)){var nt=Ct.selection.focusPath,Et=Qt(nt),Vt=se(w,nt),ne=!ja(Vt,Ct.enforceStringMap,Et,L),oe=ne?String(Vt):gu(String(Vt),L);s("handleToggleEnforceString",{enforceString:ne,value:Vt,updatedValue:oe}),Ne([{op:"replace",path:Et,value:oe}],function(Ie,Ye){return{state:f_(Ye,Et,ne)}})}}function yt(){return(yt=Ee(Ft().mark(function nt(){var Et,Vt,ne;return Ft().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return s("apply pasted json",st),Vt=(Et=st).path,ne=Et.contents,$t(un(Vt,!1)),oe.next=5,pr();case 5:Ne([{op:"replace",path:Qt(Vt),value:ne}]);case 7:case"end":return oe.stop()}},nt)}))).apply(this,arguments)}function Zt(){u(nM,{},dt(dt({},Ss),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Qe()}})}function Gt(nt){return fe.apply(this,arguments)}function fe(){return(fe=Ee(Ft().mark(function nt(Et){return Ft().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,ME({json:w,documentState:Ct,indentation:Et?q:void 0,readOnly:x,parser:L,onPatch:Ne});case 2:case"end":return Vt.stop()}},nt)}))).apply(this,arguments)}function Nn(){return tn.apply(this,arguments)}function tn(){return tn=Ee(Ft().mark(function nt(){var Et,Vt=arguments;return Ft().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(Et=!(Vt.length>0&&Vt[0]!==void 0)||Vt[0],w!==void 0){ne.next=3;break}return ne.abrupt("return");case 3:return ne.next=5,EE({json:w,documentState:Ct,indentation:Et?q:void 0,parser:L});case 5:case"end":return ne.stop()}},nt)})),tn.apply(this,arguments)}function Tr(){PE({json:w,text:j,documentState:Ct,keepSelection:!0,readOnly:x,onChange:P,onPatch:Ne})}function Z(){uG({json:w,documentState:Ct,columns:St,readOnly:x,onPatch:Ne})}function ct(){cG({json:w,documentState:Ct,columns:St,readOnly:x,onPatch:Ne})}function lt(){lG({json:w,documentState:Ct,columns:St,readOnly:x,onPatch:Ne})}function rt(){fG({json:w,documentState:Ct,columns:St,readOnly:x,onPatch:Ne})}function Tt(){return(Tt=Ee(Ft().mark(function nt(Et){return Ft().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,TE({char:Et,selectInside:!1,refJsonEditor:g,json:w,documentState:Ct,readOnly:x,parser:L,onPatch:Ne,onReplaceJson:te,onSelect:$t});case 2:case"end":return Vt.stop()}},nt)}))).apply(this,arguments)}function te(nt,Et){var Vt=Ct,ne=w,oe=j,Ie={json:w,text:j},Ye=V,pe=Vi(w,Ct,[],Jo),me=typeof Et=="function"?Et(nt,pe):void 0;n(8,w=me&&me.json!==void 0?me.json:nt),n(11,Ct=me&&me.state!==void 0?me.state:pe),n(16,j=void 0),n(19,V=!1),n(17,ut=void 0),Kt(w),Ut({previousJson:ne,previousState:Vt,previousText:oe,previousTextIsRepaired:Ye}),Xe(Ie,null)}function ye(nt,Et){s("handleChangeText");var Vt=Ct,ne=w,oe=j,Ie={json:w,text:j},Ye=V;try{n(8,w=W(nt)),n(11,Ct=Vi(w,Ct,[],Jo)),n(16,j=void 0),n(19,V=!1),n(17,ut=void 0)}catch(me){try{n(8,w=W(Io(nt))),n(11,Ct=Vi(w,Ct,[],Jo)),n(16,j=nt),n(19,V=!0),n(17,ut=void 0)}catch(xe){n(8,w=void 0),n(11,Ct=Eh({json:w,expand:Jo})),n(16,j=nt),n(19,V=!1),n(17,ut=j!==""?Du(j,me.message||me.toString()):void 0)}}if(typeof Et=="function"){var pe=Et(w,Ct);n(8,w=pe&&pe.json?pe.json:w),n(11,Ct=pe&&pe.state?pe.state:Ct)}Kt(w),Ut({previousJson:ne,previousState:Vt,previousText:oe,previousTextIsRepaired:Ye}),Xe(Ie,null)}function en(nt){if(w!==void 0){var Et=nt.id,Vt=nt.onTransform,ne=nt.onClose,oe=nt.rootPath||[];Pt=!0,H({id:Et||v,json:w,rootPath:oe||[],onTransform:function(Ie){Vt?Vt({operations:Ie,json:w,transformedJson:so(w,Ie)}):(s("onTransform",oe,Ie),Ne(Ie))},onClose:function(){Pt=!1,Qe(),ne&&ne()}})}}function ze(nt){s("openJSONEditorModal",{path:nt}),Pt=!0,U({content:{json:se(w,nt)},path:nt,onPatch:Q.onPatch,onClose:function(){Pt=!1,Qe()}})}function bn(nt,Et){u(dM,{text:nt,onParse:Sh,onRepair:R6,onApply:Et},dt(dt({},Ss),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Qe()}})}function On(){if(!x&&ft.getState().canUndo){var nt=ft.undo();if(nt){var Et={json:w,text:j};n(8,w=nt.undo.patch?so(w,nt.undo.patch):nt.undo.json),n(11,Ct=nt.undo.state),n(16,j=nt.undo.text),n(19,V=nt.undo.textIsRepaired),n(17,ut=void 0),s("undo",{item:nt,json:w}),Xe(Et,{json:w,previousJson:Et.json,redo:nt.undo.patch,undo:nt.redo.patch}),Qe(),Ct.selection&&ln(Ct.selection.focusPath,!1)}}}function Re(){if(!x&&ft.getState().canRedo){var nt=ft.redo();if(nt){var Et={json:w,text:j};n(8,w=nt.redo.patch?so(w,nt.redo.patch):nt.redo.json),n(11,Ct=nt.redo.state),n(16,j=nt.redo.text),n(19,V=nt.redo.textIsRepaired),n(17,ut=void 0),s("redo",{item:nt,json:w}),Xe(Et,{json:w,previousJson:Et.json,redo:nt.redo.patch,undo:nt.undo.patch}),Qe(),Ct.selection&&ln(Ct.selection.focusPath,!1)}}}function dn(nt,Et){n(68,pt[Et]=nt.getBoundingClientRect().height,pt)}return e.$$set=function(nt){"readOnly"in nt&&n(0,x=nt.readOnly),"externalContent"in nt&&n(48,R=nt.externalContent),"mainMenuBar"in nt&&n(1,M=nt.mainMenuBar),"escapeControlCharacters"in nt&&n(49,E=nt.escapeControlCharacters),"escapeUnicodeCharacters"in nt&&n(50,N=nt.escapeUnicodeCharacters),"flattenColumns"in nt&&n(51,A=nt.flattenColumns),"parser"in nt&&n(2,L=nt.parser),"parseMemoizeOne"in nt&&n(52,W=nt.parseMemoizeOne),"validator"in nt&&n(53,O=nt.validator),"validationParser"in nt&&n(54,I=nt.validationParser),"indentation"in nt&&n(3,q=nt.indentation),"onChange"in nt&&n(55,P=nt.onChange),"onChangeMode"in nt&&n(4,_=nt.onChangeMode),"onRenderValue"in nt&&n(56,S=nt.onRenderValue),"onRenderMenu"in nt&&n(5,$=nt.onRenderMenu),"onFocus"in nt&&n(57,D=nt.onFocus),"onBlur"in nt&&n(58,B=nt.onBlur),"onSortModal"in nt&&n(59,k=nt.onSortModal),"onTransformModal"in nt&&n(60,H=nt.onTransformModal),"onJSONEditorModal"in nt&&n(61,U=nt.onJSONEditorModal)},e.$$.update=function(){786432&e.$$.dirty[1]&&n(67,m=$g({escapeControlCharacters:E,escapeUnicodeCharacters:N})),131072&e.$$.dirty[1]&&_t(R),1792&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&n(10,St=An(w)?function(nt,Et){var Vt,ne=new Set(Et.map(Qt)),oe=new Set(nt.map(Qt)),Ie=at(ne);try{for(Ie.s();!(Vt=Ie.n()).done;){var Ye=Vt.value;oe.has(Ye)||ne.delete(Ye)}}catch(wn){Ie.e(wn)}finally{Ie.f()}var pe,me=at(oe);try{for(me.s();!(pe=me.n()).done;){var xe=pe.value;ne.has(xe)||ne.add(xe)}}catch(wn){me.e(wn)}finally{me.f()}return Oe(ne).map(ao)}(rG(w,A,gt),St):[]),1280&e.$$.dirty[0]&&n(25,r=w&&!Ue(St)),768&e.$$.dirty[0]&&n(24,i=Array.isArray(w)&&w.length>gt),256&e.$$.dirty[0]|448&e.$$.dirty[2]&&n(23,o=iG(K,Bt,w,pt,of)),256&e.$$.dirty[0]&&y&&y.scrollTo({top:y.scrollTop,left:y.scrollLeft}),2309&e.$$.dirty[0]|33554432&e.$$.dirty[1]|32&e.$$.dirty[2]&&n(21,Q={readOnly:x,parser:L,normalization:m,getJson:function(){return w},getDocumentState:function(){return Ct},findElement:ar,findNextInside:_n,focus:Qe,onPatch:Ne,onSelect:$t,onFind:Bn,onPasteJson:ue,onRenderValue:S}),260&e.$$.dirty[0]|12582912&e.$$.dirty[1]&&qe(w,O,L,I),5120&e.$$.dirty[0]&&n(22,a=oG(zt,St))},[x,M,L,q,_,$,Qe,function(){if(V&&w!==void 0){var nt=Ct,Et=w,Vt=j,ne={json:w,text:j},oe=V;n(16,j=void 0),n(19,V=!1),Kt(w),Ut({previousJson:Et,previousState:nt,previousText:Vt,previousTextIsRepaired:oe}),Xe(ne,null)}return{json:w,text:j}},w,gt,St,Ct,zt,g,y,b,j,ut,st,V,wt,Q,a,o,i,r,p,void 0,function(nt){if(!x){s("onSortByHeader",nt);var Et=nt.sortDirection===Ri.desc?-1:1;Ne(fE(w,[],nt.path,Et),function(Vt,ne){return{state:dt(dt({},ne),{},{sortedColumn:nt})}})}},function(nt){n(70,K=nt.target.scrollTop)},function(nt){var Et=nt!=null&&nt.target?G6(nt.target):void 0;if(Et){if(Ka(Ct.selection)&&b_(Ct.selection,Et,En.value))return;$t(un(Et,!1)),Qe(),nt.preventDefault()}},zn,an,function(nt){x||zn({anchor:K6(nt.target,"BUTTON"),offsetTop:0,width:pa,height:va,showTip:!0})},function(){return yt.apply(this,arguments)},function(){s("clear pasted json"),n(18,st=void 0)},function(){_(Lr.text)},function(nt){var Et=Ha(nt);if(s("keydown",{combo:Et,key:nt.key}),Et==="Ctrl+X"&&(nt.preventDefault(),Gt(!0)),Et==="Ctrl+Shift+X"&&(nt.preventDefault(),Gt(!1)),Et==="Ctrl+C"&&(nt.preventDefault(),Nn(!0)),Et==="Ctrl+Shift+C"&&(nt.preventDefault(),Nn(!1)),Et==="Ctrl+D"&&nt.preventDefault(),Et!=="Delete"&&Et!=="Backspace"||(nt.preventDefault(),Tr()),Et==="Insert"&&nt.preventDefault(),Et==="Ctrl+A"&&nt.preventDefault(),Et==="Ctrl+Q"&&an(nt),Et==="ArrowLeft"&&(nt.preventDefault(),gn(),Ct.selection)){var Vt=function(me,xe){var wn=Hi(xe.focusPath,me),xn=wn.rowIndex,kr=wn.columnIndex;return kr>0?un(Hs({rowIndex:xn,columnIndex:kr-1},me),!1):xe}(St,Ct.selection);$t(Vt),or(Vt.focusPath)}if(Et==="ArrowRight"&&(nt.preventDefault(),gn(),Ct.selection)){var ne=function(me,xe){var wn=Hi(xe.focusPath,me),xn=wn.rowIndex,kr=wn.columnIndex;return kr<me.length-1?un(Hs({rowIndex:xn,columnIndex:kr+1},me),!1):xe}(St,Ct.selection);$t(ne),or(ne.focusPath)}if(Et==="ArrowUp"&&(nt.preventDefault(),gn(),Ct.selection)){var oe=function(me,xe){var wn=Hi(xe.focusPath,me),xn=wn.rowIndex,kr=wn.columnIndex;return xn>0?un(Hs({rowIndex:xn-1,columnIndex:kr},me),!1):xe}(St,Ct.selection);$t(oe),or(oe.focusPath)}if(Et==="ArrowDown"&&(nt.preventDefault(),gn(),Ct.selection)){var Ie=function(me,xe,wn){var xn=Hi(wn.focusPath,xe),kr=xn.rowIndex,Zi=xn.columnIndex;return kr<me.length-1?un(Hs({rowIndex:kr+1,columnIndex:Zi},xe),!1):wn}(w,St,Ct.selection);$t(Ie),or(Ie.focusPath)}if(Et==="Enter"&&Ct.selection&&Ge(Ct.selection)){nt.preventDefault();var Ye=Ct.selection.focusPath;Jn(se(w,Ye))?ze(Ye):x||$t(dt(dt({},Ct.selection),{},{edit:!0}))}if(Et.replace(/^Shift\+/,"").length===1&&Ct.selection)return nt.preventDefault(),void function(me){Tt.apply(this,arguments)}(nt.key);if(Et==="Ctrl+Enter"&&Ge(Ct.selection)){var pe=se(w,Ct.selection.focusPath);Rf(pe)&&window.open(String(pe),"_blank")}Et==="Escape"&&Ct.selection&&(nt.preventDefault(),$t(void 0)),Et==="Ctrl+F"&&nt.preventDefault(),Et==="Ctrl+H"&&nt.preventDefault(),Et==="Ctrl+Z"&&(nt.preventDefault(),On()),Et==="Ctrl+Shift+Z"&&(nt.preventDefault(),Re())},function(nt){nt.preventDefault(),AE({clipboardText:nt.clipboardData.getData("text/plain"),json:w,documentState:Ct,readOnly:x,parser:L,onPatch:Ne,onChangeText:ye,openRepairModal:bn})},function(nt){s("select validation error",nt),$t(un(nt.path,!1)),ln(nt.path)},ze,function(){(function(nt){x||w===void 0||(Pt=!0,k({id:d,json:w,rootPath:nt,onSort:function(Et){var Vt=Et.operations,ne=Et.itemPath,oe=Et.direction;s("onSort",Vt,nt,ne,oe),Ne(Vt,function(Ie,Ye){return{state:dt(dt({},Ye),{},{sortedColumn:{path:ne,sortDirection:oe===-1?Ri.desc:Ri.asc}})}})},onClose:function(){Pt=!1,Qe()}}))})([])},function(){en({rootPath:[]})},On,Re,function(nt){n(69,Bt=nt.getBoundingClientRect().height)},dn,function(nt,Et){return!!Et&&Et.pointersMap[Qt(nt)]===!0},R,E,N,A,W,O,I,P,S,D,B,k,H,U,De,re,ln,ar,en,m,pt,Bt,K,function(nt){He[nt?"unshift":"push"](function(){n(15,b=nt)})},function(){return n(9,gt=1/0)},function(nt,Et){return dn(Et,nt)},function(nt){He[nt?"unshift":"push"](function(){n(14,y=nt)})},function(){setTimeout(Qe)},function(nt){He[nt?"unshift":"push"](function(){n(13,g=nt)})}]}var Qtt=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,Gtt,Ktt,Be,{readOnly:0,externalContent:48,mainMenuBar:1,escapeControlCharacters:49,escapeUnicodeCharacters:50,flattenColumns:51,parser:2,parseMemoizeOne:52,validator:53,validationParser:54,indentation:3,onChange:55,onChangeMode:4,onRenderValue:56,onRenderMenu:5,onFocus:57,onBlur:58,onSortModal:59,onTransformModal:60,onJSONEditorModal:61,validate:62,patch:63,focus:6,acceptAutoRepair:7,scrollTo:64,findElement:65,openTransformModal:66},ztt,[-1,-1,-1,-1,-1]),i}return tt(n,[{key:"validate",get:function(){return this.$$.ctx[62]}},{key:"patch",get:function(){return this.$$.ctx[63]}},{key:"focus",get:function(){return this.$$.ctx[6]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[7]}},{key:"scrollTo",get:function(){return this.$$.ctx[64]}},{key:"findElement",get:function(){return this.$$.ctx[65]}},{key:"openTransformModal",get:function(){return this.$$.ctx[66]}}]),n}();function Ytt(e){var t,n,r={externalContent:e[0],readOnly:e[1],indentation:e[2],mainMenuBar:e[5],navigationBar:e[6],escapeControlCharacters:e[9],escapeUnicodeCharacters:e[10],parser:e[12],parseMemoizeOne:e[13],validator:e[14],validationParser:e[15],pathParser:e[16],onError:e[21],onChange:e[17],onChangeMode:e[20],onRenderValue:e[18],onClassName:e[19],onFocus:e[22],onBlur:e[23],onRenderMenu:e[30],onSortModal:e[24],onTransformModal:e[25],onJSONEditorModal:e[26]};return t=new x0({props:r}),e[45](t),{c:function(){jt(t.$$.fragment)},m:function(i,o){xt(t,i,o),n=!0},p:function(i,o){var a={};1&o[0]&&(a.externalContent=i[0]),2&o[0]&&(a.readOnly=i[1]),4&o[0]&&(a.indentation=i[2]),32&o[0]&&(a.mainMenuBar=i[5]),64&o[0]&&(a.navigationBar=i[6]),512&o[0]&&(a.escapeControlCharacters=i[9]),1024&o[0]&&(a.escapeUnicodeCharacters=i[10]),4096&o[0]&&(a.parser=i[12]),8192&o[0]&&(a.parseMemoizeOne=i[13]),16384&o[0]&&(a.validator=i[14]),32768&o[0]&&(a.validationParser=i[15]),65536&o[0]&&(a.pathParser=i[16]),2097152&o[0]&&(a.onError=i[21]),131072&o[0]&&(a.onChange=i[17]),1048576&o[0]&&(a.onChangeMode=i[20]),262144&o[0]&&(a.onRenderValue=i[18]),524288&o[0]&&(a.onClassName=i[19]),4194304&o[0]&&(a.onFocus=i[22]),8388608&o[0]&&(a.onBlur=i[23]),1073741824&o[0]&&(a.onRenderMenu=i[30]),16777216&o[0]&&(a.onSortModal=i[24]),33554432&o[0]&&(a.onTransformModal=i[25]),67108864&o[0]&&(a.onJSONEditorModal=i[26]),t.$set(a)},i:function(i){n||(T(t.$$.fragment,i),n=!0)},o:function(i){z(t.$$.fragment,i),n=!1},d:function(i){e[45](null),kt(t,i)}}}function Ztt(e){var t,n,r={externalContent:e[0],readOnly:e[1],mainMenuBar:e[5],escapeControlCharacters:e[9],escapeUnicodeCharacters:e[10],flattenColumns:e[11],parser:e[12],parseMemoizeOne:e[13],validator:e[14],validationParser:e[15],indentation:e[2],onChange:e[17],onChangeMode:e[20],onRenderValue:e[18],onFocus:e[22],onBlur:e[23],onRenderMenu:e[30],onSortModal:e[24],onTransformModal:e[25],onJSONEditorModal:e[26]};return t=new Qtt({props:r}),e[44](t),{c:function(){jt(t.$$.fragment)},m:function(i,o){xt(t,i,o),n=!0},p:function(i,o){var a={};1&o[0]&&(a.externalContent=i[0]),2&o[0]&&(a.readOnly=i[1]),32&o[0]&&(a.mainMenuBar=i[5]),512&o[0]&&(a.escapeControlCharacters=i[9]),1024&o[0]&&(a.escapeUnicodeCharacters=i[10]),2048&o[0]&&(a.flattenColumns=i[11]),4096&o[0]&&(a.parser=i[12]),8192&o[0]&&(a.parseMemoizeOne=i[13]),16384&o[0]&&(a.validator=i[14]),32768&o[0]&&(a.validationParser=i[15]),4&o[0]&&(a.indentation=i[2]),131072&o[0]&&(a.onChange=i[17]),1048576&o[0]&&(a.onChangeMode=i[20]),262144&o[0]&&(a.onRenderValue=i[18]),4194304&o[0]&&(a.onFocus=i[22]),8388608&o[0]&&(a.onBlur=i[23]),1073741824&o[0]&&(a.onRenderMenu=i[30]),16777216&o[0]&&(a.onSortModal=i[24]),33554432&o[0]&&(a.onTransformModal=i[25]),67108864&o[0]&&(a.onJSONEditorModal=i[26]),t.$set(a)},i:function(i){n||(T(t.$$.fragment,i),n=!0)},o:function(i){z(t.$$.fragment,i),n=!1},d:function(i){e[44](null),kt(t,i)}}}function Xtt(e){var t,n,r={externalContent:e[0],readOnly:e[1],indentation:e[2],tabSize:e[3],mainMenuBar:e[5],statusBar:e[7],askToFormat:e[8],escapeUnicodeCharacters:e[10],parser:e[12],validator:e[14],validationParser:e[15],onChange:e[17],onChangeMode:e[20],onError:e[21],onFocus:e[22],onBlur:e[23],onRenderMenu:e[30],onSortModal:e[24],onTransformModal:e[25]};return t=new htt({props:r}),e[43](t),{c:function(){jt(t.$$.fragment)},m:function(i,o){xt(t,i,o),n=!0},p:function(i,o){var a={};1&o[0]&&(a.externalContent=i[0]),2&o[0]&&(a.readOnly=i[1]),4&o[0]&&(a.indentation=i[2]),8&o[0]&&(a.tabSize=i[3]),32&o[0]&&(a.mainMenuBar=i[5]),128&o[0]&&(a.statusBar=i[7]),256&o[0]&&(a.askToFormat=i[8]),1024&o[0]&&(a.escapeUnicodeCharacters=i[10]),4096&o[0]&&(a.parser=i[12]),16384&o[0]&&(a.validator=i[14]),32768&o[0]&&(a.validationParser=i[15]),131072&o[0]&&(a.onChange=i[17]),1048576&o[0]&&(a.onChangeMode=i[20]),2097152&o[0]&&(a.onError=i[21]),4194304&o[0]&&(a.onFocus=i[22]),8388608&o[0]&&(a.onBlur=i[23]),1073741824&o[0]&&(a.onRenderMenu=i[30]),16777216&o[0]&&(a.onSortModal=i[24]),33554432&o[0]&&(a.onTransformModal=i[25]),t.$set(a)},i:function(i){n||(T(t.$$.fragment,i),n=!0)},o:function(i){z(t.$$.fragment,i),n=!1},d:function(i){e[43](null),kt(t,i)}}}function tet(e){var t,n,r,i,o=[Xtt,Ztt,Ytt],a=[];function s(u,c){return u[4]===Lr.text||u[4]==="code"?0:u[4]===Lr.table?1:2}return t=s(e),n=a[t]=o[t](e),{c:function(){n.c(),r=vn()},m:function(u,c){a[t].m(u,c),ot(u,r,c),i=!0},p:function(u,c){var l=t;(t=s(u))===l?a[t].p(u,c):(Dt(),z(a[l],1,1,function(){a[l]=null}),Lt(),(n=a[t])?n.p(u,c):(n=a[t]=o[t](u)).c(),T(n,1),n.m(r.parentNode,r))},i:function(u){i||(T(n),i=!0)},o:function(u){z(n),i=!1},d:function(u){a[t].d(u),u&&it(r)}}}function eet(e,t,n){var r,i,o,a,s,u=t.content,c=t.readOnly,l=t.indentation,f=t.tabSize,h=t.mode,d=t.mainMenuBar,v=t.navigationBar,p=t.statusBar,m=t.askToFormat,g=t.escapeControlCharacters,y=t.escapeUnicodeCharacters,b=t.flattenColumns,w=t.parser,j=t.parseMemoizeOne,x=t.validator,R=t.validationParser,M=t.pathParser,E=t.insideModal,N=t.onChange,A=t.onRenderValue,L=t.onClassName,W=t.onRenderMenu,O=t.onChangeMode,I=t.onError,q=t.onFocus,P=t.onBlur,_=t.onSortModal,S=t.onTransformModal,$=t.onJSONEditorModal,D={separator:!0};function B(){return(B=Ee(Ft().mark(function k(){return Ft().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(!o){H.next=3;break}return H.next=3,o.refresh();case 3:case"end":return H.stop()}},k)}))).apply(this,arguments)}return e.$$set=function(k){"content"in k&&n(0,u=k.content),"readOnly"in k&&n(1,c=k.readOnly),"indentation"in k&&n(2,l=k.indentation),"tabSize"in k&&n(3,f=k.tabSize),"mode"in k&&n(4,h=k.mode),"mainMenuBar"in k&&n(5,d=k.mainMenuBar),"navigationBar"in k&&n(6,v=k.navigationBar),"statusBar"in k&&n(7,p=k.statusBar),"askToFormat"in k&&n(8,m=k.askToFormat),"escapeControlCharacters"in k&&n(9,g=k.escapeControlCharacters),"escapeUnicodeCharacters"in k&&n(10,y=k.escapeUnicodeCharacters),"flattenColumns"in k&&n(11,b=k.flattenColumns),"parser"in k&&n(12,w=k.parser),"parseMemoizeOne"in k&&n(13,j=k.parseMemoizeOne),"validator"in k&&n(14,x=k.validator),"validationParser"in k&&n(15,R=k.validationParser),"pathParser"in k&&n(16,M=k.pathParser),"insideModal"in k&&n(31,E=k.insideModal),"onChange"in k&&n(17,N=k.onChange),"onRenderValue"in k&&n(18,A=k.onRenderValue),"onClassName"in k&&n(19,L=k.onClassName),"onRenderMenu"in k&&n(32,W=k.onRenderMenu),"onChangeMode"in k&&n(20,O=k.onChangeMode),"onError"in k&&n(21,I=k.onError),"onFocus"in k&&n(22,q=k.onFocus),"onBlur"in k&&n(23,P=k.onBlur),"onSortModal"in k&&n(24,_=k.onSortModal),"onTransformModal"in k&&n(25,S=k.onTransformModal),"onJSONEditorModal"in k&&n(26,$=k.onJSONEditorModal)},e.$$.update=function(){1048592&e.$$.dirty[0]&&n(42,a=[{type:"button",text:"text",title:"Switch to text mode (current mode: ".concat(h,")"),className:"jse-group-button jse-first"+(h===Lr.text||h==="code"?" jse-selected":""),onClick:function(){return O(Lr.text)}},{type:"button",text:"tree",title:"Switch to tree mode (current mode: ".concat(h,")"),className:"jse-group-button "+(h===Lr.tree?" jse-selected":""),onClick:function(){return O(Lr.tree)}},{type:"button",text:"table",title:"Switch to table mode (current mode: ".concat(h,")"),className:"jse-group-button jse-last"+(h===Lr.table?" jse-selected":""),onClick:function(){return O(Lr.table)}}]),16&e.$$.dirty[0]|2051&e.$$.dirty[1]&&n(30,s=function(k){var H=rM(k[0])?a.concat(k):a.concat(D,k);return W(H,{mode:h,modal:E})||H})},[u,c,l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,N,A,L,O,I,q,P,_,S,$,r,i,o,s,E,W,function(k){return r?r.patch(k):i?i.patch(k):o?o.patch(k):void 0},function(k){if(r)return r.expand(k);throw new Error('Method expand is not available in mode "'.concat(h,'"'))},function(k){if(o)o.openTransformModal(k);else if(r)r.openTransformModal(k);else{if(!i)throw new Error('Method transform is not available in mode "'.concat(h,'"'));i.openTransformModal(k)}},function(){if(o)return o.validate();if(r)return r.validate();if(i)return i.validate();throw new Error('Method validate is not available in mode "'.concat(h,'"'))},function(){return r?r.acceptAutoRepair():u},function(k){if(r)return r.scrollTo(k);if(i)return i.scrollTo(k);throw new Error('Method scrollTo is not available in mode "'.concat(h,'"'))},function(k){if(r)return r.findElement(k);if(i)return i.findElement(k);throw new Error('Method findElement is not available in mode "'.concat(h,'"'))},function(){o?o.focus():r?r.focus():i&&i.focus()},function(){return B.apply(this,arguments)},a,function(k){He[k?"unshift":"push"](function(){n(29,o=k)})},function(k){He[k?"unshift":"push"](function(){n(28,i=k)})},function(k){He[k?"unshift":"push"](function(){n(27,r=k)})}]}var jR=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,eet,tet,Sr,{content:0,readOnly:1,indentation:2,tabSize:3,mode:4,mainMenuBar:5,navigationBar:6,statusBar:7,askToFormat:8,escapeControlCharacters:9,escapeUnicodeCharacters:10,flattenColumns:11,parser:12,parseMemoizeOne:13,validator:14,validationParser:15,pathParser:16,insideModal:31,onChange:17,onRenderValue:18,onClassName:19,onRenderMenu:32,onChangeMode:20,onError:21,onFocus:22,onBlur:23,onSortModal:24,onTransformModal:25,onJSONEditorModal:26,patch:33,expand:34,transform:35,validate:36,acceptAutoRepair:37,scrollTo:38,findElement:39,focus:40,refresh:41},null,[-1,-1]),i}return tt(n,[{key:"patch",get:function(){return this.$$.ctx[33]}},{key:"expand",get:function(){return this.$$.ctx[34]}},{key:"transform",get:function(){return this.$$.ctx[35]}},{key:"validate",get:function(){return this.$$.ctx[36]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[37]}},{key:"scrollTo",get:function(){return this.$$.ctx[38]}},{key:"findElement",get:function(){return this.$$.ctx[39]}},{key:"focus",get:function(){return this.$$.ctx[40]}},{key:"refresh",get:function(){return this.$$.ctx[41]}}]),n}();function net(e){Ae(e,"svelte-1hibiw3",".jse-modal.svelte-1hibiw3.svelte-1hibiw3{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1hibiw3 .jse-modal-contents.svelte-1hibiw3{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1hibiw3 .jse-modal-contents .jse-actions.svelte-1hibiw3{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1hibiw3 .jse-modal-contents .jse-actions button.jse-primary.svelte-1hibiw3{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1hibiw3 .jse-modal-contents .jse-actions button.jse-primary.svelte-1hibiw3:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1hibiw3 .jse-modal-contents .jse-actions button.jse-primary.svelte-1hibiw3:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-modal-contents.svelte-1hibiw3{flex:1;display:flex;flex-direction:column;padding-top:0;--jse-theme-color:var(--jse-modal-theme-color);--jse-theme-color-highlight:var(--jse-modal-theme-color-highlight)}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-modal-contents .jse-label.svelte-1hibiw3{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-modal-contents .jse-label .jse-label-inner.svelte-1hibiw3{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-modal-contents .jse-label .jse-label-inner button.svelte-1hibiw3{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-modal-contents .jse-modal-inline-editor.svelte-1hibiw3{flex:1;min-height:0;min-width:0;display:flex}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-actions.svelte-1hibiw3{gap:var(--jse-padding);align-items:center}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-actions .jse-error.svelte-1hibiw3{flex:1;color:var(--jse-error-color)}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-actions button.jse-secondary.svelte-1hibiw3{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-secondary-background);color:var(--jse-button-secondary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-actions button.jse-secondary.svelte-1hibiw3:hover{background:var(--jse-button-secondary-background-highlight)}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 .jse-actions button.jse-secondary.svelte-1hibiw3:disabled{background:var(--jse-button-secondary-background-disabled)}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 input.svelte-1hibiw3{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 input.svelte-1hibiw3:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-jsoneditor-modal.svelte-1hibiw3 input.svelte-1hibiw3:read-only{background:var(--jse-input-background-readonly)}")}function SR(e){var t,n;return{c:function(){t=G("div"),n=Jt(e[20]),C(t,"class","jse-error svelte-1hibiw3")},m:function(r,i){ot(r,t,i),F(t,n)},p:function(r,i){1048576&i[0]&&be(n,r[20])},d:function(r){r&&it(t)}}}function CR(e){var t,n,r,i,o,a;return n=new on({props:{data:Jq}}),{c:function(){t=G("button"),jt(n.$$.fragment),r=Jt(" Back"),C(t,"type","button"),C(t,"class","jse-secondary svelte-1hibiw3")},m:function(s,u){ot(s,t,u),xt(n,t,null),F(t,r),i=!0,o||(a=Nt(t,"click",e[24]),o=!0)},p:It,i:function(s){i||(T(n.$$.fragment,s),i=!0)},o:function(s){z(n.$$.fragment,s),i=!1},d:function(s){s&&it(t),kt(n),o=!1,a()}}}function ret(e){var t,n,r;return{c:function(){(t=G("button")).textContent="Close",C(t,"type","button"),C(t,"class","jse-primary svelte-1hibiw3")},m:function(i,o){ot(i,t,o),n||(r=[Nt(t,"click",e[24]),Nr($R.call(null,t))],n=!0)},p:It,d:function(i){i&&it(t),n=!1,Mn(r)}}}function iet(e){var t,n,r;return{c:function(){(t=G("button")).textContent="Apply",C(t,"type","button"),C(t,"class","jse-primary svelte-1hibiw3")},m:function(i,o){ot(i,t,o),n||(r=[Nt(t,"click",e[23]),Nr($R.call(null,t))],n=!0)},p:It,d:function(i){i&&it(t),n=!1,Mn(r)}}}function oet(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,v,p,m,g,y,b;n=new s0({props:{title:"Edit nested content "+(e[19].length>1?" (".concat(e[19].length,")"):""),onClose:e[24]}}),h=new jR({props:{mode:le(e[19]).mode,content:le(e[19]).content,readOnly:e[0],indentation:e[1],tabSize:e[2],statusBar:e[5],askToFormat:e[6],mainMenuBar:e[3],navigationBar:e[4],escapeControlCharacters:e[7],escapeUnicodeCharacters:e[8],flattenColumns:e[9],parser:e[10],parseMemoizeOne:e[21],validator:e[11],validationParser:e[12],pathParser:e[13],insideModal:!0,onError:e[27],onChange:e[25],onChangeMode:e[26],onRenderValue:e[14],onClassName:e[15],onFocus:Zo,onBlur:Zo,onRenderMenu:e[16],onSortModal:e[17],onTransformModal:e[18],onJSONEditorModal:e[28]}});var w=e[20]&&SR(e),j=e[19].length>1&&CR(e);function x(E,N){return E[0]?ret:iet}var R=x(e),M=R(e);return{c:function(){t=G("div"),jt(n.$$.fragment),r=vt(),i=G("div"),(o=G("div")).innerHTML='<div class="jse-label-inner svelte-1hibiw3">Path</div>',a=vt(),s=G("input"),u=vt(),(c=G("div")).innerHTML='<div class="jse-label-inner svelte-1hibiw3">Contents</div>',l=vt(),f=G("div"),jt(h.$$.fragment),d=vt(),v=G("div"),w&&w.c(),p=vt(),j&&j.c(),m=vt(),M.c(),C(o,"class","jse-label svelte-1hibiw3"),C(s,"class","jse-path svelte-1hibiw3"),C(s,"type","text"),s.readOnly=!0,C(s,"title","Selected path"),s.value=e[22],C(c,"class","jse-label svelte-1hibiw3"),C(f,"class","jse-modal-inline-editor svelte-1hibiw3"),C(v,"class","jse-actions svelte-1hibiw3"),C(i,"class","jse-modal-contents svelte-1hibiw3"),C(t,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(E,N){ot(E,t,N),xt(n,t,null),F(t,r),F(t,i),F(i,o),F(i,a),F(i,s),F(i,u),F(i,c),F(i,l),F(i,f),xt(h,f,null),F(i,d),F(i,v),w&&w.m(v,null),F(v,p),j&&j.m(v,null),F(v,m),M.m(v,null),g=!0,y||(b=Nr(Qh.call(null,t,e[24])),y=!0)},p:function(E,N){var A={};524288&N[0]&&(A.title="Edit nested content "+(E[19].length>1?" (".concat(E[19].length,")"):"")),n.$set(A),(!g||4194304&N[0]&&s.value!==E[22])&&(s.value=E[22]);var L={};524288&N[0]&&(L.mode=le(E[19]).mode),524288&N[0]&&(L.content=le(E[19]).content),1&N[0]&&(L.readOnly=E[0]),2&N[0]&&(L.indentation=E[1]),4&N[0]&&(L.tabSize=E[2]),32&N[0]&&(L.statusBar=E[5]),64&N[0]&&(L.askToFormat=E[6]),8&N[0]&&(L.mainMenuBar=E[3]),16&N[0]&&(L.navigationBar=E[4]),128&N[0]&&(L.escapeControlCharacters=E[7]),256&N[0]&&(L.escapeUnicodeCharacters=E[8]),512&N[0]&&(L.flattenColumns=E[9]),1024&N[0]&&(L.parser=E[10]),2097152&N[0]&&(L.parseMemoizeOne=E[21]),2048&N[0]&&(L.validator=E[11]),4096&N[0]&&(L.validationParser=E[12]),8192&N[0]&&(L.pathParser=E[13]),16384&N[0]&&(L.onRenderValue=E[14]),32768&N[0]&&(L.onClassName=E[15]),65536&N[0]&&(L.onRenderMenu=E[16]),131072&N[0]&&(L.onSortModal=E[17]),262144&N[0]&&(L.onTransformModal=E[18]),h.$set(L),E[20]?w?w.p(E,N):((w=SR(E)).c(),w.m(v,p)):w&&(w.d(1),w=null),E[19].length>1?j?(j.p(E,N),524288&N[0]&&T(j,1)):((j=CR(E)).c(),T(j,1),j.m(v,m)):j&&(Dt(),z(j,1,1,function(){j=null}),Lt()),R===(R=x(E))&&M?M.p(E,N):(M.d(1),(M=R(E))&&(M.c(),M.m(v,null)))},i:function(E){g||(T(n.$$.fragment,E),T(h.$$.fragment,E),T(j),g=!0)},o:function(E){z(n.$$.fragment,E),z(h.$$.fragment,E),z(j),g=!1},d:function(E){E&&it(t),kt(n),kt(h),w&&w.d(),j&&j.d(),M.d(),y=!1,b()}}}function $R(e){e.focus()}function aet(e,t,n){var r,i,o,a=Dr("jsoneditor:JSONEditorModal"),s=t.content,u=t.path,c=t.onPatch,l=t.readOnly,f=t.indentation,h=t.tabSize,d=t.mainMenuBar,v=t.navigationBar,p=t.statusBar,m=t.askToFormat,g=t.escapeControlCharacters,y=t.escapeUnicodeCharacters,b=t.flattenColumns,w=t.parser,j=t.validator,x=t.validationParser,R=t.pathParser,M=t.onRenderValue,E=t.onClassName,N=t.onRenderMenu,A=t.onSortModal,L=t.onTransformModal,W=Ir("simple-modal").close,O=[{mode:q(s),content:s,relativePath:u}],I=void 0;function q(_){return Cg(_)&&An(_.json)?Lr.table:Lr.tree}function P(_){a("handleChange",_);var S=dt(dt({},le(O)),{},{content:_});n(19,O=[].concat(Oe(Ze(O)),[S]))}return e.$$set=function(_){"content"in _&&n(29,s=_.content),"path"in _&&n(30,u=_.path),"onPatch"in _&&n(31,c=_.onPatch),"readOnly"in _&&n(0,l=_.readOnly),"indentation"in _&&n(1,f=_.indentation),"tabSize"in _&&n(2,h=_.tabSize),"mainMenuBar"in _&&n(3,d=_.mainMenuBar),"navigationBar"in _&&n(4,v=_.navigationBar),"statusBar"in _&&n(5,p=_.statusBar),"askToFormat"in _&&n(6,m=_.askToFormat),"escapeControlCharacters"in _&&n(7,g=_.escapeControlCharacters),"escapeUnicodeCharacters"in _&&n(8,y=_.escapeUnicodeCharacters),"flattenColumns"in _&&n(9,b=_.flattenColumns),"parser"in _&&n(10,w=_.parser),"validator"in _&&n(11,j=_.validator),"validationParser"in _&&n(12,x=_.validationParser),"pathParser"in _&&n(13,R=_.pathParser),"onRenderValue"in _&&n(14,M=_.onRenderValue),"onClassName"in _&&n(15,E=_.onClassName),"onRenderMenu"in _&&n(16,N=_.onRenderMenu),"onSortModal"in _&&n(17,A=_.onSortModal),"onTransformModal"in _&&n(18,L=_.onTransformModal)},e.$$.update=function(){524288&e.$$.dirty[0]&&n(32,r=O.flatMap(function(_){return _.relativePath})),2&e.$$.dirty[1]&&n(22,i=Ue(r)?"(whole document)":pi(r)),1024&e.$$.dirty[0]&&n(21,o=Ol(w.parse))},[l,f,h,d,v,p,m,g,y,b,w,j,x,R,M,E,N,A,L,O,I,o,i,function(){if(a("handleApply"),!l)try{n(20,I=void 0);var _=[{op:"replace",path:Qt(le(O).relativePath),value:I6(le(O).content,w).json}];if(O.length>1){var S={json:so(I6(O[O.length-2].content,w).json,_)};n(19,O=Ze(O)),P(S)}else c(_),W()}catch($){n(20,I=$.toString())}},function(){a("handleClose"),O.length>1?(n(19,O=Ze(O)),n(20,I=void 0)):W()},P,function(_){a("handleChangeMode",_);var S=dt(dt({},le(O)),{},{mode:_});n(19,O=[].concat(Oe(Ze(O)),[S]))},function(_){n(20,I=_.toString()),console.error(_)},function(_){var S=_.content,$=_.path;a("handleJSONEditorModal",{content:S,path:$});var D={mode:q(S),content:S,relativePath:$};n(19,O=[].concat(Oe(O),[D]))},s,u,c,r]}var set=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,aet,oet,Be,{content:29,path:30,onPatch:31,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,askToFormat:6,escapeControlCharacters:7,escapeUnicodeCharacters:8,flattenColumns:9,parser:10,validator:11,validationParser:12,pathParser:13,onRenderValue:14,onClassName:15,onRenderMenu:16,onSortModal:17,onTransformModal:18},net,[-1,-1]),i}return tt(n)}();function uet(e,t,n){var r=Ir("simple-modal");return[r.open,r.close]}var cet=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,uet,null,Be,{open:0,close:1}),i}return tt(n,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),n}();function fet(e){Ae(e,"svelte-sxaskb",`:root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
|
|
Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}`)}function _R(e){var t,n,r={mode:e[1],content:e[0],readOnly:e[2],indentation:e[3],tabSize:e[4],statusBar:e[7],askToFormat:e[8],mainMenuBar:e[5],navigationBar:e[6],escapeControlCharacters:e[9],escapeUnicodeCharacters:e[10],flattenColumns:e[11],parser:e[12],parseMemoizeOne:e[25],validator:e[13],validationParser:e[14],pathParser:e[15],insideModal:!1,onError:e[19],onChange:e[26],onChangeMode:e[29],onRenderValue:e[16],onClassName:e[17],onFocus:e[27],onBlur:e[28],onRenderMenu:e[18],onSortModal:e[31],onTransformModal:e[30],onJSONEditorModal:e[32]};return t=new jR({props:r}),e[57](t),{c:function(){jt(t.$$.fragment)},m:function(i,o){xt(t,i,o),n=!0},p:function(i,o){var a={};2&o[0]&&(a.mode=i[1]),1&o[0]&&(a.content=i[0]),4&o[0]&&(a.readOnly=i[2]),8&o[0]&&(a.indentation=i[3]),16&o[0]&&(a.tabSize=i[4]),128&o[0]&&(a.statusBar=i[7]),256&o[0]&&(a.askToFormat=i[8]),32&o[0]&&(a.mainMenuBar=i[5]),64&o[0]&&(a.navigationBar=i[6]),512&o[0]&&(a.escapeControlCharacters=i[9]),1024&o[0]&&(a.escapeUnicodeCharacters=i[10]),2048&o[0]&&(a.flattenColumns=i[11]),4096&o[0]&&(a.parser=i[12]),33554432&o[0]&&(a.parseMemoizeOne=i[25]),8192&o[0]&&(a.validator=i[13]),16384&o[0]&&(a.validationParser=i[14]),32768&o[0]&&(a.pathParser=i[15]),524288&o[0]&&(a.onError=i[19]),65536&o[0]&&(a.onRenderValue=i[16]),131072&o[0]&&(a.onClassName=i[17]),262144&o[0]&&(a.onRenderMenu=i[18]),t.$set(a)},i:function(i){n||(T(t.$$.fragment,i),n=!0)},o:function(i){z(t.$$.fragment,i),n=!1},d:function(i){e[57](null),kt(t,i)}}}function het(e){var t,n,r,i,o,a=e[20];function s(l){e[56](l)}var u={};e[23]!==void 0&&(u.open=e[23]),t=new cet({props:u}),He.push(function(){return no(t,"open",s)});var c=_R(e);return{c:function(){jt(t.$$.fragment),r=vt(),i=G("div"),c.c(),C(i,"class","jse-main svelte-sxaskb"),At(i,"jse-focus",e[21])},m:function(l,f){xt(t,l,f),ot(l,r,f),ot(l,i,f),c.m(i,null),o=!0},p:function(l,f){var h={};!n&&8388608&f[0]&&(n=!0,h.open=l[23],eo(function(){return n=!1})),t.$set(h),1048576&f[0]&&Be(a,a=l[20])?(Dt(),z(c,1,1,It),Lt(),(c=_R(l)).c(),T(c,1),c.m(i,null)):c.p(l,f),(!o||2097152&f[0])&&At(i,"jse-focus",l[21])},i:function(l){o||(T(t.$$.fragment,l),T(c),o=!0)},o:function(l){z(t.$$.fragment,l),z(c),o=!1},d:function(l){kt(t,l),l&&it(r),l&&it(i),c.d(l)}}}function det(e){var t,n;return t=new l3({props:{closeOnEsc:!1,$$slots:{default:[het]},$$scope:{ctx:e}}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};50331647&i[0]|536870912&i[1]&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function vet(e){for(var t,n,r,i=[{show:(t=e[24])===null||t===void 0?void 0:t.component},v3,{closeOnEsc:!1}],o={$$slots:{default:[det]},$$scope:{ctx:e}},a=0;a<i.length;a+=1)o=hi(o,i[a]);return(n=new l3({props:o})).$on("close",e[33]),{c:function(){jt(n.$$.fragment)},m:function(s,u){xt(n,s,u),r=!0},p:function(s,u){var c,l=16777216&u[0]?ha(i,[16777216&u[0]&&{show:(c=s[24])===null||c===void 0?void 0:c.component},0&u&&zc(v3),i[2]]):{};50331647&u[0]|536870912&u[1]&&(l.$$scope={dirty:u,ctx:s}),n.$set(l)},i:function(s){r||(T(n.$$.fragment,s),r=!0)},o:function(s){z(n.$$.fragment,s),r=!1},d:function(s){kt(n,s)}}}function pet(e){var t,n;return t=new t_({props:{$$slots:{default:[vet]},$$scope:{ctx:e}}}),{c:function(){jt(t.$$.fragment)},m:function(r,i){xt(t,r,i),n=!0},p:function(r,i){var o={};67108863&i[0]|536870912&i[1]&&(o.$$scope={dirty:i,ctx:r}),t.$set(o)},i:function(r){n||(T(t.$$.fragment,r),n=!0)},o:function(r){z(t.$$.fragment,r),n=!1},d:function(r){kt(t,r)}}}function met(e,t,n){var r,i,o,a=Dr("jsoneditor:JSONEditor"),s=t.content,u=s===void 0?{text:""}:s,c=t.readOnly,l=c!==void 0&&c,f=t.indentation,h=f===void 0?2:f,d=t.tabSize,v=d===void 0?4:d,p=t.mode,m=p===void 0?Lr.tree:p,g=t.mainMenuBar,y=g===void 0||g,b=t.navigationBar,w=b===void 0||b,j=t.statusBar,x=j===void 0||j,R=t.askToFormat,M=R===void 0||R,E=t.escapeControlCharacters,N=E!==void 0&&E,A=t.escapeUnicodeCharacters,L=A!==void 0&&A,W=t.flattenColumns,O=W===void 0||W,I=t.parser,q=I===void 0?JSON:I,P=t.validator,_=P===void 0?null:P,S=t.validationParser,$=S===void 0?JSON:S,D=t.pathParser,B=D===void 0?{parse:zW,stringify:pi}:D,k=t.queryLanguages,H=k===void 0?[VW]:k,U=t.queryLanguageId,st=U===void 0?H[0].id:U,ut=t.onChangeQueryLanguage,gt=ut===void 0?Zo:ut,St=t.onChange,Pt=St===void 0?null:St,pt=t.onRenderValue,Bt=pt===void 0?qq:pt,K=t.onClassName,$t=K===void 0?function(){}:K,Kt=t.onRenderMenu,Ct=Kt===void 0?Zo:Kt,V=t.onChangeMode,Q=V===void 0?Zo:V,ft=t.onError,wt=ft===void 0?function(yt){console.error(yt),alert(yt.toString())}:ft,_t=t.onFocus,Ut=_t===void 0?Zo:_t,zt=t.onBlur,$e=zt===void 0?Zo:zt,qe=Wc(),De=!1,re=null,Ne=q;function Xe(){return(Xe=Ee(Ft().mark(function yt(Zt){var Gt;return Ft().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(a("set"),!(Gt=Sg(Zt))){fe.next=4;break}throw new Error(Gt);case 4:return n(20,qe=Wc()),n(0,u=Zt),fe.next=8,pr();case 8:case"end":return fe.stop()}},yt)}))).apply(this,arguments)}function Bn(){return(Bn=Ee(Ft().mark(function yt(Zt){var Gt;return Ft().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(a("update"),!(Gt=Sg(Zt))){fe.next=4;break}throw new Error(Gt);case 4:return n(0,u=Zt),fe.next=7,pr();case 7:case"end":return fe.stop()}},yt)}))).apply(this,arguments)}function ue(){return ue=Ee(Ft().mark(function yt(Zt){var Gt;return Ft().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(!Lu(u)){fe.next=8;break}fe.prev=1,n(0,u={json:q.parse(u.text),text:void 0}),fe.next=8;break;case 5:throw fe.prev=5,fe.t0=fe.catch(1),new Error("Cannot apply patch: current document contains invalid JSON");case 8:return Gt=i.patch(Zt),fe.next=11,pr();case 11:return fe.abrupt("return",Gt);case 12:case"end":return fe.stop()}},yt,null,[[1,5]])})),ue.apply(this,arguments)}function _n(){return(_n=Ee(Ft().mark(function yt(Zt){return Ft().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return i.expand(Zt),Gt.next=3,pr();case 3:case"end":return Gt.stop()}},yt)}))).apply(this,arguments)}function Qe(){return Qe=Ee(Ft().mark(function yt(){var Zt;return Ft().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Zt=i.acceptAutoRepair(),Gt.next=3,pr();case 3:return Gt.abrupt("return",Zt);case 4:case"end":return Gt.stop()}},yt)})),Qe.apply(this,arguments)}function gn(){return(gn=Ee(Ft().mark(function yt(Zt){return Ft().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.next=2,i.scrollTo(Zt);case 2:case"end":return Gt.stop()}},yt)}))).apply(this,arguments)}function ln(){return ir.apply(this,arguments)}function ir(){return(ir=Ee(Ft().mark(function yt(){return Ft().wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return i.focus(),Zt.next=3,pr();case 3:case"end":return Zt.stop()}},yt)}))).apply(this,arguments)}function or(){return(or=Ee(Ft().mark(function yt(){return Ft().wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,i.refresh();case 2:case"end":return Zt.stop()}},yt)}))).apply(this,arguments)}function ar(){return(ar=Ee(Ft().mark(function yt(Zt){return Ft().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return this.$set(Zt),Gt.next=3,pr();case 3:case"end":return Gt.stop()}},yt,this)}))).apply(this,arguments)}function zn(){return(zn=Ee(Ft().mark(function yt(){return Ft().wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return this.$destroy(),Zt.next=3,pr();case 3:case"end":return Zt.stop()}},yt,this)}))).apply(this,arguments)}function an(){return(an=Ee(Ft().mark(function yt(Zt){return Ft().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(m!==Zt){Gt.next=2;break}return Gt.abrupt("return");case 2:return n(1,m=Zt),Gt.next=5,pr();case 5:ln(),Q(Zt);case 7:case"end":return Gt.stop()}},yt)}))).apply(this,arguments)}function bt(yt){a("handleChangeQueryLanguage",yt),n(34,st=yt),gt(yt)}function ie(yt){var Zt=yt.id,Gt=yt.json,fe=yt.rootPath,Nn=yt.onTransform,tn=yt.onClose;l||o(NG,{id:Zt,json:Gt,rootPath:fe,indentation:h,escapeControlCharacters:N,escapeUnicodeCharacters:L,parser:q,parseMemoizeOne:r,validationParser:$,pathParser:B,queryLanguages:H,queryLanguageId:st,onChangeQueryLanguage:bt,onRenderValue:Bt,onClassName:$t,onTransform:Nn},oI,{onClose:tn})}function Le(yt){var Zt=yt.id,Gt=yt.json,fe=yt.rootPath,Nn=yt.onSort,tn=yt.onClose;l||o(zG,{id:Zt,json:Gt,rootPath:fe,onSort:Nn},iI,{onClose:tn})}return e.$$set=function(yt){"content"in yt&&n(0,u=yt.content),"readOnly"in yt&&n(2,l=yt.readOnly),"indentation"in yt&&n(3,h=yt.indentation),"tabSize"in yt&&n(4,v=yt.tabSize),"mode"in yt&&n(1,m=yt.mode),"mainMenuBar"in yt&&n(5,y=yt.mainMenuBar),"navigationBar"in yt&&n(6,w=yt.navigationBar),"statusBar"in yt&&n(7,x=yt.statusBar),"askToFormat"in yt&&n(8,M=yt.askToFormat),"escapeControlCharacters"in yt&&n(9,N=yt.escapeControlCharacters),"escapeUnicodeCharacters"in yt&&n(10,L=yt.escapeUnicodeCharacters),"flattenColumns"in yt&&n(11,O=yt.flattenColumns),"parser"in yt&&n(12,q=yt.parser),"validator"in yt&&n(13,_=yt.validator),"validationParser"in yt&&n(14,$=yt.validationParser),"pathParser"in yt&&n(15,B=yt.pathParser),"queryLanguages"in yt&&n(35,H=yt.queryLanguages),"queryLanguageId"in yt&&n(34,st=yt.queryLanguageId),"onChangeQueryLanguage"in yt&&n(36,gt=yt.onChangeQueryLanguage),"onChange"in yt&&n(37,Pt=yt.onChange),"onRenderValue"in yt&&n(16,Bt=yt.onRenderValue),"onClassName"in yt&&n(17,$t=yt.onClassName),"onRenderMenu"in yt&&n(18,Ct=yt.onRenderMenu),"onChangeMode"in yt&&n(38,Q=yt.onChangeMode),"onError"in yt&&n(19,wt=yt.onError),"onFocus"in yt&&n(39,Ut=yt.onFocus),"onBlur"in yt&&n(40,$e=yt.onBlur)},e.$$.update=function(){if(4097&e.$$.dirty[0]|16777216&e.$$.dirty[1]&&(B6(q,Ne)||(a("parser changed, recreate editor"),Cg(u)&&n(0,u={json:q.parse(Ne.stringify(u.json))}),n(55,Ne=q),n(20,qe=Wc()))),1&e.$$.dirty[0]){var yt=Sg(u);yt&&console.error("Error: "+yt)}4096&e.$$.dirty[0]&&n(25,r=Ol(q.parse)),2&e.$$.dirty[0]&&(a("mode changed to",m),m==="code"&&console.warn('Deprecation warning: "code" mode is renamed to "text". Please use mode="text" instead.'))},[u,m,l,h,v,y,w,x,M,N,L,O,q,_,$,B,Bt,$t,Ct,wt,qe,De,i,o,re,r,function(yt,Zt,Gt){n(0,u=yt),Pt&&Pt(yt,Zt,Gt)},function(){n(21,De=!0),Ut&&Ut()},function(){n(21,De=!1),$e&&$e()},function(yt){return an.apply(this,arguments)},ie,Le,function(yt){var Zt=yt.content,Gt=yt.path,fe=yt.onPatch,Nn=yt.onClose;a("onJSONEditorModal",{content:Zt,path:Gt}),n(24,re={component:c3(set,{content:Zt,path:Gt,onPatch:fe,readOnly:l,indentation:h,tabSize:v,mainMenuBar:y,navigationBar:w,statusBar:x,askToFormat:M,escapeControlCharacters:N,escapeUnicodeCharacters:L,flattenColumns:O,parser:q,validator:void 0,validationParser:$,pathParser:B,onRenderValue:Bt,onClassName:$t,onRenderMenu:Ct,onSortModal:Le,onTransformModal:ie}),callbacks:{onClose:Nn}})},function(){var yt,Zt,Gt;(yt=re)===null||yt===void 0||(Zt=yt.callbacks)===null||Zt===void 0||(Gt=Zt.onClose)===null||Gt===void 0||Gt.call(Zt),n(24,re=null)},st,H,gt,Pt,Q,Ut,$e,function(){return u},function(yt){return Xe.apply(this,arguments)},function(yt){return Bn.apply(this,arguments)},function(yt){return ue.apply(this,arguments)},function(yt){return _n.apply(this,arguments)},function(yt){i.transform(yt)},function(){return i.validate()},function(){return Qe.apply(this,arguments)},function(yt){return gn.apply(this,arguments)},function(yt){return i.findElement(yt)},ln,function(){return or.apply(this,arguments)},function(yt){return ar.apply(this,arguments)},function(){return zn.apply(this,arguments)},Ne,function(yt){n(23,o=yt)},function(yt){He[yt?"unshift":"push"](function(){n(22,i=yt)})}]}var get=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,met,pet,Be,{content:0,readOnly:2,indentation:3,tabSize:4,mode:1,mainMenuBar:5,navigationBar:6,statusBar:7,askToFormat:8,escapeControlCharacters:9,escapeUnicodeCharacters:10,flattenColumns:11,parser:12,validator:13,validationParser:14,pathParser:15,queryLanguages:35,queryLanguageId:34,onChangeQueryLanguage:36,onChange:37,onRenderValue:16,onClassName:17,onRenderMenu:18,onChangeMode:38,onError:19,onFocus:39,onBlur:40,get:41,set:42,update:43,patch:44,expand:45,transform:46,validate:47,acceptAutoRepair:48,scrollTo:49,findElement:50,focus:51,refresh:52,updateProps:53,destroy:54},fet,[-1,-1]),i}return tt(n,[{key:"get",get:function(){return this.$$.ctx[41]}},{key:"set",get:function(){return this.$$.ctx[42]}},{key:"update",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"expand",get:function(){return this.$$.ctx[45]}},{key:"transform",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[48]}},{key:"scrollTo",get:function(){return this.$$.ctx[49]}},{key:"findElement",get:function(){return this.$$.ctx[50]}},{key:"focus",get:function(){return this.$$.ctx[51]}},{key:"refresh",get:function(){return this.$$.ctx[52]}},{key:"updateProps",get:function(){return this.$$.ctx[53]}},{key:"destroy",get:function(){return this.$$.ctx[54]}}]),n}();function yet(e){Ae(e,"svelte-rc6e9m",".jse-value.jse-string.svelte-rc6e9m{color:var(--jse-value-color-string)}.jse-value.jse-object.svelte-rc6e9m,.jse-value.jse-array.svelte-rc6e9m{min-width:16px;color:var(--jse-delimiter-color)}.jse-value.jse-number.svelte-rc6e9m{color:var(--jse-value-color-number)}.jse-value.jse-boolean.svelte-rc6e9m{color:var(--jse-value-color-boolean)}.jse-value.jse-null.svelte-rc6e9m{color:var(--jse-value-color-null)}.jse-value.jse-invalid.svelte-rc6e9m{color:var(--jse-text-color)}.jse-value.jse-url.svelte-rc6e9m{color:var(--jse-value-color-url);text-decoration:underline}.jse-enum-value.svelte-rc6e9m{background:var(--jse-hover-background-color);border:none;padding:0;font-family:inherit;font-size:inherit;cursor:pointer;outline:none}.jse-enum-value.jse-selected.svelte-rc6e9m{background:var(--jse-selection-background-color);color:inherit}.jse-enum-value.jse-value.svelte-rc6e9m:focus{color:var(--jse-text-color)}.jse-json-node.jse-selected .jse-enum-value.svelte-rc6e9m{background:transparent}")}function OR(e,t,n){var r=e.slice();return r[13]=t[n],r}function MR(e){var t,n,r,i=e[13].text+"";return{c:function(){t=G("option"),n=Jt(i),t.__value=r=e[13].value,t.value=t.__value},m:function(o,a){ot(o,t,a),F(t,n)},p:function(o,a){4&a&&i!==(i=o[13].text+"")&&be(n,i),4&a&&r!==(r=o[13].value)&&(t.__value=r,t.value=t.__value)},d:function(o){o&&it(t)}}}function bet(e){for(var t,n,r,i,o=e[2],a=[],s=0;s<o.length;s+=1)a[s]=MR(OR(e,o,s));return{c:function(){t=G("select");for(var u=0;u<a.length;u+=1)a[u].c();C(t,"class",n=Wn("jse-enum-value ".concat(bl(e[4],e[0])))+" svelte-rc6e9m"),e[4]===void 0&&ks(function(){return e[10].call(t)}),At(t,"jse-selected",Ge(e[1]))},m:function(u,c){ot(u,t,c);for(var l=0;l<a.length;l+=1)a[l]&&a[l].m(t,null);Zj(t,e[4],!0),e[11](t),r||(i=[Nt(t,"change",e[10]),Nt(t,"change",e[5]),Nt(t,"mousedown",wet)],r=!0)},p:function(u,c){var l=ke(c,1)[0];if(4&l){var f;for(o=u[2],f=0;f<o.length;f+=1){var h=OR(u,o,f);a[f]?a[f].p(h,l):(a[f]=MR(h),a[f].c(),a[f].m(t,null))}for(;f<a.length;f+=1)a[f].d(1);a.length=o.length}17&l&&n!==(n=Wn("jse-enum-value ".concat(bl(u[4],u[0])))+" svelte-rc6e9m")&&C(t,"class",n),16&l&&Zj(t,u[4]),19&l&&At(t,"jse-selected",Ge(u[1]))},i:It,o:It,d:function(u){u&&it(t),ur(a,u),e[11](null),r=!1,Mn(i)}}}function wet(e){e.stopPropagation()}function xet(e,t,n){var r,i=t.path,o=t.value,a=t.parser,s=t.readOnly,u=t.selection,c=t.onPatch,l=t.options,f=o;return e.$$set=function(h){"path"in h&&n(6,i=h.path),"value"in h&&n(7,o=h.value),"parser"in h&&n(0,a=h.parser),"readOnly"in h&&n(8,s=h.readOnly),"selection"in h&&n(1,u=h.selection),"onPatch"in h&&n(9,c=h.onPatch),"options"in h&&n(2,l=h.options)},e.$$.update=function(){128&e.$$.dirty&&n(4,f=o),2&e.$$.dirty&&function(h){h&&r&&r.focus()}(u)},[a,u,l,r,f,function(h){h.stopPropagation(),s||c([{op:"replace",path:Qt(i),value:f}])},i,o,s,c,function(){var h;h=this.querySelector(":checked"),f=h&&h.__value,n(4,f),n(7,o)},function(h){He[h?"unshift":"push"](function(){n(3,r=h),n(2,l)})}]}var ket=function(e){Ot(n,he);var t=Mt(n);function n(r){var i;return X(this,n),de(ce(i=t.call(this)),r,xet,bet,Be,{path:6,value:7,parser:0,readOnly:8,selection:1,onPatch:9,options:2},yet),i}return tt(n)}();function jet(e,t,n){var r=Mc(e,t||{},n);return r?function(i){if(Array.isArray(i.enum))return i.enum;var o=i.oneOf||i.anyOf||i.allOf;if(Array.isArray(o)){var a=o.filter(function(s){return s.enum});if(a.length>0)return a[0].enum}return null}(r):null}function Mc(e,t,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,i=n.slice(1,n.length),o=n[0],a=[r],s=0,u=[r.oneOf,r.anyOf,r.allOf];s<u.length;s++){var c=u[s];Array.isArray(c)&&(a=a.concat(c))}var l,f=at(a);try{for(f.s();!(l=f.n()).done;){if("$ref"in(r=l.value)&&typeof r.$ref=="string"){var h,d=r.$ref;if(d in t)r=t[d];else{if(!d.startsWith("#/")){if(((h=d.match(/#\//g))===null||h===void 0?void 0:h.length)===1){var v=ke(d.split("#/"),2),p=v[0],m=v[1];if(p in t){var g=t[p],y={$ref:"#/".concat(m)},b=[];return b.push(o),i.length>0&&b.push.apply(b,Oe(i)),Mc(g,t,b,y)}throw Error("Unable to resolve reference ".concat(d))}throw Error("Unable to resolve reference ".concat(d))}var w=d.substring(2).split("/");r=e;var j,x=at(w);try{for(x.s();!(j=x.n()).done;){var R=j.value;if(!(R in r))throw Error("Unable to resolve reference ".concat(d));r=r[R]}}catch(E){x.e(E)}finally{x.f()}}}if(o===void 0)return r;if(ee(r.properties)==="object"&&r.properties!==null&&o in r.properties)return Mc(e,t,i,r=r.properties[o]);if(ee(r.patternProperties)==="object"&&r.patternProperties!==null){for(var M in r.patternProperties)if(o.match(M))return Mc(e,t,i,r=r.patternProperties[M])}if(ee(r.additionalProperties)==="object")return Mc(e,t,i,r=r.additionalProperties);if(ee(r.items)==="object"&&r.items!==null)return Mc(e,t,i,r=r.items)}}catch(E){f.e(E)}finally{f.f()}return null}function Drt(e,t,n){var r=jet(t,n,e.path);if(r){var i=e.value,o=e.path,a=e.selection,s=e.parser,u=e.readOnly,c=e.onPatch,l=r.map(function(h){return{value:h,text:h}}),f=r.includes(e.value)?l:[{value:i,text:i}].concat(l);return[{component:ket,props:{value:i,path:o,selection:a,parser:s,readOnly:u,onPatch:c,options:f}}]}return null}var ER,$y={exports:{}},AR={},_a={},eu={},PR={},TR={},RR={};function jv(){return ER||(ER=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=tt(function l(){X(this,l)});e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=function(l){Ot(h,l);var f=Mt(h);function h(d){var v;if(X(this,h),v=f.call(this),!e.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");return v.str=d,v}return tt(h,[{key:"toString",value:function(){return this.str}},{key:"emptyStr",value:function(){return!1}},{key:"names",get:function(){return fi({},this.str,1)}}]),h}(t);e.Name=n;var r=function(l){Ot(h,l);var f=Mt(h);function h(d){var v;return X(this,h),(v=f.call(this))._items=typeof d=="string"?[d]:d,v}return tt(h,[{key:"toString",value:function(){return this.str}},{key:"emptyStr",value:function(){if(this._items.length>1)return!1;var d=this._items[0];return d===""||d==='""'}},{key:"str",get:function(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce(function(v,p){return"".concat(v).concat(p)},"")}},{key:"names",get:function(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce(function(v,p){return p instanceof n&&(v[p.str]=(v[p.str]||0)+1),v},{})}}]),h}(t);function i(l){for(var f=[l[0]],h=0,d=arguments.length,v=new Array(d>1?d-1:0),p=1;p<d;p++)v[p-1]=arguments[p];for(;h<v.length;)s(f,v[h]),f.push(l[++h]);return new r(f)}e._Code=r,e.nil=new r(""),e._=i;var o=new r("+");function a(l){for(var f=[c(l[0])],h=0,d=arguments.length,v=new Array(d>1?d-1:0),p=1;p<d;p++)v[p-1]=arguments[p];for(;h<v.length;)f.push(o),s(f,v[h]),f.push(o,c(l[++h]));return function(m){for(var g=1;g<m.length-1;){if(m[g]===o){var y=u(m[g-1],m[g+1]);if(y!==void 0){m.splice(g-1,3,y);continue}m[g++]="+"}g++}}(f),new r(f)}function s(l,f){f instanceof r?l.push.apply(l,Oe(f._items)):f instanceof n?l.push(f):l.push(function(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:c(Array.isArray(h)?h.join(","):h)}(f))}function u(l,f){return f==='""'?l:l==='""'?f:typeof l=="string"?f instanceof n||l[l.length-1]!=='"'?void 0:typeof f!="string"?"".concat(l.slice(0,-1)).concat(f,'"'):f[0]==='"'?l.slice(0,-1)+f.slice(1):void 0:typeof f!="string"||f[0]!=='"'||l instanceof n?void 0:'"'.concat(l).concat(f.slice(1))}function c(l){return JSON.stringify(l).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=a,e.addCodeArg=s,e.strConcat=function(l,f){return f.emptyStr()?l:l.emptyStr()?f:a(kb||(kb=et(["","",""])),l,f)},e.stringify=function(l){return new r(c(l))},e.safeStringify=c,e.getProperty=function(l){return typeof l=="string"&&e.IDENTIFIER.test(l)?new r(".".concat(l)):i(jb||(jb=et(["[","]"])),l)},e.getEsmExportName=function(l){if(typeof l=="string"&&e.IDENTIFIER.test(l))return new r("".concat(l));throw new Error("CodeGen: invalid export name: ".concat(l,", use explicit $id name mapping"))},e.regexpCode=function(l){return new r(l.toString())}}(RR)),RR}var NR,IR,DR={};function LR(){return NR||(NR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t,n=jv(),r=function(u){Ot(l,uu(Error));var c=Mt(l);function l(f){var h;return X(this,l),(h=c.call(this,'CodeGen: "code" for '.concat(f," not defined"))).value=f.value,h}return tt(l)}();(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(t=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};var i=function(){function u(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=c.prefixes,f=c.parent;X(this,u),this._names={},this._prefixes=l,this._parent=f}return tt(u,[{key:"toName",value:function(c){return c instanceof n.Name?c:this.name(c)}},{key:"name",value:function(c){return new n.Name(this._newName(c))}},{key:"_newName",value:function(c){var l=this._names[c]||this._nameGroup(c);return"".concat(c).concat(l.index++)}},{key:"_nameGroup",value:function(c){var l,f;if(!((f=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||f===void 0)&&f.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),u}();e.Scope=i;var o=function(u){Ot(l,u);var c=Mt(l);function l(f,h){var d;return X(this,l),(d=c.call(this,h)).prefix=f,d}return tt(l,[{key:"setValue",value:function(f,h){var d=h.property,v=h.itemIndex;this.value=f,this.scopePath=(0,n._)(Sb||(Sb=et([".","[","]"])),new n.Name(d),v)}}]),l}(n.Name);e.ValueScopeName=o;var a=(0,n._)(Cb||(Cb=et([`
|
|
`],["\\n"]))),s=function(u){Ot(l,u);var c=Mt(l);function l(f){var h;return X(this,l),(h=c.call(this,f))._values={},h._scope=f.scope,h.opts=dt(dt({},f),{},{_n:f.lines?a:n.nil}),h}return tt(l,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(f){return new o(f,this._newName(f))}},{key:"value",value:function(f,h){var d;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");var v=this.toName(f),p=v.prefix,m=(d=h.key)!==null&&d!==void 0?d:h.ref,g=this._values[p];if(g){var y=g.get(m);if(y)return y}else g=this._values[p]=new Map;g.set(m,v);var b=this._scope[p]||(this._scope[p]=[]),w=b.length;return b[w]=h.ref,v.setValue(h,{property:p,itemIndex:w}),v}},{key:"getValue",value:function(f,h){var d=this._values[f];if(d)return d.get(h)}},{key:"scopeRefs",value:function(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._values;return this._reduceValues(h,function(d){if(d.scopePath===void 0)throw new Error('CodeGen: name "'.concat(d,'" has no value'));return(0,n._)($b||($b=et(["","",""])),f,d.scopePath)})}},{key:"scopeCode",value:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._values,h=arguments.length>1?arguments[1]:void 0,d=arguments.length>2?arguments[2]:void 0;return this._reduceValues(f,function(v){if(v.value===void 0)throw new Error('CodeGen: name "'.concat(v,'" has no value'));return v.value.code},h,d)}},{key:"_reduceValues",value:function(f,h){var d=this,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=arguments.length>3?arguments[3]:void 0,m=n.nil,g=function(){var b=f[y];if(!b)return"continue";var w=v[y]=v[y]||new Map;b.forEach(function(j){if(!w.has(j)){w.set(j,t.Started);var x=h(j);if(x){var R=d.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,n._)(_b||(_b=et(["",""," "," = ",";",""])),m,R,j,x,d.opts._n)}else{if(!(x=p==null?void 0:p(j)))throw new r(j);m=(0,n._)(Ob||(Ob=et(["","","",""])),m,x,d.opts._n)}w.set(j,t.Completed)}})};for(var y in f)g();return m}}]),l}(i);e.ValueScope=s}(DR)),DR}function pn(){return IR||(IR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=jv(),n=LR(),r=jv();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=LR();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var o=function(){function D(){X(this,D)}return tt(D,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(B,k){return this}}]),D}(),a=function(D){Ot(k,D);var B=Mt(k);function k(H,U,st){var ut;return X(this,k),(ut=B.call(this)).varKind=H,ut.name=U,ut.rhs=st,ut}return tt(k,[{key:"render",value:function(H){var U=H.es5,st=H._n,ut=U?n.varKinds.var:this.varKind,gt=this.rhs===void 0?"":" = ".concat(this.rhs);return"".concat(ut," ").concat(this.name).concat(gt,";")+st}},{key:"optimizeNames",value:function(H,U){if(H[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,H,U)),this}},{key:"names",get:function(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}]),k}(o),s=function(D){Ot(k,D);var B=Mt(k);function k(H,U,st){var ut;return X(this,k),(ut=B.call(this)).lhs=H,ut.rhs=U,ut.sideEffects=st,ut}return tt(k,[{key:"render",value:function(H){var U=H._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+U}},{key:"optimizeNames",value:function(H,U){if(!(this.lhs instanceof t.Name)||H[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,H,U),this}},{key:"names",get:function(){return W(this.lhs instanceof t.Name?{}:dt({},this.lhs.names),this.rhs)}}]),k}(o),u=function(D){Ot(k,D);var B=Mt(k);function k(H,U,st,ut){var gt;return X(this,k),(gt=B.call(this,H,st,ut)).op=U,gt}return tt(k,[{key:"render",value:function(H){var U=H._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+U}}]),k}(s),c=function(D){Ot(k,D);var B=Mt(k);function k(H){var U;return X(this,k),(U=B.call(this)).label=H,U.names={},U}return tt(k,[{key:"render",value:function(H){var U=H._n;return"".concat(this.label,":")+U}}]),k}(o),l=function(D){Ot(k,D);var B=Mt(k);function k(H){var U;return X(this,k),(U=B.call(this)).label=H,U.names={},U}return tt(k,[{key:"render",value:function(H){var U=H._n,st=this.label?" ".concat(this.label):"";return"break".concat(st,";")+U}}]),k}(o),f=function(D){Ot(k,D);var B=Mt(k);function k(H){var U;return X(this,k),(U=B.call(this)).error=H,U}return tt(k,[{key:"render",value:function(H){var U=H._n;return"throw ".concat(this.error,";")+U}},{key:"names",get:function(){return this.error.names}}]),k}(o),h=function(D){Ot(k,D);var B=Mt(k);function k(H){var U;return X(this,k),(U=B.call(this)).code=H,U}return tt(k,[{key:"render",value:function(H){var U=H._n;return"".concat(this.code,";")+U}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(H,U){return this.code=O(this.code,H,U),this}},{key:"names",get:function(){return this.code instanceof t._CodeOrName?this.code.names:{}}}]),k}(o),d=function(D){Ot(k,D);var B=Mt(k);function k(){var H,U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return X(this,k),(H=B.call(this)).nodes=U,H}return tt(k,[{key:"render",value:function(H){return this.nodes.reduce(function(U,st){return U+st.render(H)},"")}},{key:"optimizeNodes",value:function(){for(var H=this.nodes,U=H.length;U--;){var st=H[U].optimizeNodes();Array.isArray(st)?H.splice.apply(H,[U,1].concat(Oe(st))):st?H[U]=st:H.splice(U,1)}return H.length>0?this:void 0}},{key:"optimizeNames",value:function(H,U){for(var st=this.nodes,ut=st.length;ut--;){var gt=st[ut];gt.optimizeNames(H,U)||(I(H,gt.names),st.splice(ut,1))}return st.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(H,U){return L(H,U.names)},{})}}]),k}(o),v=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k,[{key:"render",value:function(H){return"{"+H._n+fn(Ke(k.prototype),"render",this).call(this,H)+"}"+H._n}}]),k}(d),p=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k)}(d),m=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k)}(v);m.kind="else";var g=function(D){Ot(k,D);var B=Mt(k);function k(H,U){var st;return X(this,k),(st=B.call(this,U)).condition=H,st}return tt(k,[{key:"render",value:function(H){var U="if(".concat(this.condition,")")+fn(Ke(k.prototype),"render",this).call(this,H);return this.else&&(U+="else "+this.else.render(H)),U}},{key:"optimizeNodes",value:function(){fn(Ke(k.prototype),"optimizeNodes",this).call(this);var H=this.condition;if(H===!0)return this.nodes;var U=this.else;if(U){var st=U.optimizeNodes();U=this.else=Array.isArray(st)?new m(st):st}return U?H===!1?U instanceof k?U:U.nodes:this.nodes.length?this:new k(q(H),U instanceof k?[U]:U.nodes):H!==!1&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(H,U){var st;if(this.else=(st=this.else)===null||st===void 0?void 0:st.optimizeNames(H,U),fn(Ke(k.prototype),"optimizeNames",this).call(this,H,U)||this.else)return this.condition=O(this.condition,H,U),this}},{key:"names",get:function(){var H=fn(Ke(k.prototype),"names",this);return W(H,this.condition),this.else&&L(H,this.else.names),H}}]),k}(v);g.kind="if";var y=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k)}(v);y.kind="for";var b=function(D){Ot(k,D);var B=Mt(k);function k(H){var U;return X(this,k),(U=B.call(this)).iteration=H,U}return tt(k,[{key:"render",value:function(H){return"for(".concat(this.iteration,")")+fn(Ke(k.prototype),"render",this).call(this,H)}},{key:"optimizeNames",value:function(H,U){if(fn(Ke(k.prototype),"optimizeNames",this).call(this,H,U))return this.iteration=O(this.iteration,H,U),this}},{key:"names",get:function(){return L(fn(Ke(k.prototype),"names",this),this.iteration.names)}}]),k}(y),w=function(D){Ot(k,D);var B=Mt(k);function k(H,U,st,ut){var gt;return X(this,k),(gt=B.call(this)).varKind=H,gt.name=U,gt.from=st,gt.to=ut,gt}return tt(k,[{key:"render",value:function(H){var U=H.es5?n.varKinds.var:this.varKind,st=this.name,ut=this.from,gt=this.to;return"for(".concat(U," ").concat(st,"=").concat(ut,"; ").concat(st,"<").concat(gt,"; ").concat(st,"++)")+fn(Ke(k.prototype),"render",this).call(this,H)}},{key:"names",get:function(){var H=W(fn(Ke(k.prototype),"names",this),this.from);return W(H,this.to)}}]),k}(y),j=function(D){Ot(k,D);var B=Mt(k);function k(H,U,st,ut){var gt;return X(this,k),(gt=B.call(this)).loop=H,gt.varKind=U,gt.name=st,gt.iterable=ut,gt}return tt(k,[{key:"render",value:function(H){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+fn(Ke(k.prototype),"render",this).call(this,H)}},{key:"optimizeNames",value:function(H,U){if(fn(Ke(k.prototype),"optimizeNames",this).call(this,H,U))return this.iterable=O(this.iterable,H,U),this}},{key:"names",get:function(){return L(fn(Ke(k.prototype),"names",this),this.iterable.names)}}]),k}(y),x=function(D){Ot(k,D);var B=Mt(k);function k(H,U,st){var ut;return X(this,k),(ut=B.call(this)).name=H,ut.args=U,ut.async=st,ut}return tt(k,[{key:"render",value:function(H){var U=this.async?"async ":"";return"".concat(U,"function ").concat(this.name,"(").concat(this.args,")")+fn(Ke(k.prototype),"render",this).call(this,H)}}]),k}(v);x.kind="func";var R=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k,[{key:"render",value:function(H){return"return "+fn(Ke(k.prototype),"render",this).call(this,H)}}]),k}(d);R.kind="return";var M=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k,[{key:"render",value:function(H){var U="try"+fn(Ke(k.prototype),"render",this).call(this,H);return this.catch&&(U+=this.catch.render(H)),this.finally&&(U+=this.finally.render(H)),U}},{key:"optimizeNodes",value:function(){var H,U;return fn(Ke(k.prototype),"optimizeNodes",this).call(this),(H=this.catch)===null||H===void 0||H.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}},{key:"optimizeNames",value:function(H,U){var st,ut;return fn(Ke(k.prototype),"optimizeNames",this).call(this,H,U),(st=this.catch)===null||st===void 0||st.optimizeNames(H,U),(ut=this.finally)===null||ut===void 0||ut.optimizeNames(H,U),this}},{key:"names",get:function(){var H=fn(Ke(k.prototype),"names",this);return this.catch&&L(H,this.catch.names),this.finally&&L(H,this.finally.names),H}}]),k}(v),E=function(D){Ot(k,D);var B=Mt(k);function k(H){var U;return X(this,k),(U=B.call(this)).error=H,U}return tt(k,[{key:"render",value:function(H){return"catch(".concat(this.error,")")+fn(Ke(k.prototype),"render",this).call(this,H)}}]),k}(v);E.kind="catch";var N=function(D){Ot(k,D);var B=Mt(k);function k(){return X(this,k),B.apply(this,arguments)}return tt(k,[{key:"render",value:function(H){return"finally"+fn(Ke(k.prototype),"render",this).call(this,H)}}]),k}(v);N.kind="finally";var A=function(){function D(B){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};X(this,D),this._values={},this._blockStarts=[],this._constants={},this.opts=dt(dt({},k),{},{_n:k.lines?`
|
|
`:""}),this._extScope=B,this._scope=new n.Scope({parent:B}),this._nodes=[new p]}return tt(D,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(B){return this._scope.name(B)}},{key:"scopeName",value:function(B){return this._extScope.name(B)}},{key:"scopeValue",value:function(B,k){var H=this._extScope.value(B,k);return(this._values[H.prefix]||(this._values[H.prefix]=new Set)).add(H),H}},{key:"getScopeValue",value:function(B,k){return this._extScope.getValue(B,k)}},{key:"scopeRefs",value:function(B){return this._extScope.scopeRefs(B,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(B,k,H,U){var st=this._scope.toName(k);return H!==void 0&&U&&(this._constants[st.str]=H),this._leafNode(new a(B,st,H)),st}},{key:"const",value:function(B,k,H){return this._def(n.varKinds.const,B,k,H)}},{key:"let",value:function(B,k,H){return this._def(n.varKinds.let,B,k,H)}},{key:"var",value:function(B,k,H){return this._def(n.varKinds.var,B,k,H)}},{key:"assign",value:function(B,k,H){return this._leafNode(new s(B,k,H))}},{key:"add",value:function(B,k){return this._leafNode(new u(B,e.operators.ADD,k))}},{key:"code",value:function(B){return typeof B=="function"?B():B!==t.nil&&this._leafNode(new h(B)),this}},{key:"object",value:function(){for(var B=["{"],k=arguments.length,H=new Array(k),U=0;U<k;U++)H[U]=arguments[U];for(var st=0,ut=H;st<ut.length;st++){var gt=ke(ut[st],2),St=gt[0],Pt=gt[1];B.length>1&&B.push(","),B.push(St),(St!==Pt||this.opts.es5)&&(B.push(":"),(0,t.addCodeArg)(B,Pt))}return B.push("}"),new t._Code(B)}},{key:"if",value:function(B,k,H){if(this._blockNode(new g(B)),k&&H)this.code(k).else().code(H).endIf();else if(k)this.code(k).endIf();else if(H)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(B){return this._elseNode(new g(B))}},{key:"else",value:function(){return this._elseNode(new m)}},{key:"endIf",value:function(){return this._endBlockNode(g,m)}},{key:"_for",value:function(B,k){return this._blockNode(B),k&&this.code(k).endFor(),this}},{key:"for",value:function(B,k){return this._for(new b(B),k)}},{key:"forRange",value:function(B,k,H,U){var st=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.opts.es5?n.varKinds.var:n.varKinds.let,ut=this._scope.toName(B);return this._for(new w(st,ut,k,H),function(){return U(ut)})}},{key:"forOf",value:function(B,k,H){var U=this,st=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n.varKinds.const,ut=this._scope.toName(B);if(this.opts.es5){var gt=k instanceof t.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,t._)(Mb||(Mb=et(["",".length"])),gt),function(St){U.var(ut,(0,t._)(Eb||(Eb=et(["","[","]"])),gt,St)),H(ut)})}return this._for(new j("of",st,ut,k),function(){return H(ut)})}},{key:"forIn",value:function(B,k,H){var U=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.es5?n.varKinds.var:n.varKinds.const;if(this.opts.ownProperties)return this.forOf(B,(0,t._)(Ab||(Ab=et(["Object.keys(",")"])),k),H);var st=this._scope.toName(B);return this._for(new j("in",U,st,k),function(){return H(st)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(B){return this._leafNode(new c(B))}},{key:"break",value:function(B){return this._leafNode(new l(B))}},{key:"return",value:function(B){var k=new R;if(this._blockNode(k),this.code(B),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}},{key:"try",value:function(B,k,H){if(!k&&!H)throw new Error('CodeGen: "try" without "catch" and "finally"');var U=new M;if(this._blockNode(U),this.code(B),k){var st=this.name("e");this._currNode=U.catch=new E(st),k(st)}return H&&(this._currNode=U.finally=new N,this.code(H)),this._endBlockNode(E,N)}},{key:"throw",value:function(B){return this._leafNode(new f(B))}},{key:"block",value:function(B,k){return this._blockStarts.push(this._nodes.length),B&&this.code(B).endBlock(k),this}},{key:"endBlock",value:function(B){var k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");var H=this._nodes.length-k;if(H<0||B!==void 0&&H!==B)throw new Error("CodeGen: wrong number of nodes: ".concat(H," vs ").concat(B," expected"));return this._nodes.length=k,this}},{key:"func",value:function(B){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.nil,H=arguments.length>2?arguments[2]:void 0,U=arguments.length>3?arguments[3]:void 0;return this._blockNode(new x(B,k,H)),U&&this.code(U).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(x)}},{key:"optimize",value:function(){for(var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;B-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(B){return this._currNode.nodes.push(B),this}},{key:"_blockNode",value:function(B){this._currNode.nodes.push(B),this._nodes.push(B)}},{key:"_endBlockNode",value:function(B,k){var H=this._currNode;if(H instanceof B||k&&H instanceof k)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(k?"".concat(B.kind,"/").concat(k.kind):B.kind,'"'))}},{key:"_elseNode",value:function(B){var k=this._currNode;if(!(k instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=B,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var B=this._nodes;return B[B.length-1]},set:function(B){var k=this._nodes;k[k.length-1]=B}}]),D}();function L(D,B){for(var k in B)D[k]=(D[k]||0)+(B[k]||0);return D}function W(D,B){return B instanceof t._CodeOrName?L(D,B.names):D}function O(D,B,k){return D instanceof t.Name?H(D):function(U){return U instanceof t._Code&&U._items.some(function(st){return st instanceof t.Name&&B[st.str]===1&&k[st.str]!==void 0})}(D)?new t._Code(D._items.reduce(function(U,st){return st instanceof t.Name&&(st=H(st)),st instanceof t._Code?U.push.apply(U,Oe(st._items)):U.push(st),U},[])):D;function H(U){var st=k[U.str];return st===void 0||B[U.str]!==1?U:(delete B[U.str],st)}}function I(D,B){for(var k in B)D[k]=(D[k]||0)-(B[k]||0)}function q(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:(0,t._)(Pb||(Pb=et(["!",""])),$(D))}e.CodeGen=A,e.not=q;var P=S(e.operators.AND);e.and=function(){for(var D=arguments.length,B=new Array(D),k=0;k<D;k++)B[k]=arguments[k];return B.reduce(P)};var _=S(e.operators.OR);function S(D){return function(B,k){return B===t.nil?k:k===t.nil?B:(0,t._)(Tb||(Tb=et([""," "," ",""])),$(B),D,$(k))}}function $(D){return D instanceof t.Name?D:(0,t._)(Rb||(Rb=et(["(",")"])),D)}e.or=function(){for(var D=arguments.length,B=new Array(D),k=0;k<D;k++)B[k]=arguments[k];return B.reduce(_)}}(TR)),TR}var Sn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=pn(),n=jv();function r(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.schema,p=d.opts,m=d.self;if(p.strictSchema&&typeof v!="boolean"){var g=m.RULES.keywords;for(var y in v)g[y]||h(d,'unknown keyword: "'.concat(y,'"'))}}function i(d,v){if(typeof d=="boolean")return!d;for(var p in d)if(v[p])return!0;return!1}function o(d){return typeof d=="number"?"".concat(d):d.replace(/~/g,"~0").replace(/\//g,"~1")}function a(d){return d.replace(/~1/g,"/").replace(/~0/g,"~")}function s(d){var v=d.mergeNames,p=d.mergeToName,m=d.mergeValues,g=d.resultToName;return function(y,b,w,j){var x=w===void 0?b:w instanceof t.Name?(b instanceof t.Name?v(y,b,w):p(y,b,w),w):b instanceof t.Name?(p(y,w,b),b):m(b,w);return j!==t.Name||x instanceof t.Name?x:g(y,x)}}function u(d,v){if(v===!0)return d.var("props",!0);var p=d.var("props",(0,t._)(Jb||(Jb=et(["{}"]))));return v!==void 0&&c(d,p,v),p}function c(d,v,p){Object.keys(p).forEach(function(m){return d.assign((0,t._)(Kb||(Kb=et(["","",""])),v,(0,t.getProperty)(m)),!0)})}e.toHash=function(d){var v,p={},m=at(d);try{for(m.s();!(v=m.n()).done;)p[v.value]=!0}catch(g){m.e(g)}finally{m.f()}return p},e.alwaysValidSchema=function(d,v){return typeof v=="boolean"?v:Object.keys(v).length===0||(r(d,v),!i(v,d.self.RULES.all))},e.checkUnknownRules=r,e.schemaHasRules=i,e.schemaHasRulesButRef=function(d,v){if(typeof d=="boolean")return!d;for(var p in d)if(p!=="$ref"&&v.all[p])return!0;return!1},e.schemaRefOrVal=function(d,v,p,m){var g=d.topSchemaRef,y=d.schemaPath;if(!m){if(typeof v=="number"||typeof v=="boolean")return v;if(typeof v=="string")return(0,t._)(Nb||(Nb=et(["",""])),v)}return(0,t._)(Ib||(Ib=et(["","","",""])),g,y,(0,t.getProperty)(p))},e.unescapeFragment=function(d){return a(decodeURIComponent(d))},e.escapeFragment=function(d){return encodeURIComponent(o(d))},e.escapeJsonPointer=o,e.unescapeJsonPointer=a,e.eachItem=function(d,v){if(Array.isArray(d)){var p,m=at(d);try{for(m.s();!(p=m.n()).done;)v(p.value)}catch(g){m.e(g)}finally{m.f()}}else v(d)},e.mergeEvaluated={props:s({mergeNames:function(d,v,p){return d.if((0,t._)(Db||(Db=et([""," !== true && "," !== undefined"])),p,v),function(){d.if((0,t._)(Lb||(Lb=et([""," === true"])),v),function(){return d.assign(p,!0)},function(){return d.assign(p,(0,t._)(Bb||(Bb=et([""," || {}"])),p)).code((0,t._)(zb||(zb=et(["Object.assign(",", ",")"])),p,v))})})},mergeToName:function(d,v,p){return d.if((0,t._)(Fb||(Fb=et([""," !== true"])),p),function(){v===!0?d.assign(p,!0):(d.assign(p,(0,t._)(Vb||(Vb=et([""," || {}"])),p)),c(d,p,v))})},mergeValues:function(d,v){return d===!0||dt(dt({},d),v)},resultToName:u}),items:s({mergeNames:function(d,v,p){return d.if((0,t._)(Wb||(Wb=et([""," !== true && "," !== undefined"])),p,v),function(){return d.assign(p,(0,t._)(qb||(qb=et([""," === true ? true : "," > "," ? "," : ",""])),v,p,v,p,v))})},mergeToName:function(d,v,p){return d.if((0,t._)(Hb||(Hb=et([""," !== true"])),p),function(){return d.assign(p,v===!0||(0,t._)(Ub||(Ub=et([""," > "," ? "," : ",""])),p,v,p,v))})},mergeValues:function(d,v){return d===!0||Math.max(d,v)},resultToName:function(d,v){return d.var("items",v)}})},e.evaluatedPropsToName=u,e.setEvaluated=c;var l,f={};function h(d,v){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.opts.strictSchema;if(p){if(v="strict mode: ".concat(v),p===!0)throw new Error(v);d.self.logger.warn(v)}}e.useFunc=function(d,v){return d.scopeValue("func",{ref:v,code:f[v.code]||(f[v.code]=new n._Code(v.code))})},function(d){d[d.Num=0]="Num",d[d.Str=1]="Str"}(l=e.Type||(e.Type={})),e.getErrorPath=function(d,v,p){if(d instanceof t.Name){var m=v===l.Num;return p?m?(0,t._)(Gb||(Gb=et(['"[" + ',' + "]"'])),d):(0,t._)(Qb||(Qb=et([`"['" + `,` + "']"`])),d):m?(0,t._)(Yb||(Yb=et(['"/" + ',""])),d):(0,t._)(Zb||(Zb=et(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),d)}return p?(0,t.getProperty)(d).toString():"/"+o(d)},e.checkStrictMode=h})(Sn);var BR,zR,FR,Sv={};function gs(){if(BR)return Sv;BR=1,Object.defineProperty(Sv,"__esModule",{value:!0});var e=pn(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Sv.default=t,Sv}function Cv(){return zR||(zR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=pn(),n=Sn,r=gs();function i(l,f){var h=l.const("err",f);l.if((0,t._)(hw||(hw=et([""," === null"])),r.default.vErrors),function(){return l.assign(r.default.vErrors,(0,t._)(dw||(dw=et(["[","]"])),h))},(0,t._)(vw||(vw=et(["",".push(",")"])),r.default.vErrors,h)),l.code((0,t._)(pw||(pw=et(["","++"])),r.default.errors))}function o(l,f){var h=l.gen,d=l.validateName;l.schemaEnv.$async?h.throw((0,t._)(mw||(mw=et(["new ","(",")"])),l.ValidationError,f)):(h.assign((0,t._)(gw||(gw=et(["",".errors"])),d),f),h.return(!1))}e.keywordError={message:function(l){var f=l.keyword;return(0,t.str)(Xb||(Xb=et(['must pass "','" keyword validation'])),f)}},e.keyword$DataError={message:function(l){var f=l.keyword,h=l.schemaType;return h?(0,t.str)(tw||(tw=et(['"','" keyword must be '," ($data)"])),f,h):(0,t.str)(ew||(ew=et(['"','" keyword is invalid ($data)'])),f)}},e.reportError=function(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.keywordError,h=arguments.length>2?arguments[2]:void 0,d=arguments.length>3?arguments[3]:void 0,v=l.it,p=v.gen,m=v.compositeRule,g=v.allErrors,y=s(l,f,h);(d!=null?d:m||g)?i(p,y):o(v,(0,t._)(nw||(nw=et(["[","]"])),y))},e.reportExtraError=function(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.keywordError,h=arguments.length>2?arguments[2]:void 0,d=l.it,v=d.gen,p=d.compositeRule,m=d.allErrors;i(v,s(l,f,h)),p||m||o(d,r.default.vErrors)},e.resetErrorsCount=function(l,f){l.assign(r.default.errors,f),l.if((0,t._)(rw||(rw=et([""," !== null"])),r.default.vErrors),function(){return l.if(f,function(){return l.assign((0,t._)(iw||(iw=et(["",".length"])),r.default.vErrors),f)},function(){return l.assign(r.default.vErrors,null)})})},e.extendErrors=function(l){var f=l.gen,h=l.keyword,d=l.schemaValue,v=l.data,p=l.errsCount,m=l.it;if(p===void 0)throw new Error("ajv implementation error");var g=f.name("err");f.forRange("i",p,r.default.errors,function(y){f.const(g,(0,t._)(ow||(ow=et(["","[","]"])),r.default.vErrors,y)),f.if((0,t._)(aw||(aw=et(["",".instancePath === undefined"])),g),function(){return f.assign((0,t._)(sw||(sw=et(["",".instancePath"])),g),(0,t.strConcat)(r.default.instancePath,m.errorPath))}),f.assign((0,t._)(uw||(uw=et(["",".schemaPath"])),g),(0,t.str)(cw||(cw=et(["","/",""])),m.errSchemaPath,h)),m.opts.verbose&&(f.assign((0,t._)(lw||(lw=et(["",".schema"])),g),d),f.assign((0,t._)(fw||(fw=et(["",".data"])),g),v))})};var a={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(l,f,h){return l.it.createErrors===!1?(0,t._)(yw||(yw=et(["{}"]))):function(d,v){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=d.gen,g=d.it,y=[u(g,p),c(d,p)];return function(b,w,j){var x=w.params,R=w.message,M=b.keyword,E=b.data,N=b.schemaValue,A=b.it,L=A.opts,W=A.propertyName,O=A.topSchemaRef,I=A.schemaPath;j.push([a.keyword,M],[a.params,typeof x=="function"?x(b):x||(0,t._)(kw||(kw=et(["{}"])))]),L.messages&&j.push([a.message,typeof R=="function"?R(b):R]),L.verbose&&j.push([a.schema,N],[a.parentSchema,(0,t._)(jw||(jw=et(["","",""])),O,I)],[r.default.data,E]),W&&j.push([a.propertyName,W])}(d,v,y),m.object.apply(m,y)}(l,f,h)}function u(l,f){var h=l.errorPath,d=f.instancePath,v=d?(0,t.str)(bw||(bw=et(["","",""])),h,(0,n.getErrorPath)(d,n.Type.Str)):h;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,v)]}function c(l,f){var h=l.keyword,d=l.it.errSchemaPath,v=f.schemaPath,p=f.parentSchema?d:(0,t.str)(ww||(ww=et(["","/",""])),d,h);return v&&(p=(0,t.str)(xw||(xw=et(["","",""])),p,(0,n.getErrorPath)(v,n.Type.Str))),[a.schemaPath,p]}}(PR)),PR}var af={},nu={};Object.defineProperty(nu,"__esModule",{value:!0}),nu.getRules=nu.isJSONType=void 0;var Cet=new Set(["string","number","integer","boolean","null","object","array"]);nu.isJSONType=function(e){return typeof e=="string"&&Cet.has(e)},nu.getRules=function(){var e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:dt(dt({},e),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var VR,Oa={};function WR(){if(VR)return Oa;function e(n,r){return r.rules.some(function(i){return t(n,i)})}function t(n,r){var i;return n[r.keyword]!==void 0||((i=r.definition.implements)===null||i===void 0?void 0:i.some(function(o){return n[o]!==void 0}))}return VR=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.shouldUseRule=Oa.shouldUseGroup=Oa.schemaHasRulesForType=void 0,Oa.schemaHasRulesForType=function(n,r){var i=n.schema,o=n.self.RULES.types[r];return o&&o!==!0&&e(i,o)},Oa.shouldUseGroup=e,Oa.shouldUseRule=t,Oa}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t,n=nu,r=WR(),i=Cv(),o=pn(),a=Sn;function s(d){var v=Array.isArray(d)?d:d?[d]:[];if(v.every(n.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}(function(d){d[d.Correct=0]="Correct",d[d.Wrong=1]="Wrong"})(t=e.DataType||(e.DataType={})),e.getSchemaTypes=function(d){var v=s(d.type);if(v.includes("null")){if(d.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&d.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');d.nullable===!0&&v.push("null")}return v},e.getJSONTypes=s,e.coerceAndCheckDataType=function(d,v){var p=d.gen,m=d.data,g=d.opts,y=function(j,x){return x?j.filter(function(R){return u.has(R)||x==="array"&&R==="array"}):[]}(v,g.coerceTypes),b=v.length>0&&!(y.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(d,v[0]));if(b){var w=l(v,m,g.strictNumbers,t.Wrong);p.if(w,function(){y.length?function(j,x,R){var M=j.gen,E=j.data,N=j.opts,A=M.let("dataType",(0,o._)(Cw||(Cw=et(["typeof ",""])),E)),L=M.let("coerced",(0,o._)($w||($w=et(["undefined"]))));N.coerceTypes==="array"&&M.if((0,o._)(_w||(_w=et([""," == 'object' && Array.isArray(",") && ",".length == 1"])),A,E,E),function(){return M.assign(E,(0,o._)(Ow||(Ow=et(["","[0]"])),E)).assign(A,(0,o._)(Mw||(Mw=et(["typeof ",""])),E)).if(l(x,E,N.strictNumbers),function(){return M.assign(L,E)})}),M.if((0,o._)(Ew||(Ew=et([""," !== undefined"])),L));var W,O=at(R);try{for(O.s();!(W=O.n()).done;){var I=W.value;(u.has(I)||I==="array"&&N.coerceTypes==="array")&&q(I)}}catch(P){O.e(P)}finally{O.f()}function q(P){switch(P){case"string":return void M.elseIf((0,o._)(Pw||(Pw=et(["",' == "number" || ',' == "boolean"'])),A,A)).assign(L,(0,o._)(Tw||(Tw=et(['"" + ',""])),E)).elseIf((0,o._)(Rw||(Rw=et([""," === null"])),E)).assign(L,(0,o._)(Nw||(Nw=et(['""']))));case"number":return void M.elseIf((0,o._)(Iw||(Iw=et(["",' == "boolean" || ',` === null
|
|
|| (`,' == "string" && '," && "," == +",")"])),A,E,A,E,E,E)).assign(L,(0,o._)(Dw||(Dw=et(["+",""])),E));case"integer":return void M.elseIf((0,o._)(Lw||(Lw=et(["",' === "boolean" || ',` === null
|
|
|| (`,' === "string" && '," && "," == +"," && !("," % 1))"])),A,E,A,E,E,E,E)).assign(L,(0,o._)(Bw||(Bw=et(["+",""])),E));case"boolean":return void M.elseIf((0,o._)(zw||(zw=et(["",' === "false" || '," === 0 || "," === null"])),E,E,E)).assign(L,!1).elseIf((0,o._)(Fw||(Fw=et(["",' === "true" || '," === 1"])),E,E)).assign(L,!0);case"null":return M.elseIf((0,o._)(Vw||(Vw=et(["",' === "" || '," === 0 || "," === false"])),E,E,E)),void M.assign(L,null);case"array":M.elseIf((0,o._)(Ww||(Ww=et(["",' === "string" || ',` === "number"
|
|
|| `,' === "boolean" || '," === null"])),A,A,A,E)).assign(L,(0,o._)(qw||(qw=et(["[","]"])),E))}}M.else(),h(j),M.endIf(),M.if((0,o._)(Aw||(Aw=et([""," !== undefined"])),L),function(){M.assign(E,L),function(P,_){var S=P.gen,$=P.parentData,D=P.parentDataProperty;S.if((0,o._)(Hw||(Hw=et([""," !== undefined"])),$),function(){return S.assign((0,o._)(Uw||(Uw=et(["","[","]"])),$,D),_)})}(j,L)})}(d,v,y):h(d)})}return b};var u=new Set(["string","number","integer","boolean","null"]);function c(d,v,p){var m,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t.Correct,y=g===t.Correct?o.operators.EQ:o.operators.NEQ;switch(d){case"null":return(0,o._)(Jw||(Jw=et([""," "," null"])),v,y);case"array":m=(0,o._)(Kw||(Kw=et(["Array.isArray(",")"])),v);break;case"object":m=(0,o._)(Gw||(Gw=et([""," && typeof ",' == "object" && !Array.isArray(',")"])),v,v,v);break;case"integer":m=b((0,o._)(Qw||(Qw=et(["!("," % 1) && !isNaN(",")"])),v,v));break;case"number":m=b();break;default:return(0,o._)(Yw||(Yw=et(["typeof "," "," ",""])),v,y,d)}return g===t.Correct?m:(0,o.not)(m);function b(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o.nil;return(0,o.and)((0,o._)(Zw||(Zw=et(["typeof ",' == "number"'])),v),w,p?(0,o._)(Xw||(Xw=et(["isFinite(",")"])),v):o.nil)}}function l(d,v,p,m){if(d.length===1)return c(d[0],v,p,m);var g,y=(0,a.toHash)(d);if(y.array&&y.object){var b=(0,o._)(t2||(t2=et(["typeof ",' != "object"'])),v);g=y.null?b:(0,o._)(e2||(e2=et(["!"," || ",""])),v,b),delete y.null,delete y.array,delete y.object}else g=o.nil;for(var w in y.number&&delete y.integer,y)g=(0,o.and)(g,c(w,v,p,m));return g}e.checkDataType=c,e.checkDataTypes=l;var f={message:function(d){var v=d.schema;return"must be ".concat(v)},params:function(d){var v=d.schema,p=d.schemaValue;return typeof v=="string"?(0,o._)(n2||(n2=et(["{type: ","}"])),v):(0,o._)(r2||(r2=et(["{type: ","}"])),p)}};function h(d){var v=function(p){var m=p.gen,g=p.data,y=p.schema,b=(0,a.schemaRefOrVal)(p,y,"type");return{gen:m,keyword:"type",data:g,schema:y.type,schemaCode:b,schemaValue:b,parentSchema:y,params:{},it:p}}(d);(0,i.reportError)(v,f)}e.reportTypeError=h})(af);var qR,sf={},HR,UR,ko={},Rn={};function jo(){if(HR)return Rn;HR=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.validateUnion=Rn.validateArray=Rn.usePattern=Rn.callValidateCode=Rn.schemaProperties=Rn.allSchemaProperties=Rn.noPropertyInData=Rn.propertyInData=Rn.isOwnProperty=Rn.hasPropFunc=Rn.reportMissingProp=Rn.checkMissingProp=Rn.checkReportMissingProp=void 0;var e=pn(),t=Sn,n=gs(),r=Sn;function i(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)(l2||(l2=et(["Object.prototype.hasOwnProperty"])))})}function o(c,l,f){return(0,e._)(f2||(f2=et(["",".call(",", ",")"])),i(c),l,f)}function a(c,l,f,h){var d=(0,e._)(v2||(v2=et(["",""," === undefined"])),l,(0,e.getProperty)(f));return h?(0,e.or)(d,(0,e.not)(o(c,l,f))):d}function s(c){return c?Object.keys(c).filter(function(l){return l!=="__proto__"}):[]}Rn.checkReportMissingProp=function(c,l){var f=c.gen,h=c.data,d=c.it;f.if(a(f,h,l,d.opts.ownProperties),function(){c.setParams({missingProperty:(0,e._)(u2||(u2=et(["",""])),l)},!0),c.error()})},Rn.checkMissingProp=function(c,l,f){var h=c.gen,d=c.data,v=c.it.opts;return e.or.apply(void 0,Oe(l.map(function(p){return(0,e.and)(a(h,d,p,v.ownProperties),(0,e._)(c2||(c2=et([""," = ",""])),f,p))})))},Rn.reportMissingProp=function(c,l){c.setParams({missingProperty:l},!0),c.error()},Rn.hasPropFunc=i,Rn.isOwnProperty=o,Rn.propertyInData=function(c,l,f,h){var d=(0,e._)(h2||(h2=et(["",""," !== undefined"])),l,(0,e.getProperty)(f));return h?(0,e._)(d2||(d2=et([""," && ",""])),d,o(c,l,f)):d},Rn.noPropertyInData=a,Rn.allSchemaProperties=s,Rn.schemaProperties=function(c,l){return s(l).filter(function(f){return!(0,t.alwaysValidSchema)(c,l[f])})},Rn.callValidateCode=function(c,l,f,h){var d=c.schemaCode,v=c.data,p=c.it,m=p.gen,g=p.topSchemaRef,y=p.schemaPath,b=p.errorPath,w=c.it,j=h?(0,e._)(p2||(p2=et(["",", ",", ","",""])),d,v,g,y):v,x=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)],[n.default.parentData,w.parentData],[n.default.parentDataProperty,w.parentDataProperty],[n.default.rootData,n.default.rootData]];w.opts.dynamicRef&&x.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);var R=(0,e._)(m2||(m2=et(["",", ",""])),j,m.object.apply(m,x));return f!==e.nil?(0,e._)(g2||(g2=et(["",".call(",", ",")"])),l,f,R):(0,e._)(y2||(y2=et(["","(",")"])),l,R)};var u=(0,e._)(b2||(b2=et(["new RegExp"])));return Rn.usePattern=function(c,l){var f=c.gen,h=c.it.opts,d=h.unicodeRegExp?"u":"",v=h.code.regExp,p=v(l,d);return f.scopeValue("pattern",{key:p.toString(),ref:p,code:(0,e._)(w2||(w2=et(["","(",", ",")"])),v.code==="new RegExp"?u:(0,r.useFunc)(f,v),l,d)})},Rn.validateArray=function(c){var l=c.gen,f=c.data,h=c.keyword,d=c.it,v=l.name("valid");if(d.allErrors){var p=l.let("valid",!0);return m(function(){return l.assign(p,!1)}),p}return l.var(v,!0),m(function(){return l.break()}),v;function m(g){var y=l.const("len",(0,e._)(x2||(x2=et(["",".length"])),f));l.forRange("i",0,y,function(b){c.subschema({keyword:h,dataProp:b,dataPropType:t.Type.Num},v),l.if((0,e.not)(v),g)})}},Rn.validateUnion=function(c){var l=c.gen,f=c.schema,h=c.keyword,d=c.it;if(!Array.isArray(f))throw new Error("ajv implementation error");if(!f.some(function(m){return(0,t.alwaysValidSchema)(d,m)})||d.opts.unevaluated){var v=l.let("valid",!1),p=l.name("_valid");l.block(function(){return f.forEach(function(m,g){var y=c.subschema({keyword:h,schemaProp:g,compositeRule:!0},p);l.assign(v,(0,e._)(k2||(k2=et([""," || ",""])),v,p)),c.mergeValidEvaluated(y,p)||l.if((0,e.not)(v))})}),c.result(v,function(){return c.reset()},function(){return c.error(!0)})}},Rn}function $et(){if(UR)return ko;UR=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.validateKeywordUsage=ko.validSchemaType=ko.funcKeywordCode=ko.macroKeywordCode=void 0;var e=pn(),t=gs(),n=jo(),r=Cv();function i(a){var s=a.gen,u=a.data,c=a.it;s.if(c.parentData,function(){return s.assign(u,(0,e._)(M2||(M2=et(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(a,s,u){if(u===void 0)throw new Error('keyword "'.concat(s,'" failed to compile'));return a.scopeValue("keyword",typeof u=="function"?{ref:u}:{ref:u,code:(0,e.stringify)(u)})}return ko.macroKeywordCode=function(a,s){var u=a.gen,c=a.keyword,l=a.schema,f=a.parentSchema,h=a.it,d=s.macro.call(h.self,l,f,h),v=o(u,c,d);h.opts.validateSchema!==!1&&h.self.validateSchema(d,!0);var p=u.name("valid");a.subschema({schema:d,schemaPath:e.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:v,compositeRule:!0},p),a.pass(p,function(){return a.error(!0)})},ko.funcKeywordCode=function(a,s){var u,c=a.gen,l=a.keyword,f=a.schema,h=a.parentSchema,d=a.$data,v=a.it;(function(w,j){var x=w.schemaEnv;if(j.async&&!x.$async)throw new Error("async keyword in sync schema")})(v,s);var p=!d&&s.compile?s.compile.call(v.self,f,h,v):s.validate,m=o(c,l,p),g=c.let("valid");function y(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.async?(0,e._)(_2||(_2=et(["await "]))):e.nil,j=v.opts.passContext?t.default.this:t.default.self,x=!("compile"in s&&!d||s.schema===!1);c.assign(g,(0,e._)(O2||(O2=et(["","",""])),w,(0,n.callValidateCode)(a,m,j,x)),s.modifying)}function b(w){var j;c.if((0,e.not)((j=s.valid)!==null&&j!==void 0?j:g),w)}a.block$data(g,function(){if(s.errors===!1)y(),s.modifying&&i(a),b(function(){return a.error()});else{var w=s.async?function(){var x=c.let("ruleErrs",null);return c.try(function(){return y((0,e._)(j2||(j2=et(["await "]))))},function(R){return c.assign(g,!1).if((0,e._)(S2||(S2=et([""," instanceof ",""])),R,v.ValidationError),function(){return c.assign(x,(0,e._)(C2||(C2=et(["",".errors"])),R))},function(){return c.throw(R)})}),x}():(j=(0,e._)($2||($2=et(["",".errors"])),m),c.assign(j,null),y(e.nil),j);s.modifying&&i(a),b(function(){return function(x,R){var M=x.gen;M.if((0,e._)(E2||(E2=et(["Array.isArray(",")"])),R),function(){M.assign(t.default.vErrors,(0,e._)(A2||(A2=et([""," === null ? "," : ",".concat(",")"])),t.default.vErrors,R,t.default.vErrors,R)).assign(t.default.errors,(0,e._)(P2||(P2=et(["",".length"])),t.default.vErrors)),(0,r.extendErrors)(x)},function(){return x.error()})}(a,w)})}var j}),a.ok((u=s.valid)!==null&&u!==void 0?u:g)},ko.validSchemaType=function(a,s){var u=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return!s.length||s.some(function(c){return c==="array"?Array.isArray(a):c==="object"?a&&ee(a)=="object"&&!Array.isArray(a):ee(a)==c||u&&a===void 0})},ko.validateKeywordUsage=function(a,s,u){var c=a.schema,l=a.opts,f=a.self,h=a.errSchemaPath;if(Array.isArray(s.keyword)?!s.keyword.includes(u):s.keyword!==u)throw new Error("ajv implementation error");var d=s.dependencies;if(d!=null&&d.some(function(p){return!Object.prototype.hasOwnProperty.call(c,p)}))throw new Error("parent schema must have dependencies of ".concat(u,": ").concat(d.join(",")));if(s.validateSchema&&!s.validateSchema(c[u])){var v='keyword "'.concat(u,'" value is invalid at path "').concat(h,'": ')+f.errorsText(s.validateSchema.errors);if(l.validateSchema!=="log")throw new Error(v);f.logger.error(v)}},ko}var JR,Ma={},Jr={},KR=function e(t,n){if(t===n)return!0;if(t&&n&&ee(t)=="object"&&ee(n)=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;i--!=0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;i--!=0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!=0;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},GR={exports:{}},ys=GR.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),$v(t,typeof(n=t.cb||n)=="function"?n:n.pre||function(){},n.post||function(){},e,"",e)};function $v(e,t,n,r,i,o,a,s,u,c){if(r&&ee(r)=="object"&&!Array.isArray(r)){for(var l in t(r,i,o,a,s,u,c),r){var f=r[l];if(Array.isArray(f)){if(l in ys.arrayKeywords)for(var h=0;h<f.length;h++)$v(e,t,n,f[h],i+"/"+l+"/"+h,o,i,l,r,h)}else if(l in ys.propsKeywords){if(f&&ee(f)=="object")for(var d in f)$v(e,t,n,f[d],i+"/"+l+"/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),o,i,l,r,d)}else(l in ys.keywords||e.allKeys&&!(l in ys.skipKeywords))&&$v(e,t,n,f,i+"/"+l,o,i,l,r)}n(r,i,o,a,s,u,c)}}ys.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},ys.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},ys.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},ys.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};var _et=GR.exports;Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.getSchemaRefs=Jr.resolveUrl=Jr.normalizeId=Jr._getFullPath=Jr.getFullPath=Jr.inlineRef=void 0;var Oet=Sn,Met=KR,Eet=_et,Aet=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Jr.inlineRef=function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return typeof e=="boolean"||(t===!0?!_y(e):!!t&&QR(e)<=t)};var Pet=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function _y(e){for(var t in e){if(Pet.has(t))return!0;var n=e[t];if(Array.isArray(n)&&n.some(_y)||ee(n)=="object"&&_y(n))return!0}return!1}function QR(e){var t=0;for(var n in e)if(n==="$ref"||(t++,!Aet.has(n)&&(ee(e[n])=="object"&&(0,Oet.eachItem)(e[n],function(r){return t+=QR(r)}),t===1/0)))return 1/0;return t}function YR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(arguments.length>2?arguments[2]:void 0)!==!1&&(t=Ec(t));var n=e.parse(t);return ZR(e,n)}function ZR(e,t){return e.serialize(t).split("#")[0]+"#"}Jr.getFullPath=YR,Jr._getFullPath=ZR;var Tet=/#\/?$/;function Ec(e){return e?e.replace(Tet,""):""}Jr.normalizeId=Ec,Jr.resolveUrl=function(e,t,n){return n=Ec(n),e.resolve(t,n)};var XR,Ret=/^[a-z_][-a-z0-9._]*$/i;function _v(){if(XR)return _a;XR=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.getData=_a.KeywordCxt=_a.validateFunctionCode=void 0;var e=function(){if(FR)return eu;FR=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.boolOrEmptySchema=eu.topBoolOrEmptySchema=void 0;var O=Cv(),I=pn(),q=gs(),P={message:"boolean schema is false"};function _(S,$){var D={gen:S.gen,keyword:"false schema",data:S.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:S};(0,O.reportError)(D,P,void 0,$)}return eu.topBoolOrEmptySchema=function(S){var $=S.gen,D=S.schema,B=S.validateName;D===!1?_(S,!1):ee(D)=="object"&&D.$async===!0?$.return(q.default.data):($.assign((0,I._)(Sw||(Sw=et(["",".errors"])),B),null),$.return(!0))},eu.boolOrEmptySchema=function(S,$){var D=S.gen;S.schema===!1?(D.var($,!1),_(S)):D.var($,!0)},eu}(),t=af,n=WR(),r=af,i=function(){if(qR)return sf;qR=1,Object.defineProperty(sf,"__esModule",{value:!0}),sf.assignDefaults=void 0;var O=pn(),I=Sn;function q(P,_,S){var $=P.gen,D=P.compositeRule,B=P.data,k=P.opts;if(S!==void 0){var H=(0,O._)(i2||(i2=et(["","",""])),B,(0,O.getProperty)(_));if(D)(0,I.checkStrictMode)(P,"default is ignored for: ".concat(H));else{var U=(0,O._)(o2||(o2=et([""," === undefined"])),H);k.useDefaults==="empty"&&(U=(0,O._)(a2||(a2=et([""," || "," === null || ",' === ""'])),U,H,H)),$.if(U,(0,O._)(s2||(s2=et([""," = ",""])),H,(0,O.stringify)(S)))}}}return sf.assignDefaults=function(P,_){var S=P.schema,$=S.properties,D=S.items;if(_==="object"&&$)for(var B in $)q(P,B,$[B].default);else _==="array"&&Array.isArray(D)&&D.forEach(function(k,H){return q(P,H,k.default)})},sf}(),o=$et(),a=function(){if(JR)return Ma;JR=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.extendSubschemaMode=Ma.extendSubschemaData=Ma.getSubschema=void 0;var O=pn(),I=Sn;return Ma.getSubschema=function(q,P){var _=P.keyword,S=P.schemaProp,$=P.schema,D=P.schemaPath,B=P.errSchemaPath,k=P.topSchemaRef;if(_!==void 0&&$!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(_!==void 0){var H=q.schema[_];return S===void 0?{schema:H,schemaPath:(0,O._)(T2||(T2=et(["","",""])),q.schemaPath,(0,O.getProperty)(_)),errSchemaPath:"".concat(q.errSchemaPath,"/").concat(_)}:{schema:H[S],schemaPath:(0,O._)(R2||(R2=et(["","","",""])),q.schemaPath,(0,O.getProperty)(_),(0,O.getProperty)(S)),errSchemaPath:"".concat(q.errSchemaPath,"/").concat(_,"/").concat((0,I.escapeFragment)(S))}}if($!==void 0){if(D===void 0||B===void 0||k===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:$,schemaPath:D,topSchemaRef:k,errSchemaPath:B}}throw new Error('either "keyword" or "schema" must be passed')},Ma.extendSubschemaData=function(q,P,_){var S=_.dataProp,$=_.dataPropType,D=_.data,B=_.dataTypes,k=_.propertyName;if(D!==void 0&&S!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');var H=P.gen;if(S!==void 0){var U=P.errorPath,st=P.dataPathArr,ut=P.opts;gt(H.let("data",(0,O._)(N2||(N2=et(["","",""])),P.data,(0,O.getProperty)(S)),!0)),q.errorPath=(0,O.str)(I2||(I2=et(["","",""])),U,(0,I.getErrorPath)(S,$,ut.jsPropertySyntax)),q.parentDataProperty=(0,O._)(D2||(D2=et(["",""])),S),q.dataPathArr=[].concat(Oe(st),[q.parentDataProperty])}function gt(St){q.data=St,q.dataLevel=P.dataLevel+1,q.dataTypes=[],P.definedProperties=new Set,q.parentData=P.data,q.dataNames=[].concat(Oe(P.dataNames),[St])}D!==void 0&&(gt(D instanceof O.Name?D:H.let("data",D,!0)),k!==void 0&&(q.propertyName=k)),B&&(q.dataTypes=B)},Ma.extendSubschemaMode=function(q,P){var _=P.jtdDiscriminator,S=P.jtdMetadata,$=P.compositeRule,D=P.createErrors,B=P.allErrors;$!==void 0&&(q.compositeRule=$),D!==void 0&&(q.createErrors=D),B!==void 0&&(q.allErrors=B),q.jtdDiscriminator=_,q.jtdMetadata=S},Ma}(),s=pn(),u=gs(),c=Jr,l=Sn,f=Cv();function h(O,I){var q=O.gen,P=O.validateName,_=O.schema,S=O.schemaEnv,$=O.opts;$.code.es5?q.func(P,(0,s._)(L2||(L2=et(["",", ",""])),u.default.data,u.default.valCxt),S.$async,function(){q.code((0,s._)(B2||(B2=et(['"use strict"; ',""])),d(_,$))),function(D,B){D.if(u.default.valCxt,function(){D.var(u.default.instancePath,(0,s._)(W2||(W2=et(["",".",""])),u.default.valCxt,u.default.instancePath)),D.var(u.default.parentData,(0,s._)(q2||(q2=et(["",".",""])),u.default.valCxt,u.default.parentData)),D.var(u.default.parentDataProperty,(0,s._)(H2||(H2=et(["",".",""])),u.default.valCxt,u.default.parentDataProperty)),D.var(u.default.rootData,(0,s._)(U2||(U2=et(["",".",""])),u.default.valCxt,u.default.rootData)),B.dynamicRef&&D.var(u.default.dynamicAnchors,(0,s._)(J2||(J2=et(["",".",""])),u.default.valCxt,u.default.dynamicAnchors))},function(){D.var(u.default.instancePath,(0,s._)(K2||(K2=et(['""'])))),D.var(u.default.parentData,(0,s._)(G2||(G2=et(["undefined"])))),D.var(u.default.parentDataProperty,(0,s._)(Q2||(Q2=et(["undefined"])))),D.var(u.default.rootData,u.default.data),B.dynamicRef&&D.var(u.default.dynamicAnchors,(0,s._)(Y2||(Y2=et(["{}"]))))})}(q,$),q.code(I)}):q.func(P,(0,s._)(z2||(z2=et(["",", ",""])),u.default.data,function(D){return(0,s._)(F2||(F2=et(["{",'="", ',", ",", ","=","","}={}"])),u.default.instancePath,u.default.parentData,u.default.parentDataProperty,u.default.rootData,u.default.data,D.dynamicRef?(0,s._)(V2||(V2=et([", ","={}"])),u.default.dynamicAnchors):s.nil)}($)),S.$async,function(){return q.code(d(_,$)).code(I)})}function d(O,I){var q=ee(O)=="object"&&O[I.schemaId];return q&&(I.code.source||I.code.process)?(0,s._)(ox||(ox=et(["/*# sourceURL="," */"])),q):s.nil}function v(O,I){m(O)&&(g(O),p(O))?function(q,P){var _=q.schema,S=q.gen,$=q.opts;$.$comment&&_.$comment&&b(q),function(B){var k=B.schema[B.opts.schemaId];k&&(B.baseId=(0,c.resolveUrl)(B.opts.uriResolver,B.baseId,k))}(q),function(B){if(B.schema.$async&&!B.schemaEnv.$async)throw new Error("async schema in sync schema")}(q);var D=S.const("_errs",u.default.errors);y(q,D),S.var(P,(0,s._)(ax||(ax=et([""," === ",""])),D,u.default.errors))}(O,I):(0,e.boolOrEmptySchema)(O,I)}function p(O){var I=O.schema,q=O.self;if(typeof I=="boolean")return!I;for(var P in I)if(q.RULES.all[P])return!0;return!1}function m(O){return typeof O.schema!="boolean"}function g(O){(0,l.checkUnknownRules)(O),function(I){var q=I.schema,P=I.errSchemaPath,_=I.opts,S=I.self;q.$ref&&_.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(q,S.RULES)&&S.logger.warn('$ref: keywords ignored in schema at path "'.concat(P,'"'))}(O)}function y(O,I){if(O.opts.jtd)return w(O,[],!1,I);var q=(0,t.getSchemaTypes)(O.schema);w(O,q,!(0,t.coerceAndCheckDataType)(O,q),I)}function b(O){var I=O.gen,q=O.schemaEnv,P=O.schema,_=O.errSchemaPath,S=O.opts,$=P.$comment;if(S.$comment===!0)I.code((0,s._)(sx||(sx=et(["",".logger.log(",")"])),u.default.self,$));else if(typeof S.$comment=="function"){var D=(0,s.str)(ux||(ux=et(["","/$comment"])),_),B=I.scopeValue("root",{ref:q.root});I.code((0,s._)(cx||(cx=et(["",".opts.$comment(",", ",", ",".schema)"])),u.default.self,$,D,B))}}function w(O,I,q,P){var _=O.gen,S=O.schema,$=O.data,D=O.allErrors,B=O.opts,k=O.self.RULES;function H(U){(0,n.shouldUseGroup)(S,U)&&(U.type?(_.if((0,r.checkDataType)(U.type,$,B.strictNumbers)),j(O,U),I.length===1&&I[0]===U.type&&q&&(_.else(),(0,r.reportTypeError)(O)),_.endIf()):j(O,U),D||_.if((0,s._)(mx||(mx=et([""," === ",""])),u.default.errors,P||0)))}!S.$ref||!B.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(S,k)?(B.jtd||function(U,st){U.schemaEnv.meta||!U.opts.strictTypes||(function(ut,gt){if(gt.length){if(!ut.dataTypes.length)return void(ut.dataTypes=gt);gt.forEach(function(St){R(ut.dataTypes,St)||M(ut,'type "'.concat(St,'" not allowed by context "').concat(ut.dataTypes.join(","),'"'))}),function(St,Pt){var pt,Bt=[],K=at(St.dataTypes);try{for(K.s();!(pt=K.n()).done;){var $t=pt.value;R(Pt,$t)?Bt.push($t):Pt.includes("integer")&&$t==="number"&&Bt.push("integer")}}catch(Kt){K.e(Kt)}finally{K.f()}St.dataTypes=Bt}(ut,gt)}}(U,st),U.opts.allowUnionTypes||function(ut,gt){gt.length>1&&(gt.length!==2||!gt.includes("null"))&&M(ut,"use allowUnionTypes to allow union type keyword")}(U,st),function(ut,gt){var St=ut.self.RULES.all;for(var Pt in St){var pt=St[Pt];if(ee(pt)=="object"&&(0,n.shouldUseRule)(ut.schema,pt)){var Bt=pt.definition.type;Bt.length&&!Bt.some(function(K){return x(gt,K)})&&M(ut,'missing type "'.concat(Bt.join(","),'" for keyword "').concat(Pt,'"'))}}}(U,U.dataTypes))}(O,I),_.block(function(){var U,st=at(k.rules);try{for(st.s();!(U=st.n()).done;)H(U.value)}catch(ut){st.e(ut)}finally{st.f()}H(k.post)})):_.block(function(){return N(O,"$ref",k.all.$ref.definition)})}function j(O,I){var q=O.gen,P=O.schema;O.opts.useDefaults&&(0,i.assignDefaults)(O,I.type),q.block(function(){var _,S=at(I.rules);try{for(S.s();!(_=S.n()).done;){var $=_.value;(0,n.shouldUseRule)(P,$)&&N(O,$.keyword,$.definition,I.type)}}catch(D){S.e(D)}finally{S.f()}})}function x(O,I){return O.includes(I)||I==="number"&&O.includes("integer")}function R(O,I){return O.includes(I)||I==="integer"&&O.includes("number")}function M(O,I){var q=O.schemaEnv.baseId+O.errSchemaPath;I+=' at "'.concat(q,'" (strictTypes)'),(0,l.checkStrictMode)(O,I,O.opts.strictTypes)}_a.validateFunctionCode=function(O){m(O)&&(g(O),p(O))?function(I){var q=I.schema,P=I.opts,_=I.gen;h(I,function(){P.$comment&&q.$comment&&b(I),function(S){var $=S.schema,D=S.opts;$.default!==void 0&&D.useDefaults&&D.strictSchema&&(0,l.checkStrictMode)(S,"default is ignored in the schema root")}(I),_.let(u.default.vErrors,null),_.let(u.default.errors,0),P.unevaluated&&function(S){var $=S.gen,D=S.validateName;S.evaluated=$.const("evaluated",(0,s._)(Z2||(Z2=et(["",".evaluated"])),D)),$.if((0,s._)(X2||(X2=et(["",".dynamicProps"])),S.evaluated),function(){return $.assign((0,s._)(tx||(tx=et(["",".props"])),S.evaluated),(0,s._)(ex||(ex=et(["undefined"]))))}),$.if((0,s._)(nx||(nx=et(["",".dynamicItems"])),S.evaluated),function(){return $.assign((0,s._)(rx||(rx=et(["",".items"])),S.evaluated),(0,s._)(ix||(ix=et(["undefined"]))))})}(I),y(I),function(S){var $=S.gen,D=S.schemaEnv,B=S.validateName,k=S.ValidationError,H=S.opts;D.$async?$.if((0,s._)(lx||(lx=et([""," === 0"])),u.default.errors),function(){return $.return(u.default.data)},function(){return $.throw((0,s._)(fx||(fx=et(["new ","(",")"])),k,u.default.vErrors))}):($.assign((0,s._)(hx||(hx=et(["",".errors"])),B),u.default.vErrors),H.unevaluated&&function(U){var st=U.gen,ut=U.evaluated,gt=U.props,St=U.items;gt instanceof s.Name&&st.assign((0,s._)(vx||(vx=et(["",".props"])),ut),gt),St instanceof s.Name&&st.assign((0,s._)(px||(px=et(["",".items"])),ut),St)}(S),$.return((0,s._)(dx||(dx=et([""," === 0"])),u.default.errors)))}(I)})}(O):h(O,function(){return(0,e.topBoolOrEmptySchema)(O)})};var E=function(){function O(I,q,P){if(X(this,O),(0,o.validateKeywordUsage)(I,q,P),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=P,this.data=I.data,this.schema=I.schema[P],this.$data=q.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(I,this.schema,P,this.$data),this.schemaType=q.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=q,this.$data)this.schemaCode=I.gen.const("vSchema",W(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error("".concat(P," value must be ").concat(JSON.stringify(q.schemaType)));("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=I.gen.const("_errs",u.default.errors))}return tt(O,[{key:"result",value:function(I,q,P){this.failResult((0,s.not)(I),q,P)}},{key:"failResult",value:function(I,q,P){this.gen.if(I),P?P():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(I,q){this.failResult((0,s.not)(I),void 0,q)}},{key:"fail",value:function(I){if(I===void 0)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(I){if(!this.$data)return this.fail(I);var q=this.schemaCode;this.fail((0,s._)(gx||(gx=et([""," !== undefined && (",")"])),q,(0,s.or)(this.invalid$data(),I)))}},{key:"error",value:function(I,q,P){if(q)return this.setParams(q),this._error(I,P),void this.setParams({});this._error(I,P)}},{key:"_error",value:function(I,q){(I?f.reportExtraError:f.reportError)(this,this.def.error,q)}},{key:"$dataError",value:function(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}},{key:"reset",value:function(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(I){this.allErrors||this.gen.if(I)}},{key:"setParams",value:function(I,q){q?Object.assign(this.params,I):this.params=I}},{key:"block$data",value:function(I,q){var P=this,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s.nil;this.gen.block(function(){P.check$data(I,_),q()})}},{key:"check$data",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s.nil,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.nil;if(this.$data){var P=this.gen,_=this.schemaCode,S=this.schemaType,$=this.def;P.if((0,s.or)((0,s._)(yx||(yx=et([""," === undefined"])),_),q)),I!==s.nil&&P.assign(I,!0),(S.length||$.validateSchema)&&(P.elseIf(this.invalid$data()),this.$dataError(),I!==s.nil&&P.assign(I,!1)),P.else()}}},{key:"invalid$data",value:function(){var I=this.gen,q=this.schemaCode,P=this.schemaType,_=this.def,S=this.it;return(0,s.or)(function(){if(P.length){if(!(q instanceof s.Name))throw new Error("ajv implementation error");var $=Array.isArray(P)?P:[P];return(0,s._)(bx||(bx=et(["",""])),(0,r.checkDataTypes)($,q,S.opts.strictNumbers,r.DataType.Wrong))}return s.nil}(),function(){if(_.validateSchema){var $=I.scopeValue("validate$data",{ref:_.validateSchema});return(0,s._)(wx||(wx=et(["!","(",")"])),$,q)}return s.nil}())}},{key:"subschema",value:function(I,q){var P=(0,a.getSubschema)(this.it,I);(0,a.extendSubschemaData)(P,this.it,I),(0,a.extendSubschemaMode)(P,I);var _=dt(dt(dt({},this.it),P),{},{items:void 0,props:void 0});return v(_,q),_}},{key:"mergeEvaluated",value:function(I,q){var P=this.it,_=this.gen;P.opts.unevaluated&&(P.props!==!0&&I.props!==void 0&&(P.props=l.mergeEvaluated.props(_,I.props,P.props,q)),P.items!==!0&&I.items!==void 0&&(P.items=l.mergeEvaluated.items(_,I.items,P.items,q)))}},{key:"mergeValidEvaluated",value:function(I,q){var P=this,_=this.it,S=this.gen;if(_.opts.unevaluated&&(_.props!==!0||_.items!==!0))return S.if(q,function(){return P.mergeEvaluated(I,s.Name)}),!0}}]),O}();function N(O,I,q,P){var _=new E(O,q,I);"code"in q?q.code(_,P):_.$data&&q.validate?(0,o.funcKeywordCode)(_,q):"macro"in q?(0,o.macroKeywordCode)(_,q):(q.compile||q.validate)&&(0,o.funcKeywordCode)(_,q)}_a.KeywordCxt=E;var A=/^\/(?:[^~]|~0|~1)*$/,L=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(O,I){var q,P,_=I.dataLevel,S=I.dataNames,$=I.dataPathArr;if(O==="")return u.default.rootData;if(O[0]==="/"){if(!A.test(O))throw new Error("Invalid JSON-pointer: ".concat(O));q=O,P=u.default.rootData}else{var D=L.exec(O);if(!D)throw new Error("Invalid JSON-pointer: ".concat(O));var B=+D[1];if((q=D[2])==="#"){if(B>=_)throw new Error(ut("property/index",B));return $[_-B]}if(B>_)throw new Error(ut("data",B));if(P=S[_-B],!q)return P}var k,H=P,U=at(q.split("/"));try{for(U.s();!(k=U.n()).done;){var st=k.value;st&&(P=(0,s._)(xx||(xx=et(["","",""])),P,(0,s.getProperty)((0,l.unescapeJsonPointer)(st))),H=(0,s._)(kx||(kx=et([""," && ",""])),H,P))}}catch(gt){U.e(gt)}finally{U.f()}return H;function ut(gt,St){return"Cannot access ".concat(gt," ").concat(St," levels up, current level is ").concat(_)}}return _a.getData=W,_a}Jr.getSchemaRefs=function(e,t){var n=this;if(typeof e=="boolean")return{};var r=this.opts,i=r.schemaId,o=r.uriResolver,a=Ec(e[i]||t),s={"":a},u=YR(o,a,!1),c={},l=new Set;return Eet(e,{allKeys:!0},function(d,v,p,m){if(m!==void 0){var g=u+v,y=s[m];typeof d[i]=="string"&&(y=b.call(n,d[i])),w.call(n,d.$anchor),w.call(n,d.$dynamicAnchor),s[v]=y}function b(j){var x=this.opts.uriResolver.resolve;if(j=Ec(y?x(y,j):j),l.has(j))throw h(j);l.add(j);var R=this.refs[j];return typeof R=="string"&&(R=this.refs[R]),ee(R)=="object"?f(d,R.schema,j):j!==Ec(g)&&(j[0]==="#"?(f(d,c[j],j),c[j]=d):this.refs[j]=g),j}function w(j){if(typeof j=="string"){if(!Ret.test(j))throw new Error('invalid anchor "'.concat(j,'"'));b.call(this,"#".concat(j))}}}),c;function f(d,v,p){if(v!==void 0&&!Met(d,v))throw h(p)}function h(d){return new Error('reference "'.concat(d,'" resolves to more than one schema'))}};var tN,Ov={};function Oy(){if(tN)return Ov;tN=1,Object.defineProperty(Ov,"__esModule",{value:!0});var e=function(t){Ot(r,uu(Error));var n=Mt(r);function r(i){var o;return X(this,r),(o=n.call(this,"validation failed")).errors=i,o.ajv=o.validation=!0,o}return tt(r)}();return Ov.default=e,Ov}var eN,Mv={};function My(){if(eN)return Mv;eN=1,Object.defineProperty(Mv,"__esModule",{value:!0});var e=Jr,t=function(n){Ot(i,uu(Error));var r=Mt(i);function i(o,a,s,u){var c;return X(this,i),(c=r.call(this,u||"can't resolve reference ".concat(s," from id ").concat(a))).missingRef=(0,e.resolveUrl)(o,a,s),c.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(o,c.missingRef)),c}return tt(i)}();return Mv.default=t,Mv}var yi={};Object.defineProperty(yi,"__esModule",{value:!0}),yi.resolveSchema=yi.getCompilingSchema=yi.resolveRef=yi.compileSchema=yi.SchemaEnv=void 0;var So=pn(),Net=Oy(),ru=gs(),Co=Jr,nN=Sn,Iet=_v(),Ev=tt(function e(t){var n,r;X(this,e),this.refs={},this.dynamicAnchors={},ee(t.schema)=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,Co.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}});function Ey(e){var t=rN.call(this,e);if(t)return t;var n,r=(0,Co.getFullPath)(this.opts.uriResolver,e.root.baseId),i=this.opts.code,o=i.es5,a=i.lines,s=this.opts.ownProperties,u=new So.CodeGen(this.scope,{es5:o,lines:a,ownProperties:s});e.$async&&(n=u.scopeValue("Error",{ref:Net.default,code:(0,So._)(jx||(jx=et(['require("ajv/dist/runtime/validation_error").default'])))}));var c=u.scopeName("validate");e.validateName=c;var l,f={gen:u,allErrors:this.opts.allErrors,data:ru.default.data,parentData:ru.default.parentData,parentDataProperty:ru.default.parentDataProperty,dataNames:[ru.default.data],dataPathArr:[So.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,So.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:So.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,So._)(Sx||(Sx=et(['""']))),opts:this.opts,self:this};try{this._compilations.add(e),(0,Iet.validateFunctionCode)(f),u.optimize(this.opts.code.optimize);var h=u.toString();l="".concat(u.scopeRefs(ru.default.scope),"return ").concat(h),this.opts.code.process&&(l=this.opts.code.process(l,e));var d=new Function("".concat(ru.default.self),"".concat(ru.default.scope),l)(this,this.scope.get());if(this.scope.value(c,{ref:d}),d.errors=null,d.schema=e.schema,d.schemaEnv=e,e.$async&&(d.$async=!0),this.opts.code.source===!0&&(d.source={validateName:c,validateCode:h,scopeValues:u._values}),this.opts.unevaluated){var v=f.props,p=f.items;d.evaluated={props:v instanceof So.Name?void 0:v,items:p instanceof So.Name?void 0:p,dynamicProps:v instanceof So.Name,dynamicItems:p instanceof So.Name},d.source&&(d.source.evaluated=(0,So.stringify)(d.evaluated))}return e.validate=d,e}catch(m){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),m}finally{this._compilations.delete(e)}}function Det(e){return(0,Co.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Ey.call(this,e)}function rN(e){var t,n,r,i=at(this._compilations);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(r=e,(n=o).schema===r.schema&&n.root===r.root&&n.baseId===r.baseId)return o}}catch(a){i.e(a)}finally{i.f()}}function Let(e,t){for(var n;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||Av.call(this,e,t)}function Av(e,t){var n=this.opts.uriResolver.parse(t),r=(0,Co._getFullPath)(this.opts.uriResolver,n),i=(0,Co.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===i)return Ay.call(this,n,e);var o=(0,Co.normalizeId)(r),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){var s=Av.call(this,e,a);return ee(s==null?void 0:s.schema)!=="object"?void 0:Ay.call(this,n,s)}if(ee(a==null?void 0:a.schema)==="object"){if(a.validate||Ey.call(this,a),o===(0,Co.normalizeId)(t)){var u=a.schema,c=this.opts.schemaId,l=u[c];return l&&(i=(0,Co.resolveUrl)(this.opts.uriResolver,i,l)),new Ev({schema:u,schemaId:c,root:e,baseId:i})}return Ay.call(this,n,a)}}yi.SchemaEnv=Ev,yi.compileSchema=Ey,yi.resolveRef=function(e,t,n){var r;n=(0,Co.resolveUrl)(this.opts.uriResolver,t,n);var i=e.refs[n];if(i)return i;var o=Let.call(this,e,n);if(o===void 0){var a=(r=e.localRefs)===null||r===void 0?void 0:r[n],s=this.opts.schemaId;a&&(o=new Ev({schema:a,schemaId:s,root:e,baseId:t}))}return o!==void 0?e.refs[n]=Det.call(this,o):void 0},yi.getCompilingSchema=rN,yi.resolveSchema=Av;var Bet=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ay(e,t){var n,r=t.baseId,i=t.schema,o=t.root;if(((n=e.fragment)===null||n===void 0?void 0:n[0])==="/"){var a,s,u=at(e.fragment.slice(1).split("/"));try{for(u.s();!(a=u.n()).done;){var c=a.value;if(typeof i=="boolean")return;var l=i[(0,nN.unescapeFragment)(c)];if(l===void 0)return;var f=ee(i=l)==="object"&&i[this.opts.schemaId];!Bet.has(c)&&f&&(r=(0,Co.resolveUrl)(this.opts.uriResolver,r,f))}}catch(v){u.e(v)}finally{u.f()}if(typeof i!="boolean"&&i.$ref&&!(0,nN.schemaHasRulesButRef)(i,this.RULES)){var h=(0,Co.resolveUrl)(this.opts.uriResolver,r,i.$ref);s=Av.call(this,o,h)}var d=this.opts.schemaId;return(s=s||new Ev({schema:i,schemaId:d,root:o,baseId:r})).schema!==s.root.schema?s:void 0}}var zet={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},Py={},iN={exports:{}};(function(e){function t(){for(var Z=arguments.length,ct=Array(Z),lt=0;lt<Z;lt++)ct[lt]=arguments[lt];if(ct.length>1){ct[0]=ct[0].slice(0,-1);for(var rt=ct.length-1,Tt=1;Tt<rt;++Tt)ct[Tt]=ct[Tt].slice(1,-1);return ct[rt]=ct[rt].slice(1),ct.join("")}return ct[0]}function n(Z){return"(?:"+Z+")"}function r(Z){return Z===void 0?"undefined":Z===null?"null":Object.prototype.toString.call(Z).split(" ").pop().split("]").shift().toLowerCase()}function i(Z){return Z.toUpperCase()}function o(Z){return Z!=null?Z instanceof Array?Z:typeof Z.length!="number"||Z.split||Z.setInterval||Z.call?[Z]:Array.prototype.slice.call(Z):[]}function a(Z,ct){var lt=Z;if(ct)for(var rt in ct)lt[rt]=ct[rt];return lt}function s(Z){var ct="[A-Za-z]",lt="[0-9]",rt=t(lt,"[A-Fa-f]"),Tt=n(n("%[EFef]"+rt+"%"+rt+rt+"%"+rt+rt)+"|"+n("%[89A-Fa-f]"+rt+"%"+rt+rt)+"|"+n("%"+rt+rt)),te="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ye=t("[\\:\\/\\?\\#\\[\\]\\@]",te),en=Z?"[\\uE000-\\uF8FF]":"[]",ze=t(ct,lt,"[\\-\\.\\_\\~]",Z?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");n(ct+t(ct,lt,"[\\+\\-\\.]")+"*"),n(n(Tt+"|"+t(ze,te,"[\\:]"))+"*");var bn=n(n("25[0-5]")+"|"+n("2[0-4]"+lt)+"|"+n("1"+lt+lt)+"|"+n("0?[1-9]"+lt)+"|0?0?"+lt),On=n(bn+"\\."+bn+"\\."+bn+"\\."+bn),Re=n(rt+"{1,4}"),dn=n(n(Re+"\\:"+Re)+"|"+On),nt=n(n(Re+"\\:")+"{6}"+dn),Et=n("\\:\\:"+n(Re+"\\:")+"{5}"+dn),Vt=n(n(Re)+"?\\:\\:"+n(Re+"\\:")+"{4}"+dn),ne=n(n(n(Re+"\\:")+"{0,1}"+Re)+"?\\:\\:"+n(Re+"\\:")+"{3}"+dn),oe=n(n(n(Re+"\\:")+"{0,2}"+Re)+"?\\:\\:"+n(Re+"\\:")+"{2}"+dn),Ie=n(n(n(Re+"\\:")+"{0,3}"+Re)+"?\\:\\:"+Re+"\\:"+dn),Ye=n(n(n(Re+"\\:")+"{0,4}"+Re)+"?\\:\\:"+dn),pe=n(n(n(Re+"\\:")+"{0,5}"+Re)+"?\\:\\:"+Re),me=n(n(n(Re+"\\:")+"{0,6}"+Re)+"?\\:\\:"),xe=n([nt,Et,Vt,ne,oe,Ie,Ye,pe,me].join("|")),wn=n(n(ze+"|"+Tt)+"+");n("[vV]"+rt+"+\\."+t(ze,te,"[\\:]")+"+"),n(n(Tt+"|"+t(ze,te))+"*");var xn=n(Tt+"|"+t(ze,te,"[\\:\\@]"));return n(n(Tt+"|"+t(ze,te,"[\\@]"))+"+"),n(n(xn+"|"+t("[\\/\\?]",en))+"*"),{NOT_SCHEME:new RegExp(t("[^]",ct,lt,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",ze,te),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",ze,te),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",ze,te),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",ze,te),"g"),NOT_QUERY:new RegExp(t("[^\\%]",ze,te,"[\\:\\@\\/\\?]",en),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",ze,te,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",ze,te),"g"),UNRESERVED:new RegExp(ze,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",ze,ye),"g"),PCT_ENCODED:new RegExp(Tt,"g"),IPV4ADDRESS:new RegExp("^("+On+")$"),IPV6ADDRESS:new RegExp("^\\[?("+xe+")"+n(n("\\%25|\\%(?!"+rt+"{2})")+"("+wn+")")+"?\\]?$")}}var u=s(!1),c=s(!0),l=function(){function Z(ct,lt){var rt=[],Tt=!0,te=!1,ye=void 0;try{for(var en,ze=ct[Symbol.iterator]();!(Tt=(en=ze.next()).done)&&(rt.push(en.value),!lt||rt.length!==lt);Tt=!0);}catch(bn){te=!0,ye=bn}finally{try{!Tt&&ze.return&&ze.return()}finally{if(te)throw ye}}return rt}return function(ct,lt){if(Array.isArray(ct))return ct;if(Symbol.iterator in Object(ct))return Z(ct,lt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(Z){if(Array.isArray(Z)){for(var ct=0,lt=Array(Z.length);ct<Z.length;ct++)lt[ct]=Z[ct];return lt}return Array.from(Z)},h=2147483647,d=36,v=1,p=26,m=38,g=700,y=72,b=128,w="-",j=/^xn--/,x=/[^\0-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=d-v,N=Math.floor,A=String.fromCharCode;function L(Z){throw new RangeError(M[Z])}function W(Z,ct){for(var lt=[],rt=Z.length;rt--;)lt[rt]=ct(Z[rt]);return lt}function O(Z,ct){var lt=Z.split("@"),rt="";return lt.length>1&&(rt=lt[0]+"@",Z=lt[1]),rt+W((Z=Z.replace(R,".")).split("."),ct).join(".")}function I(Z){for(var ct=[],lt=0,rt=Z.length;lt<rt;){var Tt=Z.charCodeAt(lt++);if(Tt>=55296&&Tt<=56319&<<rt){var te=Z.charCodeAt(lt++);(64512&te)==56320?ct.push(((1023&Tt)<<10)+(1023&te)+65536):(ct.push(Tt),lt--)}else ct.push(Tt)}return ct}var q=function(Z){return String.fromCodePoint.apply(String,f(Z))},P=function(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:d},_=function(Z,ct){return Z+22+75*(Z<26)-((ct!=0)<<5)},S=function(Z,ct,lt){var rt=0;for(Z=lt?N(Z/g):Z>>1,Z+=N(Z/ct);Z>E*p>>1;rt+=d)Z=N(Z/E);return N(rt+(E+1)*Z/(Z+m))},$=function(Z){var ct=[],lt=Z.length,rt=0,Tt=b,te=y,ye=Z.lastIndexOf(w);ye<0&&(ye=0);for(var en=0;en<ye;++en)Z.charCodeAt(en)>=128&&L("not-basic"),ct.push(Z.charCodeAt(en));for(var ze=ye>0?ye+1:0;ze<lt;){for(var bn=rt,On=1,Re=d;;Re+=d){ze>=lt&&L("invalid-input");var dn=P(Z.charCodeAt(ze++));(dn>=d||dn>N((h-rt)/On))&&L("overflow"),rt+=dn*On;var nt=Re<=te?v:Re>=te+p?p:Re-te;if(dn<nt)break;var Et=d-nt;On>N(h/Et)&&L("overflow"),On*=Et}var Vt=ct.length+1;te=S(rt-bn,Vt,bn==0),N(rt/Vt)>h-Tt&&L("overflow"),Tt+=N(rt/Vt),rt%=Vt,ct.splice(rt++,0,Tt)}return String.fromCodePoint.apply(String,ct)},D=function(Z){var ct=[],lt=(Z=I(Z)).length,rt=b,Tt=0,te=y,ye=!0,en=!1,ze=void 0;try{for(var bn,On=Z[Symbol.iterator]();!(ye=(bn=On.next()).done);ye=!0){var Re=bn.value;Re<128&&ct.push(A(Re))}}catch(_o){en=!0,ze=_o}finally{try{!ye&&On.return&&On.return()}finally{if(en)throw ze}}var dn=ct.length,nt=dn;for(dn&&ct.push(w);nt<lt;){var Et=h,Vt=!0,ne=!1,oe=void 0;try{for(var Ie,Ye=Z[Symbol.iterator]();!(Vt=(Ie=Ye.next()).done);Vt=!0){var pe=Ie.value;pe>=rt&&pe<Et&&(Et=pe)}}catch(_o){ne=!0,oe=_o}finally{try{!Vt&&Ye.return&&Ye.return()}finally{if(ne)throw oe}}var me=nt+1;Et-rt>N((h-Tt)/me)&&L("overflow"),Tt+=(Et-rt)*me,rt=Et;var xe=!0,wn=!1,xn=void 0;try{for(var kr,Zi=Z[Symbol.iterator]();!(xe=(kr=Zi.next()).done);xe=!0){var su=kr.value;if(su<rt&&++Tt>h&&L("overflow"),su==rt){for(var Ea=Tt,ci=d;;ci+=d){var Pi=ci<=te?v:ci>=te+p?p:ci-te;if(Ea<Pi)break;var Aa=Ea-Pi,br=d-Pi;ct.push(A(_(Pi+Aa%br,0))),Ea=N(Aa/br)}ct.push(A(_(Ea,0))),te=S(Tt,me,nt==dn),Tt=0,++nt}}}catch(_o){wn=!0,xn=_o}finally{try{!xe&&Zi.return&&Zi.return()}finally{if(wn)throw xn}}++Tt,++rt}return ct.join("")},B=function(Z){return O(Z,function(ct){return j.test(ct)?$(ct.slice(4).toLowerCase()):ct})},k=function(Z){return O(Z,function(ct){return x.test(ct)?"xn--"+D(ct):ct})},H={version:"2.1.0",ucs2:{decode:I,encode:q},decode:$,encode:D,toASCII:k,toUnicode:B},U={};function st(Z){var ct=Z.charCodeAt(0);return ct<16?"%0"+ct.toString(16).toUpperCase():ct<128?"%"+ct.toString(16).toUpperCase():ct<2048?"%"+(ct>>6|192).toString(16).toUpperCase()+"%"+(63&ct|128).toString(16).toUpperCase():"%"+(ct>>12|224).toString(16).toUpperCase()+"%"+(ct>>6&63|128).toString(16).toUpperCase()+"%"+(63&ct|128).toString(16).toUpperCase()}function ut(Z){for(var ct="",lt=0,rt=Z.length;lt<rt;){var Tt=parseInt(Z.substr(lt+1,2),16);if(Tt<128)ct+=String.fromCharCode(Tt),lt+=3;else if(Tt>=194&&Tt<224){if(rt-lt>=6){var te=parseInt(Z.substr(lt+4,2),16);ct+=String.fromCharCode((31&Tt)<<6|63&te)}else ct+=Z.substr(lt,6);lt+=6}else if(Tt>=224){if(rt-lt>=9){var ye=parseInt(Z.substr(lt+4,2),16),en=parseInt(Z.substr(lt+7,2),16);ct+=String.fromCharCode((15&Tt)<<12|(63&ye)<<6|63&en)}else ct+=Z.substr(lt,9);lt+=9}else ct+=Z.substr(lt,3),lt+=3}return ct}function gt(Z,ct){function lt(rt){var Tt=ut(rt);return Tt.match(ct.UNRESERVED)?Tt:rt}return Z.scheme&&(Z.scheme=String(Z.scheme).replace(ct.PCT_ENCODED,lt).toLowerCase().replace(ct.NOT_SCHEME,"")),Z.userinfo!==void 0&&(Z.userinfo=String(Z.userinfo).replace(ct.PCT_ENCODED,lt).replace(ct.NOT_USERINFO,st).replace(ct.PCT_ENCODED,i)),Z.host!==void 0&&(Z.host=String(Z.host).replace(ct.PCT_ENCODED,lt).toLowerCase().replace(ct.NOT_HOST,st).replace(ct.PCT_ENCODED,i)),Z.path!==void 0&&(Z.path=String(Z.path).replace(ct.PCT_ENCODED,lt).replace(Z.scheme?ct.NOT_PATH:ct.NOT_PATH_NOSCHEME,st).replace(ct.PCT_ENCODED,i)),Z.query!==void 0&&(Z.query=String(Z.query).replace(ct.PCT_ENCODED,lt).replace(ct.NOT_QUERY,st).replace(ct.PCT_ENCODED,i)),Z.fragment!==void 0&&(Z.fragment=String(Z.fragment).replace(ct.PCT_ENCODED,lt).replace(ct.NOT_FRAGMENT,st).replace(ct.PCT_ENCODED,i)),Z}function St(Z){return Z.replace(/^0*(.*)/,"$1")||"0"}function Pt(Z,ct){var lt=Z.match(ct.IPV4ADDRESS)||[],rt=l(lt,2)[1];return rt?rt.split(".").map(St).join("."):Z}function pt(Z,ct){var lt=Z.match(ct.IPV6ADDRESS)||[],rt=l(lt,3),Tt=rt[1],te=rt[2];if(Tt){for(var ye=Tt.toLowerCase().split("::").reverse(),en=l(ye,2),ze=en[0],bn=en[1],On=bn?bn.split(":").map(St):[],Re=ze.split(":").map(St),dn=ct.IPV4ADDRESS.test(Re[Re.length-1]),nt=dn?7:8,Et=Re.length-nt,Vt=Array(nt),ne=0;ne<nt;++ne)Vt[ne]=On[ne]||Re[Et+ne]||"";dn&&(Vt[nt-1]=Pt(Vt[nt-1],ct));var oe=Vt.reduce(function(me,xe,wn){if(!xe||xe==="0"){var xn=me[me.length-1];xn&&xn.index+xn.length===wn?xn.length++:me.push({index:wn,length:1})}return me},[]).sort(function(me,xe){return xe.length-me.length})[0],Ie=void 0;if(oe&&oe.length>1){var Ye=Vt.slice(0,oe.index),pe=Vt.slice(oe.index+oe.length);Ie=Ye.join(":")+"::"+pe.join(":")}else Ie=Vt.join(":");return te&&(Ie+="%"+te),Ie}return Z}var Bt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,K="".match(/(){0}/)[1]===void 0;function $t(Z){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt={},rt=ct.iri!==!1?c:u;ct.reference==="suffix"&&(Z=(ct.scheme?ct.scheme+":":"")+"//"+Z);var Tt=Z.match(Bt);if(Tt){K?(lt.scheme=Tt[1],lt.userinfo=Tt[3],lt.host=Tt[4],lt.port=parseInt(Tt[5],10),lt.path=Tt[6]||"",lt.query=Tt[7],lt.fragment=Tt[8],isNaN(lt.port)&&(lt.port=Tt[5])):(lt.scheme=Tt[1]||void 0,lt.userinfo=Z.indexOf("@")!==-1?Tt[3]:void 0,lt.host=Z.indexOf("//")!==-1?Tt[4]:void 0,lt.port=parseInt(Tt[5],10),lt.path=Tt[6]||"",lt.query=Z.indexOf("?")!==-1?Tt[7]:void 0,lt.fragment=Z.indexOf("#")!==-1?Tt[8]:void 0,isNaN(lt.port)&&(lt.port=Z.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Tt[4]:void 0)),lt.host&&(lt.host=pt(Pt(lt.host,rt),rt)),lt.scheme!==void 0||lt.userinfo!==void 0||lt.host!==void 0||lt.port!==void 0||lt.path||lt.query!==void 0?lt.scheme===void 0?lt.reference="relative":lt.fragment===void 0?lt.reference="absolute":lt.reference="uri":lt.reference="same-document",ct.reference&&ct.reference!=="suffix"&&ct.reference!==lt.reference&&(lt.error=lt.error||"URI is not a "+ct.reference+" reference.");var te=U[(ct.scheme||lt.scheme||"").toLowerCase()];if(ct.unicodeSupport||te&&te.unicodeSupport)gt(lt,rt);else{if(lt.host&&(ct.domainHost||te&&te.domainHost))try{lt.host=H.toASCII(lt.host.replace(rt.PCT_ENCODED,ut).toLowerCase())}catch(ye){lt.error=lt.error||"Host's domain name can not be converted to ASCII via punycode: "+ye}gt(lt,u)}te&&te.parse&&te.parse(lt,ct)}else lt.error=lt.error||"URI can not be parsed.";return lt}function Kt(Z,ct){var lt=ct.iri!==!1?c:u,rt=[];return Z.userinfo!==void 0&&(rt.push(Z.userinfo),rt.push("@")),Z.host!==void 0&&rt.push(pt(Pt(String(Z.host),lt),lt).replace(lt.IPV6ADDRESS,function(Tt,te,ye){return"["+te+(ye?"%25"+ye:"")+"]"})),typeof Z.port!="number"&&typeof Z.port!="string"||(rt.push(":"),rt.push(String(Z.port))),rt.length?rt.join(""):void 0}var Ct=/^\.\.?\//,V=/^\/\.(\/|$)/,Q=/^\/\.\.(\/|$)/,ft=/^\/?(?:.|\n)*?(?=\/|$)/;function wt(Z){for(var ct=[];Z.length;)if(Z.match(Ct))Z=Z.replace(Ct,"");else if(Z.match(V))Z=Z.replace(V,"/");else if(Z.match(Q))Z=Z.replace(Q,"/"),ct.pop();else if(Z==="."||Z==="..")Z="";else{var lt=Z.match(ft);if(!lt)throw new Error("Unexpected dot segment condition");var rt=lt[0];Z=Z.slice(rt.length),ct.push(rt)}return ct.join("")}function _t(Z){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=ct.iri?c:u,rt=[],Tt=U[(ct.scheme||Z.scheme||"").toLowerCase()];if(Tt&&Tt.serialize&&Tt.serialize(Z,ct),Z.host&&!lt.IPV6ADDRESS.test(Z.host)){if(ct.domainHost||Tt&&Tt.domainHost)try{Z.host=ct.iri?H.toUnicode(Z.host):H.toASCII(Z.host.replace(lt.PCT_ENCODED,ut).toLowerCase())}catch(en){Z.error=Z.error||"Host's domain name can not be converted to "+(ct.iri?"Unicode":"ASCII")+" via punycode: "+en}}gt(Z,lt),ct.reference!=="suffix"&&Z.scheme&&(rt.push(Z.scheme),rt.push(":"));var te=Kt(Z,ct);if(te!==void 0&&(ct.reference!=="suffix"&&rt.push("//"),rt.push(te),Z.path&&Z.path.charAt(0)!=="/"&&rt.push("/")),Z.path!==void 0){var ye=Z.path;ct.absolutePath||Tt&&Tt.absolutePath||(ye=wt(ye)),te===void 0&&(ye=ye.replace(/^\/\//,"/%2F")),rt.push(ye)}return Z.query!==void 0&&(rt.push("?"),rt.push(Z.query)),Z.fragment!==void 0&&(rt.push("#"),rt.push(Z.fragment)),rt.join("")}function Ut(Z,ct){var lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},rt={};return arguments[3]||(Z=$t(_t(Z,lt),lt),ct=$t(_t(ct,lt),lt)),!(lt=lt||{}).tolerant&&ct.scheme?(rt.scheme=ct.scheme,rt.userinfo=ct.userinfo,rt.host=ct.host,rt.port=ct.port,rt.path=wt(ct.path||""),rt.query=ct.query):(ct.userinfo!==void 0||ct.host!==void 0||ct.port!==void 0?(rt.userinfo=ct.userinfo,rt.host=ct.host,rt.port=ct.port,rt.path=wt(ct.path||""),rt.query=ct.query):(ct.path?(ct.path.charAt(0)==="/"?rt.path=wt(ct.path):(Z.userinfo===void 0&&Z.host===void 0&&Z.port===void 0||Z.path?Z.path?rt.path=Z.path.slice(0,Z.path.lastIndexOf("/")+1)+ct.path:rt.path=ct.path:rt.path="/"+ct.path,rt.path=wt(rt.path)),rt.query=ct.query):(rt.path=Z.path,ct.query!==void 0?rt.query=ct.query:rt.query=Z.query),rt.userinfo=Z.userinfo,rt.host=Z.host,rt.port=Z.port),rt.scheme=Z.scheme),rt.fragment=ct.fragment,rt}function zt(Z,ct,lt){var rt=a({scheme:"null"},lt);return _t(Ut($t(Z,rt),$t(ct,rt),rt,!0),rt)}function $e(Z,ct){return typeof Z=="string"?Z=_t($t(Z,ct),ct):r(Z)==="object"&&(Z=$t(_t(Z,ct),ct)),Z}function qe(Z,ct,lt){return typeof Z=="string"?Z=_t($t(Z,lt),lt):r(Z)==="object"&&(Z=_t(Z,lt)),typeof ct=="string"?ct=_t($t(ct,lt),lt):r(ct)==="object"&&(ct=_t(ct,lt)),Z===ct}function De(Z,ct){return Z&&Z.toString().replace(ct&&ct.iri?c.ESCAPE:u.ESCAPE,st)}function re(Z,ct){return Z&&Z.toString().replace(ct&&ct.iri?c.PCT_ENCODED:u.PCT_ENCODED,ut)}var Ne={scheme:"http",domainHost:!0,parse:function(Z,ct){return Z.host||(Z.error=Z.error||"HTTP URIs must have a host."),Z},serialize:function(Z,ct){var lt=String(Z.scheme).toLowerCase()==="https";return Z.port!==(lt?443:80)&&Z.port!==""||(Z.port=void 0),Z.path||(Z.path="/"),Z}},Xe={scheme:"https",domainHost:Ne.domainHost,parse:Ne.parse,serialize:Ne.serialize};function Bn(Z){return typeof Z.secure=="boolean"?Z.secure:String(Z.scheme).toLowerCase()==="wss"}var ue={scheme:"ws",domainHost:!0,parse:function(Z,ct){var lt=Z;return lt.secure=Bn(lt),lt.resourceName=(lt.path||"/")+(lt.query?"?"+lt.query:""),lt.path=void 0,lt.query=void 0,lt},serialize:function(Z,ct){if(Z.port!==(Bn(Z)?443:80)&&Z.port!==""||(Z.port=void 0),typeof Z.secure=="boolean"&&(Z.scheme=Z.secure?"wss":"ws",Z.secure=void 0),Z.resourceName){var lt=Z.resourceName.split("?"),rt=l(lt,2),Tt=rt[0],te=rt[1];Z.path=Tt&&Tt!=="/"?Tt:void 0,Z.query=te,Z.resourceName=void 0}return Z.fragment=void 0,Z}},_n={scheme:"wss",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize},Qe={},gn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ln="[0-9A-Fa-f]",ir=n(n("%[EFef]"+ln+"%"+ln+ln+"%"+ln+ln)+"|"+n("%[89A-Fa-f]"+ln+"%"+ln+ln)+"|"+n("%"+ln+ln)),or="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ar=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),zn="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",an=new RegExp(gn,"g"),bt=new RegExp(ir,"g"),ie=new RegExp(t("[^]",or,"[\\.]",'[\\"]',ar),"g"),Le=new RegExp(t("[^]",gn,zn),"g"),yt=Le;function Zt(Z){var ct=ut(Z);return ct.match(an)?ct:Z}var Gt={scheme:"mailto",parse:function(Z,ct){var lt=Z,rt=lt.to=lt.path?lt.path.split(","):[];if(lt.path=void 0,lt.query){for(var Tt=!1,te={},ye=lt.query.split("&"),en=0,ze=ye.length;en<ze;++en){var bn=ye[en].split("=");switch(bn[0]){case"to":for(var On=bn[1].split(","),Re=0,dn=On.length;Re<dn;++Re)rt.push(On[Re]);break;case"subject":lt.subject=re(bn[1],ct);break;case"body":lt.body=re(bn[1],ct);break;default:Tt=!0,te[re(bn[0],ct)]=re(bn[1],ct)}}Tt&&(lt.headers=te)}lt.query=void 0;for(var nt=0,Et=rt.length;nt<Et;++nt){var Vt=rt[nt].split("@");if(Vt[0]=re(Vt[0]),ct.unicodeSupport)Vt[1]=re(Vt[1],ct).toLowerCase();else try{Vt[1]=H.toASCII(re(Vt[1],ct).toLowerCase())}catch(ne){lt.error=lt.error||"Email address's domain name can not be converted to ASCII via punycode: "+ne}rt[nt]=Vt.join("@")}return lt},serialize:function(Z,ct){var lt=Z,rt=o(Z.to);if(rt){for(var Tt=0,te=rt.length;Tt<te;++Tt){var ye=String(rt[Tt]),en=ye.lastIndexOf("@"),ze=ye.slice(0,en).replace(bt,Zt).replace(bt,i).replace(ie,st),bn=ye.slice(en+1);try{bn=ct.iri?H.toUnicode(bn):H.toASCII(re(bn,ct).toLowerCase())}catch(nt){lt.error=lt.error||"Email address's domain name can not be converted to "+(ct.iri?"Unicode":"ASCII")+" via punycode: "+nt}rt[Tt]=ze+"@"+bn}lt.path=rt.join(",")}var On=Z.headers=Z.headers||{};Z.subject&&(On.subject=Z.subject),Z.body&&(On.body=Z.body);var Re=[];for(var dn in On)On[dn]!==Qe[dn]&&Re.push(dn.replace(bt,Zt).replace(bt,i).replace(Le,st)+"="+On[dn].replace(bt,Zt).replace(bt,i).replace(yt,st));return Re.length&&(lt.query=Re.join("&")),lt}},fe=/^([^\:]+)\:(.*)/,Nn={scheme:"urn",parse:function(Z,ct){var lt=Z.path&&Z.path.match(fe),rt=Z;if(lt){var Tt=ct.scheme||rt.scheme||"urn",te=lt[1].toLowerCase(),ye=lt[2],en=Tt+":"+(ct.nid||te),ze=U[en];rt.nid=te,rt.nss=ye,rt.path=void 0,ze&&(rt=ze.parse(rt,ct))}else rt.error=rt.error||"URN can not be parsed.";return rt},serialize:function(Z,ct){var lt=ct.scheme||Z.scheme||"urn",rt=Z.nid,Tt=lt+":"+(ct.nid||rt),te=U[Tt];te&&(Z=te.serialize(Z,ct));var ye=Z,en=Z.nss;return ye.path=(rt||ct.nid)+":"+en,ye}},tn=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Tr={scheme:"urn:uuid",parse:function(Z,ct){var lt=Z;return lt.uuid=lt.nss,lt.nss=void 0,ct.tolerant||lt.uuid&<.uuid.match(tn)||(lt.error=lt.error||"UUID is not valid."),lt},serialize:function(Z,ct){var lt=Z;return lt.nss=(Z.uuid||"").toLowerCase(),lt}};U[Ne.scheme]=Ne,U[Xe.scheme]=Xe,U[ue.scheme]=ue,U[_n.scheme]=_n,U[Gt.scheme]=Gt,U[Nn.scheme]=Nn,U[Tr.scheme]=Tr,e.SCHEMES=U,e.pctEncChar=st,e.pctDecChars=ut,e.parse=$t,e.removeDotSegments=wt,e.serialize=_t,e.resolveComponents=Ut,e.resolve=zt,e.normalize=$e,e.equal=qe,e.escapeComponent=De,e.unescapeComponent=re,Object.defineProperty(e,"__esModule",{value:!0})})(iN.exports);var Fet=iN.exports;Object.defineProperty(Py,"__esModule",{value:!0});var oN=Fet;oN.code='require("ajv/dist/runtime/uri").default',Py.default=oN,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=_v();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=pn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Oy(),i=My(),o=nu,a=yi,s=pn(),u=Jr,c=af,l=Sn,f=zet,h=Py,d=function(P,_){return new RegExp(P,_)};d.code="new RegExp";var v=["removeAdditional","useDefaults","coerceTypes"],p=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={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=function(){function P(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};X(this,P),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,_=this.opts=dt(dt({},_),function(k){var H,U,st,ut,gt,St,Pt,pt,Bt,K,$t,Kt,Ct,V,Q,ft,wt,_t,Ut,zt,$e,qe,De,re,Ne,Xe=k.strict,Bn=(H=k.code)===null||H===void 0?void 0:H.optimize,ue=Bn===!0||Bn===void 0?1:Bn||0,_n=(st=(U=k.code)===null||U===void 0?void 0:U.regExp)!==null&&st!==void 0?st:d,Qe=(ut=k.uriResolver)!==null&&ut!==void 0?ut:h.default;return{strictSchema:(St=(gt=k.strictSchema)!==null&>!==void 0?gt:Xe)===null||St===void 0||St,strictNumbers:(pt=(Pt=k.strictNumbers)!==null&&Pt!==void 0?Pt:Xe)===null||pt===void 0||pt,strictTypes:(K=(Bt=k.strictTypes)!==null&&Bt!==void 0?Bt:Xe)!==null&&K!==void 0?K:"log",strictTuples:(Kt=($t=k.strictTuples)!==null&&$t!==void 0?$t:Xe)!==null&&Kt!==void 0?Kt:"log",strictRequired:(V=(Ct=k.strictRequired)!==null&&Ct!==void 0?Ct:Xe)!==null&&V!==void 0&&V,code:k.code?dt(dt({},k.code),{},{optimize:ue,regExp:_n}):{optimize:ue,regExp:_n},loopRequired:(Q=k.loopRequired)!==null&&Q!==void 0?Q:200,loopEnum:(ft=k.loopEnum)!==null&&ft!==void 0?ft:200,meta:(wt=k.meta)===null||wt===void 0||wt,messages:(_t=k.messages)===null||_t===void 0||_t,inlineRefs:(Ut=k.inlineRefs)===null||Ut===void 0||Ut,schemaId:(zt=k.schemaId)!==null&&zt!==void 0?zt:"$id",addUsedSchema:($e=k.addUsedSchema)===null||$e===void 0||$e,validateSchema:(qe=k.validateSchema)===null||qe===void 0||qe,validateFormats:(De=k.validateFormats)===null||De===void 0||De,unicodeRegExp:(re=k.unicodeRegExp)===null||re===void 0||re,int32range:(Ne=k.int32range)===null||Ne===void 0||Ne,uriResolver:Qe}}(_));var S=this.opts.code,$=S.es5,D=S.lines;this.scope=new s.ValueScope({scope:{},prefixes:p,es5:$,lines:D}),this.logger=function(k){if(k===!1)return E;if(k===void 0)return console;if(k.log&&k.warn&&k.error)return k;throw new Error("logger must implement log, warn and error methods")}(_.logger);var B=_.validateFormats;_.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,m,_,"NOT SUPPORTED"),b.call(this,g,_,"DEPRECATED","warn"),this._metaOpts=M.call(this),_.formats&&x.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),_.keywords&&R.call(this,_.keywords),ee(_.meta)=="object"&&this.addMetaSchema(_.meta),j.call(this),_.validateFormats=B}return tt(P,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var _=this.opts,S=_.$data,$=_.meta,D=_.schemaId,B=f;D==="id"&&((B=dt({},f)).id=B.$id,delete B.$id),$&&S&&this.addMetaSchema(B,B[D],!1)}},{key:"defaultMeta",value:function(){var _=this.opts,S=_.meta,$=_.schemaId;return this.opts.defaultMeta=ee(S)=="object"?S[$]||S:void 0}},{key:"validate",value:function(_,S){var $;if(typeof _=="string"){if(!($=this.getSchema(_)))throw new Error('no schema with key or ref "'.concat(_,'"'))}else $=this.compile(_);var D=$(S);return"$async"in $||(this.errors=$.errors),D}},{key:"compile",value:function(_,S){var $=this._addSchema(_,S);return $.validate||this._compileSchemaEnv($)}},{key:"compileAsync",value:function(_,S){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");var $=this.opts.loadSchema;return D.call(this,_,S);function D(Bt,K){return B.apply(this,arguments)}function B(){return(B=Ee(Ft().mark(function Bt(K,$t){var Kt;return Ft().wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return Ct.next=2,k.call(this,K.$schema);case 2:return Kt=this._addSchema(K,$t),Ct.abrupt("return",Kt.validate||U.call(this,Kt));case 4:case"end":return Ct.stop()}},Bt,this)}))).apply(this,arguments)}function k(Bt){return H.apply(this,arguments)}function H(){return(H=Ee(Ft().mark(function Bt(K){return Ft().wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:if(!K||this.getSchema(K)){$t.next=3;break}return $t.next=3,D.call(this,{$ref:K},!0);case 3:case"end":return $t.stop()}},Bt,this)}))).apply(this,arguments)}function U(Bt){return st.apply(this,arguments)}function st(){return(st=Ee(Ft().mark(function Bt(K){return Ft().wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.prev=0,$t.abrupt("return",this._compileSchemaEnv(K));case 4:if($t.prev=4,$t.t0=$t.catch(0),$t.t0 instanceof i.default){$t.next=8;break}throw $t.t0;case 8:return ut.call(this,$t.t0),$t.next=11,gt.call(this,$t.t0.missingSchema);case 11:return $t.abrupt("return",U.call(this,K));case 12:case"end":return $t.stop()}},Bt,this,[[0,4]])}))).apply(this,arguments)}function ut(Bt){var K=Bt.missingSchema,$t=Bt.missingRef;if(this.refs[K])throw new Error("AnySchema ".concat(K," is loaded but ").concat($t," cannot be resolved"))}function gt(Bt){return St.apply(this,arguments)}function St(){return St=Ee(Ft().mark(function Bt(K){var $t;return Ft().wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return Kt.next=2,Pt.call(this,K);case 2:if($t=Kt.sent,this.refs[K]){Kt.next=6;break}return Kt.next=6,k.call(this,$t.$schema);case 6:this.refs[K]||this.addSchema($t,K,S);case 7:case"end":return Kt.stop()}},Bt,this)})),St.apply(this,arguments)}function Pt(Bt){return pt.apply(this,arguments)}function pt(){return pt=Ee(Ft().mark(function Bt(K){var $t;return Ft().wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!($t=this._loading[K])){Kt.next=3;break}return Kt.abrupt("return",$t);case 3:return Kt.prev=3,Kt.next=6,this._loading[K]=$(K);case 6:return Kt.abrupt("return",Kt.sent);case 7:return Kt.prev=7,delete this._loading[K],Kt.finish(7);case 10:case"end":return Kt.stop()}},Bt,this,[[3,,7,10]])})),pt.apply(this,arguments)}}},{key:"addSchema",value:function(_,S,$){var D,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.validateSchema;if(Array.isArray(_)){var k,H=at(_);try{for(H.s();!(k=H.n()).done;){var U=k.value;this.addSchema(U,void 0,$,B)}}catch(ut){H.e(ut)}finally{H.f()}return this}if(ee(_)==="object"){var st=this.opts.schemaId;if((D=_[st])!==void 0&&typeof D!="string")throw new Error("schema ".concat(st," must be string"))}return S=(0,u.normalizeId)(S||D),this._checkUnique(S),this.schemas[S]=this._addSchema(_,$,S,B,!0),this}},{key:"addMetaSchema",value:function(_,S){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.opts.validateSchema;return this.addSchema(_,S,!0,$),this}},{key:"validateSchema",value:function(_,S){if(typeof _=="boolean")return!0;var $;if(($=_.$schema)!==void 0&&typeof $!="string")throw new Error("$schema must be a string");if(!($=$||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var D=this.validate($,_);if(!D&&S){var B="schema is invalid: "+this.errorsText();if(this.opts.validateSchema!=="log")throw new Error(B);this.logger.error(B)}return D}},{key:"getSchema",value:function(_){for(var S;typeof(S=w.call(this,_))=="string";)_=S;if(S===void 0){var $=this.opts.schemaId,D=new a.SchemaEnv({schema:{},schemaId:$});if(!(S=a.resolveSchema.call(this,D,_)))return;this.refs[_]=S}return S.validate||this._compileSchemaEnv(S)}},{key:"removeSchema",value:function(_){if(_ instanceof RegExp)return this._removeAllSchemas(this.schemas,_),this._removeAllSchemas(this.refs,_),this;switch(ee(_)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var S=w.call(this,_);return ee(S)=="object"&&this._cache.delete(S.schema),delete this.schemas[_],delete this.refs[_],this;case"object":var $=_;this._cache.delete($);var D=_[this.opts.schemaId];return D&&(D=(0,u.normalizeId)(D),delete this.schemas[D],delete this.refs[D]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(_){var S,$=at(_);try{for($.s();!(S=$.n()).done;){var D=S.value;this.addKeyword(D)}}catch(B){$.e(B)}finally{$.f()}return this}},{key:"addKeyword",value:function(_,S){var $,D=this;if(typeof _=="string")$=_,ee(S)=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),S.keyword=$);else{if(ee(_)!="object"||S!==void 0)throw new Error("invalid addKeywords parameters");if($=(S=_).keyword,Array.isArray($)&&!$.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,$,S),!S)return(0,l.eachItem)($,function(k){return L.call(D,k)}),this;O.call(this,S);var B=dt(dt({},S),{},{type:(0,c.getJSONTypes)(S.type),schemaType:(0,c.getJSONTypes)(S.schemaType)});return(0,l.eachItem)($,B.type.length===0?function(k){return L.call(D,k,B)}:function(k){return B.type.forEach(function(H){return L.call(D,k,B,H)})}),this}},{key:"getKeyword",value:function(_){var S=this.RULES.all[_];return ee(S)=="object"?S.definition:!!S}},{key:"removeKeyword",value:function(_){var S=this.RULES;delete S.keywords[_],delete S.all[_];var $,D=at(S.rules);try{for(D.s();!($=D.n()).done;){var B=$.value,k=B.rules.findIndex(function(H){return H.keyword===_});k>=0&&B.rules.splice(k,1)}}catch(H){D.e(H)}finally{D.f()}return this}},{key:"addFormat",value:function(_,S){return typeof S=="string"&&(S=new RegExp(S)),this.formats[_]=S,this}},{key:"errorsText",value:function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.errors,S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=S.separator,D=$===void 0?", ":$,B=S.dataVar,k=B===void 0?"data":B;return _&&_.length!==0?_.map(function(H){return"".concat(k).concat(H.instancePath," ").concat(H.message)}).reduce(function(H,U){return H+D+U}):"No errors"}},{key:"$dataMetaSchema",value:function(_,S){var $=this.RULES.all;_=JSON.parse(JSON.stringify(_));var D,B=at(S);try{for(B.s();!(D=B.n()).done;){var k,H=D.value.split("/").slice(1),U=_,st=at(H);try{for(st.s();!(k=st.n()).done;)U=U[k.value]}catch(pt){st.e(pt)}finally{st.f()}for(var ut in $){var gt=$[ut];if(ee(gt)=="object"){var St=gt.definition.$data,Pt=U[ut];St&&Pt&&(U[ut]=q(Pt))}}}}catch(pt){B.e(pt)}finally{B.f()}return _}},{key:"_removeAllSchemas",value:function(_,S){for(var $ in _){var D=_[$];S&&!S.test($)||(typeof D=="string"?delete _[$]:D&&!D.meta&&(this._cache.delete(D.schema),delete _[$]))}}},{key:"_addSchema",value:function(_,S,$){var D,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.validateSchema,k=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.opts.addUsedSchema,H=this.opts.schemaId;if(ee(_)=="object")D=_[H];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof _!="boolean")throw new Error("schema must be object or boolean")}var U=this._cache.get(_);if(U!==void 0)return U;$=(0,u.normalizeId)(D||$);var st=u.getSchemaRefs.call(this,_,$);return U=new a.SchemaEnv({schema:_,schemaId:H,meta:S,baseId:$,localRefs:st}),this._cache.set(U.schema,U),k&&!$.startsWith("#")&&($&&this._checkUnique($),this.refs[$]=U),B&&this.validateSchema(_,!0),U}},{key:"_checkUnique",value:function(_){if(this.schemas[_]||this.refs[_])throw new Error('schema with key or id "'.concat(_,'" already exists'))}},{key:"_compileSchemaEnv",value:function(_){if(_.meta?this._compileMetaSchema(_):a.compileSchema.call(this,_),!_.validate)throw new Error("ajv implementation error");return _.validate}},{key:"_compileMetaSchema",value:function(_){var S=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,_)}finally{this.opts=S}}}]),P}();function b(P,_,S){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"error";for(var D in P){var B=D;B in _&&this.logger[$]("".concat(S,": option ").concat(D,". ").concat(P[B]))}}function w(P){return P=(0,u.normalizeId)(P),this.schemas[P]||this.refs[P]}function j(){var P=this.opts.schemas;if(P)if(Array.isArray(P))this.addSchema(P);else for(var _ in P)this.addSchema(P[_],_)}function x(){for(var P in this.opts.formats){var _=this.opts.formats[P];_&&this.addFormat(P,_)}}function R(P){if(Array.isArray(P))this.addVocabulary(P);else for(var _ in this.logger.warn("keywords option as map is deprecated, pass array"),P){var S=P[_];S.keyword||(S.keyword=_),this.addKeyword(S)}}function M(){var P,_=dt({},this.opts),S=at(v);try{for(S.s();!(P=S.n()).done;)delete _[P.value]}catch($){S.e($)}finally{S.f()}return _}e.default=y,y.ValidationError=r.default,y.MissingRefError=i.default;var E={log:function(){},warn:function(){},error:function(){}},N=/^[a-z_$][a-z0-9_$:-]*$/i;function A(P,_){var S=this.RULES;if((0,l.eachItem)(P,function($){if(S.keywords[$])throw new Error("Keyword ".concat($," is already defined"));if(!N.test($))throw new Error("Keyword ".concat($," has invalid name"))}),_&&_.$data&&!("code"in _)&&!("validate"in _))throw new Error('$data keyword must have "code" or "validate" function')}function L(P,_,S){var $,D=this,B=_==null?void 0:_.post;if(S&&B)throw new Error('keyword with "post" flag cannot have "type"');var k=this.RULES,H=B?k.post:k.rules.find(function(st){return st.type===S});if(H||(H={type:S,rules:[]},k.rules.push(H)),k.keywords[P]=!0,_){var U={keyword:P,definition:dt(dt({},_),{},{type:(0,c.getJSONTypes)(_.type),schemaType:(0,c.getJSONTypes)(_.schemaType)})};_.before?W.call(this,H,U,_.before):H.rules.push(U),k.all[P]=U,($=_.implements)===null||$===void 0||$.forEach(function(st){return D.addKeyword(st)})}}function W(P,_,S){var $=P.rules.findIndex(function(D){return D.keyword===S});$>=0?P.rules.splice($,0,_):(P.rules.push(_),this.logger.warn("rule ".concat(S," is not defined")))}function O(P){var _=P.metaSchema;_!==void 0&&(P.$data&&this.opts.$data&&(_=q(_)),P.validateSchema=this.compile(_,!0))}var I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function q(P){return{anyOf:[P,I]}}}(AR);var Ty={},Ry={},Ny={};Object.defineProperty(Ny,"__esModule",{value:!0});var Vet={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ny.default=Vet;var iu={};Object.defineProperty(iu,"__esModule",{value:!0}),iu.callRef=iu.getValidate=void 0;var Wet=My(),aN=jo(),bi=pn(),Ac=gs(),sN=yi,Pv=Sn,qet={keyword:"$ref",schemaType:"string",code:function(e){var t=e.gen,n=e.schema,r=e.it,i=r.baseId,o=r.schemaEnv,a=r.validateName,s=r.opts,u=r.self,c=o.root;if((n==="#"||n==="#/")&&i===c.baseId)return function(){if(o===c)return Tv(e,a,o,o.$async);var p=t.scopeValue("root",{ref:c});return Tv(e,(0,bi._)(Cx||(Cx=et(["",".validate"])),p),c,c.$async)}();var l,f,h,d,v=sN.resolveRef.call(u,c,i,n);if(v===void 0)throw new Wet.default(r.opts.uriResolver,i,n);return v instanceof sN.SchemaEnv?function(p){var m=uN(e,p);Tv(e,m,p,p.$async)}(v):(l=v,f=t.scopeValue("schema",s.code.source===!0?{ref:l,code:(0,bi.stringify)(l)}:{ref:l}),h=t.name("valid"),d=e.subschema({schema:l,dataTypes:[],schemaPath:bi.nil,topSchemaRef:f,errSchemaPath:n},h),e.mergeEvaluated(d),void e.ok(h))}};function uN(e,t){var n=e.gen;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,bi._)($x||($x=et(["",".validate"])),n.scopeValue("wrapper",{ref:t}))}function Tv(e,t,n,r){var i=e.gen,o=e.it,a=o.allErrors,s=o.schemaEnv,u=o.opts.passContext?Ac.default.this:bi.nil;function c(f){var h=(0,bi._)(Mx||(Mx=et(["",".errors"])),f);i.assign(Ac.default.vErrors,(0,bi._)(Ex||(Ex=et([""," === null ? "," : ",".concat(",")"])),Ac.default.vErrors,h,Ac.default.vErrors,h)),i.assign(Ac.default.errors,(0,bi._)(Ax||(Ax=et(["",".length"])),Ac.default.vErrors))}function l(f){var h;if(o.opts.unevaluated){var d=(h=n==null?void 0:n.validate)===null||h===void 0?void 0:h.evaluated;if(o.props!==!0)if(d&&!d.dynamicProps)d.props!==void 0&&(o.props=Pv.mergeEvaluated.props(i,d.props,o.props));else{var v=i.var("props",(0,bi._)(Px||(Px=et(["",".evaluated.props"])),f));o.props=Pv.mergeEvaluated.props(i,v,o.props,bi.Name)}if(o.items!==!0)if(d&&!d.dynamicItems)d.items!==void 0&&(o.items=Pv.mergeEvaluated.items(i,d.items,o.items));else{var p=i.var("items",(0,bi._)(Tx||(Tx=et(["",".evaluated.items"])),f));o.items=Pv.mergeEvaluated.items(i,p,o.items,bi.Name)}}}r?function(){if(!s.$async)throw new Error("async schema referenced by sync schema");var f=i.let("valid");i.try(function(){i.code((0,bi._)(_x||(_x=et(["await ",""])),(0,aN.callValidateCode)(e,t,u))),l(t),a||i.assign(f,!0)},function(h){i.if((0,bi._)(Ox||(Ox=et(["!("," instanceof ",")"])),h,o.ValidationError),function(){return i.throw(h)}),c(h),a||i.assign(f,!1)}),e.ok(f)}():e.result((0,aN.callValidateCode)(e,t,u),function(){return l(t)},function(){return c(t)})}iu.getValidate=uN,iu.callRef=Tv,iu.default=qet,Object.defineProperty(Ry,"__esModule",{value:!0});var Het=iu,Uet=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Ny.default,Het.default];Ry.default=Uet;var Iy={},Dy={};Object.defineProperty(Dy,"__esModule",{value:!0});var Rv=pn(),bs=Rv.operators,Nv={maximum:{okStr:"<=",ok:bs.LTE,fail:bs.GT},minimum:{okStr:">=",ok:bs.GTE,fail:bs.LT},exclusiveMaximum:{okStr:"<",ok:bs.LT,fail:bs.GTE},exclusiveMinimum:{okStr:">",ok:bs.GT,fail:bs.LTE}},Jet={message:function(e){var t=e.keyword,n=e.schemaCode;return(0,Rv.str)(Rx||(Rx=et(["must be "," ",""])),Nv[t].okStr,n)},params:function(e){var t=e.keyword,n=e.schemaCode;return(0,Rv._)(Nx||(Nx=et(["{comparison: ",", limit: ","}"])),Nv[t].okStr,n)}},Ket={keyword:Object.keys(Nv),type:"number",schemaType:"number",$data:!0,error:Jet,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode;e.fail$data((0,Rv._)(Ix||(Ix=et([""," "," "," || isNaN(",")"])),n,Nv[t].fail,r,n))}};Dy.default=Ket;var Ly={};Object.defineProperty(Ly,"__esModule",{value:!0});var uf=pn(),Get={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,uf.str)(Dx||(Dx=et(["must be multiple of ",""])),t)},params:function(e){var t=e.schemaCode;return(0,uf._)(Lx||(Lx=et(["{multipleOf: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.schemaCode,i=e.it.opts.multipleOfPrecision,o=t.let("res"),a=i?(0,uf._)(Bx||(Bx=et(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,i):(0,uf._)(zx||(zx=et([""," !== parseInt(",")"])),o,o);e.fail$data((0,uf._)(Fx||(Fx=et(["("," === 0 || ("," = ","/",", ","))"])),r,o,n,r,a))}};Ly.default=Get;var By={},zy={};function cN(e){for(var t,n=e.length,r=0,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&(64512&(t=e.charCodeAt(i)))==56320&&i++;return r}Object.defineProperty(zy,"__esModule",{value:!0}),zy.default=cN,cN.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(By,"__esModule",{value:!0});var ou=pn(),Qet=Sn,Yet=zy,Zet={message:function(e){var t=e.keyword,n=e.schemaCode,r=t==="maxLength"?"more":"fewer";return(0,ou.str)(Vx||(Vx=et(["must NOT have "," than "," characters"])),r,n)},params:function(e){var t=e.schemaCode;return(0,ou._)(Wx||(Wx=et(["{limit: ","}"])),t)}},Xet={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Zet,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,i=e.it,o=t==="maxLength"?ou.operators.GT:ou.operators.LT,a=i.opts.unicode===!1?(0,ou._)(qx||(qx=et(["",".length"])),n):(0,ou._)(Hx||(Hx=et(["","(",")"])),(0,Qet.useFunc)(e.gen,Yet.default),n);e.fail$data((0,ou._)(Ux||(Ux=et([""," "," ",""])),a,o,r))}};By.default=Xet;var Fy={};Object.defineProperty(Fy,"__esModule",{value:!0});var tnt=jo(),Iv=pn(),ent={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,Iv.str)(Jx||(Jx=et(['must match pattern "','"'])),t)},params:function(e){var t=e.schemaCode;return(0,Iv._)(Kx||(Kx=et(["{pattern: ","}"])),t)}},code:function(e){var t=e.data,n=e.$data,r=e.schema,i=e.schemaCode,o=e.it.opts.unicodeRegExp?"u":"",a=n?(0,Iv._)(Gx||(Gx=et(["(new RegExp(",", ","))"])),i,o):(0,tnt.usePattern)(e,r);e.fail$data((0,Iv._)(Qx||(Qx=et(["!",".test(",")"])),a,t))}};Fy.default=ent;var Vy={};Object.defineProperty(Vy,"__esModule",{value:!0});var cf=pn(),nnt={message:function(e){var t=e.keyword,n=e.schemaCode,r=t==="maxProperties"?"more":"fewer";return(0,cf.str)(Yx||(Yx=et(["must NOT have "," than "," properties"])),r,n)},params:function(e){var t=e.schemaCode;return(0,cf._)(Zx||(Zx=et(["{limit: ","}"])),t)}},rnt={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:nnt,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,i=t==="maxProperties"?cf.operators.GT:cf.operators.LT;e.fail$data((0,cf._)(Xx||(Xx=et(["Object.keys(",").length "," ",""])),n,i,r))}};Vy.default=rnt;var Wy={};Object.defineProperty(Wy,"__esModule",{value:!0});var lf=jo(),ff=pn(),int=Sn,ont={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:function(e){var t=e.params.missingProperty;return(0,ff.str)(tk||(tk=et(["must have required property '","'"])),t)},params:function(e){var t=e.params.missingProperty;return(0,ff._)(ek||(ek=et(["{missingProperty: ","}"])),t)}},code:function(e){var t=e.gen,n=e.schema,r=e.schemaCode,i=e.data,o=e.$data,a=e.it,s=a.opts;if(o||n.length!==0){var u=n.length>=s.loopRequired;if(a.allErrors?function(){if(u||o)e.block$data(ff.nil,m);else{var g,y=at(n);try{for(y.s();!(g=y.n()).done;){var b=g.value;(0,lf.checkReportMissingProp)(e,b)}}catch(w){y.e(w)}finally{y.f()}}}():function(){var g=t.let("missing");if(u||o){var y=t.let("valid",!0);e.block$data(y,function(){return function(b,w){e.setParams({missingProperty:b}),t.forOf(b,r,function(){t.assign(w,(0,lf.propertyInData)(t,i,b,s.ownProperties)),t.if((0,ff.not)(w),function(){e.error(),t.break()})},ff.nil)}(g,y)}),e.ok(y)}else t.if((0,lf.checkMissingProp)(e,n,g)),(0,lf.reportMissingProp)(e,g),t.else()}(),s.strictRequired){var c,l=e.parentSchema.properties,f=e.it.definedProperties,h=at(n);try{for(h.s();!(c=h.n()).done;){var d=c.value;if((l==null?void 0:l[d])===void 0&&!f.has(d)){var v=a.schemaEnv.baseId+a.errSchemaPath,p='required property "'.concat(d,'" is not defined at "').concat(v,'" (strictRequired)');(0,int.checkStrictMode)(a,p,a.opts.strictRequired)}}}catch(g){h.e(g)}finally{h.f()}}}function m(){t.forOf("prop",r,function(g){e.setParams({missingProperty:g}),t.if((0,lf.noPropertyInData)(t,i,g,s.ownProperties),function(){return e.error()})})}}};Wy.default=ont;var qy={};Object.defineProperty(qy,"__esModule",{value:!0});var hf=pn(),ant={message:function(e){var t=e.keyword,n=e.schemaCode,r=t==="maxItems"?"more":"fewer";return(0,hf.str)(nk||(nk=et(["must NOT have "," than "," items"])),r,n)},params:function(e){var t=e.schemaCode;return(0,hf._)(rk||(rk=et(["{limit: ","}"])),t)}},snt={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:ant,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,i=t==="maxItems"?hf.operators.GT:hf.operators.LT;e.fail$data((0,hf._)(ik||(ik=et(["",".length "," ",""])),n,i,r))}};qy.default=snt;var Hy={},df={};Object.defineProperty(df,"__esModule",{value:!0});var lN=KR;lN.code='require("ajv/dist/runtime/equal").default',df.default=lN,Object.defineProperty(Hy,"__esModule",{value:!0});var Uy=af,Kr=pn(),unt=Sn,cnt=df,lnt={message:function(e){var t=e.params,n=t.i,r=t.j;return(0,Kr.str)(ok||(ok=et(["must NOT have duplicate items (items ## "," and "," are identical)"])),r,n)},params:function(e){var t=e.params,n=t.i,r=t.j;return(0,Kr._)(ak||(ak=et(["{i: ",", j: ","}"])),n,r)}},fnt={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:lnt,code:function(e){var t=e.gen,n=e.data,r=e.$data,i=e.schema,o=e.parentSchema,a=e.schemaCode,s=e.it;if(r||i){var u=t.let("valid"),c=o.items?(0,Uy.getSchemaTypes)(o.items):[];e.block$data(u,function(){var h=t.let("i",(0,Kr._)(uk||(uk=et(["",".length"])),n)),d=t.let("j");e.setParams({i:h,j:d}),t.assign(u,!0),t.if((0,Kr._)(ck||(ck=et([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(v){return v==="object"||v==="array"})?l:f)(h,d)})},(0,Kr._)(sk||(sk=et([""," === false"])),a)),e.ok(u)}function l(h,d){var v=t.name("item"),p=(0,Uy.checkDataTypes)(c,v,s.opts.strictNumbers,Uy.DataType.Wrong),m=t.const("indices",(0,Kr._)(lk||(lk=et(["{}"]))));t.for((0,Kr._)(fk||(fk=et([";","--;"])),h),function(){t.let(v,(0,Kr._)(hk||(hk=et(["","[","]"])),n,h)),t.if(p,(0,Kr._)(dk||(dk=et(["continue"])))),c.length>1&&t.if((0,Kr._)(vk||(vk=et(["typeof ",' == "string"'])),v),(0,Kr._)(pk||(pk=et(["",' += "_"'])),v)),t.if((0,Kr._)(mk||(mk=et(["typeof ","[",'] == "number"'])),m,v),function(){t.assign(d,(0,Kr._)(gk||(gk=et(["","[","]"])),m,v)),e.error(),t.assign(u,!1).break()}).code((0,Kr._)(yk||(yk=et(["","[","] = ",""])),m,v,h))})}function f(h,d){var v=(0,unt.useFunc)(t,cnt.default),p=t.name("outer");t.label(p).for((0,Kr._)(bk||(bk=et([";","--;"])),h),function(){return t.for((0,Kr._)(wk||(wk=et([""," = ","; ","--;"])),d,h,d),function(){return t.if((0,Kr._)(xk||(xk=et(["","(","[","], ","[","])"])),v,n,h,n,d),function(){e.error(),t.assign(u,!1).break(p)})})})}}};Hy.default=fnt;var Jy={};Object.defineProperty(Jy,"__esModule",{value:!0});var Ky=pn(),hnt=Sn,dnt=df,vnt={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(e){var t=e.schemaCode;return(0,Ky._)(kk||(kk=et(["{allowedValue: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.$data,i=e.schemaCode,o=e.schema;r||o&&ee(o)=="object"?e.fail$data((0,Ky._)(jk||(jk=et(["!","(",", ",")"])),(0,hnt.useFunc)(t,dnt.default),n,i)):e.fail((0,Ky._)(Sk||(Sk=et([""," !== ",""])),o,n))}};Jy.default=vnt;var Gy={};Object.defineProperty(Gy,"__esModule",{value:!0});var vf=pn(),pnt=Sn,mnt=df,gnt={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(e){var t=e.schemaCode;return(0,vf._)(Ck||(Ck=et(["{allowedValues: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.$data,i=e.schema,o=e.schemaCode,a=e.it;if(!r&&i.length===0)throw new Error("enum must have non-empty array");var s,u,c=i.length>=a.opts.loopEnum,l=function(){return s!=null?s:s=(0,pnt.useFunc)(t,mnt.default)};if(c||r)u=t.let("valid"),e.block$data(u,function(){t.assign(u,!1),t.forOf("v",o,function(h){return t.if((0,vf._)($k||($k=et(["","(",", ",")"])),l(),n,h),function(){return t.assign(u,!0).break()})})});else{if(!Array.isArray(i))throw new Error("ajv implementation error");var f=t.const("vSchema",o);u=vf.or.apply(void 0,Oe(i.map(function(h,d){return function(v,p){var m=i[p];return ee(m)==="object"&&m!==null?(0,vf._)(_k||(_k=et(["","(",", ","[","])"])),l(),n,v,p):(0,vf._)(Ok||(Ok=et([""," === ",""])),n,m)}(f,d)})))}e.pass(u)}};Gy.default=gnt,Object.defineProperty(Iy,"__esModule",{value:!0});var ynt=Ly,bnt=By,wnt=Fy,xnt=Vy,knt=Wy,jnt=qy,Snt=Hy,Cnt=Jy,$nt=Gy,_nt=[Dy.default,ynt.default,bnt.default,wnt.default,xnt.default,knt.default,jnt.default,Snt.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Cnt.default,$nt.default];Iy.default=_nt;var Qy={},Pc={};Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.validateAdditionalItems=void 0;var au=pn(),Yy=Sn,Ont={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(e){var t=e.params.len;return(0,au.str)(Mk||(Mk=et(["must NOT have more than "," items"])),t)},params:function(e){var t=e.params.len;return(0,au._)(Ek||(Ek=et(["{limit: ","}"])),t)}},code:function(e){var t=e.parentSchema,n=e.it,r=t.items;Array.isArray(r)?fN(e,r):(0,Yy.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function fN(e,t){var n=e.gen,r=e.schema,i=e.data,o=e.keyword,a=e.it;a.items=!0;var s=n.const("len",(0,au._)(Ak||(Ak=et(["",".length"])),i));if(r===!1)e.setParams({len:t.length}),e.pass((0,au._)(Pk||(Pk=et([""," <= ",""])),s,t.length));else if(ee(r)=="object"&&!(0,Yy.alwaysValidSchema)(a,r)){var u=n.var("valid",(0,au._)(Tk||(Tk=et([""," <= ",""])),s,t.length));n.if((0,au.not)(u),function(){return function(c){n.forRange("i",t.length,s,function(l){e.subschema({keyword:o,dataProp:l,dataPropType:Yy.Type.Num},c),a.allErrors||n.if((0,au.not)(c),function(){return n.break()})})}(u)}),e.ok(u)}}Pc.validateAdditionalItems=fN,Pc.default=Ont;var Zy={},Tc={};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.validateTuple=void 0;var hN=pn(),Dv=Sn,Mnt=jo(),Ent={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(e){var t=e.schema,n=e.it;if(Array.isArray(t))return dN(e,"additionalItems",t);n.items=!0,(0,Dv.alwaysValidSchema)(n,t)||e.ok((0,Mnt.validateArray)(e))}};function dN(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.schema,r=e.gen,i=e.parentSchema,o=e.data,a=e.keyword,s=e.it;(function(l){var f=s.opts,h=s.errSchemaPath,d=n.length,v=d===l.minItems&&(d===l.maxItems||l[t]===!1);if(f.strictTuples&&!v){var p='"'.concat(a,'" is ').concat(d,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(h,'"');(0,Dv.checkStrictMode)(s,p,f.strictTuples)}})(i),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=Dv.mergeEvaluated.items(r,n.length,s.items));var u=r.name("valid"),c=r.const("len",(0,hN._)(Rk||(Rk=et(["",".length"])),o));n.forEach(function(l,f){(0,Dv.alwaysValidSchema)(s,l)||(r.if((0,hN._)(Nk||(Nk=et([""," > ",""])),c,f),function(){return e.subschema({keyword:a,schemaProp:f,dataProp:f},u)}),e.ok(u))})}Tc.validateTuple=dN,Tc.default=Ent,Object.defineProperty(Zy,"__esModule",{value:!0});var Ant=Tc,Pnt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(e){return(0,Ant.validateTuple)(e,"items")}};Zy.default=Pnt;var Xy={};Object.defineProperty(Xy,"__esModule",{value:!0});var vN=pn(),Tnt=Sn,Rnt=jo(),Nnt=Pc,Int={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(e){var t=e.params.len;return(0,vN.str)(Ik||(Ik=et(["must NOT have more than "," items"])),t)},params:function(e){var t=e.params.len;return(0,vN._)(Dk||(Dk=et(["{limit: ","}"])),t)}},code:function(e){var t=e.schema,n=e.parentSchema,r=e.it,i=n.prefixItems;r.items=!0,(0,Tnt.alwaysValidSchema)(r,t)||(i?(0,Nnt.validateAdditionalItems)(e,i):e.ok((0,Rnt.validateArray)(e)))}};Xy.default=Int;var tb={};Object.defineProperty(tb,"__esModule",{value:!0});var Yi=pn(),Lv=Sn,Dnt={message:function(e){var t=e.params,n=t.min,r=t.max;return r===void 0?(0,Yi.str)(Lk||(Lk=et(["must contain at least "," valid item(s)"])),n):(0,Yi.str)(Bk||(Bk=et(["must contain at least "," and no more than "," valid item(s)"])),n,r)},params:function(e){var t=e.params,n=t.min,r=t.max;return r===void 0?(0,Yi._)(zk||(zk=et(["{minContains: ","}"])),n):(0,Yi._)(Fk||(Fk=et(["{minContains: ",", maxContains: ","}"])),n,r)}},Lnt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Dnt,code:function(e){var t,n,r=e.gen,i=e.schema,o=e.parentSchema,a=e.data,s=e.it,u=o.minContains,c=o.maxContains;s.opts.next?(t=u===void 0?1:u,n=c):t=1;var l=r.const("len",(0,Yi._)(Vk||(Vk=et(["",".length"])),a));if(e.setParams({min:t,max:n}),n!==void 0||t!==0){if(n!==void 0&&t>n)return(0,Lv.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,Lv.alwaysValidSchema)(s,i)){var f=(0,Yi._)(Wk||(Wk=et([""," >= ",""])),l,t);return n!==void 0&&(f=(0,Yi._)(qk||(qk=et([""," && "," <= ",""])),f,l,n)),void e.pass(f)}s.items=!0;var h=r.name("valid");n===void 0&&t===1?v(h,function(){return r.if(h,function(){return r.break()})}):t===0?(r.let(h,!0),n!==void 0&&r.if((0,Yi._)(Hk||(Hk=et(["",".length > 0"])),a),d)):(r.let(h,!1),d()),e.result(h,function(){return e.reset()})}else(0,Lv.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function d(){var p=r.name("_valid"),m=r.let("count",0);v(p,function(){return r.if(p,function(){return function(g){r.code((0,Yi._)(Uk||(Uk=et(["","++"])),g)),n===void 0?r.if((0,Yi._)(Jk||(Jk=et([""," >= ",""])),g,t),function(){return r.assign(h,!0).break()}):(r.if((0,Yi._)(Kk||(Kk=et([""," > ",""])),g,n),function(){return r.assign(h,!1).break()}),t===1?r.assign(h,!0):r.if((0,Yi._)(Gk||(Gk=et([""," >= ",""])),g,t),function(){return r.assign(h,!0)}))}(m)})})}function v(p,m){r.forRange("i",0,l,function(g){e.subschema({keyword:"contains",dataProp:g,dataPropType:Lv.Type.Num,compositeRule:!0},p),m()})}}};tb.default=Lnt;var pN={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=pn(),n=Sn,r=jo();e.error={message:function(s){var u=s.params,c=u.property,l=u.depsCount,f=u.deps,h=l===1?"property":"properties";return(0,t.str)(Qk||(Qk=et(["must have "," "," when property "," is present"])),h,f,c)},params:function(s){var u=s.params,c=u.property,l=u.depsCount,f=u.deps,h=u.missingProperty;return(0,t._)(Yk||(Yk=et(["{property: ",`,
|
|
missingProperty: `,`,
|
|
depsCount: `,`,
|
|
deps: `,"}"])),c,h,l,f)}};var i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code:function(s){var u=ke(function(f){var h=f.schema,d={},v={};for(var p in h)p!=="__proto__"&&((Array.isArray(h[p])?d:v)[p]=h[p]);return[d,v]}(s),2),c=u[0],l=u[1];o(s,c),a(s,l)}};function o(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.schema,c=s.gen,l=s.data,f=s.it;if(Object.keys(u).length!==0){var h=c.let("missing"),d=function(){var p=u[v];if(p.length===0)return"continue";var m=(0,r.propertyInData)(c,l,v,f.opts.ownProperties);s.setParams({property:v,depsCount:p.length,deps:p.join(", ")}),f.allErrors?c.if(m,function(){var g,y=at(p);try{for(y.s();!(g=y.n()).done;){var b=g.value;(0,r.checkReportMissingProp)(s,b)}}catch(w){y.e(w)}finally{y.f()}}):(c.if((0,t._)(Zk||(Zk=et([""," && (",")"])),m,(0,r.checkMissingProp)(s,p,h))),(0,r.reportMissingProp)(s,h),c.else())};for(var v in u)d()}}function a(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.schema,c=s.gen,l=s.data,f=s.keyword,h=s.it,d=c.name("valid"),v=function(m){if((0,n.alwaysValidSchema)(h,u[m]))return"continue";c.if((0,r.propertyInData)(c,l,m,h.opts.ownProperties),function(){var g=s.subschema({keyword:f,schemaProp:m},d);s.mergeValidEvaluated(g,d)},function(){return c.var(d,!0)}),s.ok(d)};for(var p in u)v(p)}e.validatePropertyDeps=o,e.validateSchemaDeps=a,e.default=i})(pN);var eb={};Object.defineProperty(eb,"__esModule",{value:!0});var mN=pn(),Bnt=Sn,znt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(e){var t=e.params;return(0,mN._)(Xk||(Xk=et(["{propertyName: ","}"])),t.propertyName)}},code:function(e){var t=e.gen,n=e.schema,r=e.data,i=e.it;if(!(0,Bnt.alwaysValidSchema)(i,n)){var o=t.name("valid");t.forIn("key",r,function(a){e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,mN.not)(o),function(){e.error(!0),i.allErrors||t.break()})}),e.ok(o)}}};eb.default=znt;var Bv={};Object.defineProperty(Bv,"__esModule",{value:!0});var zv=jo(),$o=pn(),Fnt=gs(),Fv=Sn,Vnt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(e){var t=e.params;return(0,$o._)(tj||(tj=et(["{additionalProperty: ","}"])),t.additionalProperty)}},code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,i=e.data,o=e.errsCount,a=e.it;if(!o)throw new Error("ajv implementation error");var s=a.allErrors,u=a.opts;if(a.props=!0,u.removeAdditional==="all"||!(0,Fv.alwaysValidSchema)(a,n)){var c=(0,zv.allSchemaProperties)(r.properties),l=(0,zv.allSchemaProperties)(r.patternProperties);t.forIn("key",i,function(v){c.length||l.length?t.if(function(p){var m;if(c.length>8){var g=(0,Fv.schemaRefOrVal)(a,r.properties,"properties");m=(0,zv.isOwnProperty)(t,g,p)}else m=c.length?$o.or.apply(void 0,Oe(c.map(function(y){return(0,$o._)(nj||(nj=et([""," === ",""])),p,y)}))):$o.nil;return l.length&&(m=$o.or.apply(void 0,[m].concat(Oe(l.map(function(y){return(0,$o._)(rj||(rj=et(["",".test(",")"])),(0,zv.usePattern)(e,y),p)}))))),(0,$o.not)(m)}(v),function(){return h(v)}):h(v)}),e.ok((0,$o._)(ej||(ej=et([""," === ",""])),o,Fnt.default.errors))}function f(v){t.code((0,$o._)(ij||(ij=et(["delete ","[","]"])),i,v))}function h(v){if(u.removeAdditional==="all"||u.removeAdditional&&n===!1)f(v);else{if(n===!1)return e.setParams({additionalProperty:v}),e.error(),void(s||t.break());if(ee(n)=="object"&&!(0,Fv.alwaysValidSchema)(a,n)){var p=t.name("valid");u.removeAdditional==="failing"?(d(v,p,!1),t.if((0,$o.not)(p),function(){e.reset(),f(v)})):(d(v,p),s||t.if((0,$o.not)(p),function(){return t.break()}))}}}function d(v,p,m){var g={keyword:"additionalProperties",dataProp:v,dataPropType:Fv.Type.Str};m===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(g,p)}}};Bv.default=Vnt;var nb={};Object.defineProperty(nb,"__esModule",{value:!0});var Wnt=_v(),gN=jo(),rb=Sn,yN=Bv,qnt={keyword:"properties",type:"object",schemaType:"object",code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,i=e.data,o=e.it;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&yN.default.code(new Wnt.KeywordCxt(o,yN.default,"additionalProperties"));var a,s=(0,gN.allSchemaProperties)(n),u=at(s);try{for(u.s();!(a=u.n()).done;){var c=a.value;o.definedProperties.add(c)}}catch(g){u.e(g)}finally{u.f()}o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=rb.mergeEvaluated.props(t,(0,rb.toHash)(s),o.props));var l=s.filter(function(g){return!(0,rb.alwaysValidSchema)(o,n[g])});if(l.length!==0){var f,h=t.name("valid"),d=at(l);try{for(d.s();!(f=d.n()).done;){var v=f.value;p(v)?m(v):(t.if((0,gN.propertyInData)(t,i,v,o.opts.ownProperties)),m(v),o.allErrors||t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(v),e.ok(h)}}catch(g){d.e(g)}finally{d.f()}}function p(g){return o.opts.useDefaults&&!o.compositeRule&&n[g].default!==void 0}function m(g){e.subschema({keyword:"properties",schemaProp:g,dataProp:g},h)}}};nb.default=qnt;var ib={};Object.defineProperty(ib,"__esModule",{value:!0});var bN=jo(),Vv=pn(),wN=Sn,xN=Sn,Hnt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(e){var t=e.gen,n=e.schema,r=e.data,i=e.parentSchema,o=e.it,a=o.opts,s=(0,bN.allSchemaProperties)(n),u=s.filter(function(v){return(0,wN.alwaysValidSchema)(o,n[v])});if(s.length!==0&&(u.length!==s.length||o.opts.unevaluated&&o.props!==!0)){var c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,l=t.name("valid");o.props===!0||o.props instanceof Vv.Name||(o.props=(0,xN.evaluatedPropsToName)(t,o.props));var f=o.props;(function(){var v,p=at(s);try{for(p.s();!(v=p.n()).done;){var m=v.value;c&&h(m),o.allErrors?d(m):(t.var(l,!0),d(m),t.if(l))}}catch(g){p.e(g)}finally{p.f()}})()}function h(v){for(var p in c)new RegExp(v).test(p)&&(0,wN.checkStrictMode)(o,"property ".concat(p," matches pattern ").concat(v," (use allowMatchingProperties)"))}function d(v){t.forIn("key",r,function(p){t.if((0,Vv._)(oj||(oj=et(["",".test(",")"])),(0,bN.usePattern)(e,v),p),function(){var m=u.includes(v);m||e.subschema({keyword:"patternProperties",schemaProp:v,dataProp:p,dataPropType:xN.Type.Str},l),o.opts.unevaluated&&f!==!0?t.assign((0,Vv._)(aj||(aj=et(["","[","]"])),f,p),!0):m||o.allErrors||t.if((0,Vv.not)(l),function(){return t.break()})})})}}};ib.default=Hnt;var ob={};Object.defineProperty(ob,"__esModule",{value:!0});var Unt=Sn,Jnt={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(e){var t=e.gen,n=e.schema,r=e.it;if((0,Unt.alwaysValidSchema)(r,n))e.fail();else{var i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,function(){return e.reset()},function(){return e.error()})}},error:{message:"must NOT be valid"}};ob.default=Jnt;var ab={};Object.defineProperty(ab,"__esModule",{value:!0});var Knt={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:jo().validateUnion,error:{message:"must match a schema in anyOf"}};ab.default=Knt;var sb={};Object.defineProperty(sb,"__esModule",{value:!0});var Wv=pn(),Gnt=Sn,Qnt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(e){var t=e.params;return(0,Wv._)(sj||(sj=et(["{passingSchemas: ","}"])),t.passing)}},code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,i=e.it;if(!Array.isArray(n))throw new Error("ajv implementation error");if(!i.opts.discriminator||!r.discriminator){var o=n,a=t.let("valid",!1),s=t.let("passing",null),u=t.name("_valid");e.setParams({passing:s}),t.block(function(){o.forEach(function(c,l){var f;(0,Gnt.alwaysValidSchema)(i,c)?t.var(u,!0):f=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},u),l>0&&t.if((0,Wv._)(uj||(uj=et([""," && ",""])),u,a)).assign(a,!1).assign(s,(0,Wv._)(cj||(cj=et(["[",", ","]"])),s,l)).else(),t.if(u,function(){t.assign(a,!0),t.assign(s,l),f&&e.mergeEvaluated(f,Wv.Name)})})}),e.result(a,function(){return e.reset()},function(){return e.error(!0)})}}};sb.default=Qnt;var ub={};Object.defineProperty(ub,"__esModule",{value:!0});var Ynt=Sn,Znt={keyword:"allOf",schemaType:"array",code:function(e){var t=e.gen,n=e.schema,r=e.it;if(!Array.isArray(n))throw new Error("ajv implementation error");var i=t.name("valid");n.forEach(function(o,a){if(!(0,Ynt.alwaysValidSchema)(r,o)){var s=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(s)}})}};ub.default=Znt;var cb={};Object.defineProperty(cb,"__esModule",{value:!0});var qv=pn(),kN=Sn,Xnt={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(e){var t=e.params;return(0,qv.str)(lj||(lj=et(['must match "','" schema'])),t.ifClause)},params:function(e){var t=e.params;return(0,qv._)(fj||(fj=et(["{failingKeyword: ","}"])),t.ifClause)}},code:function(e){var t=e.gen,n=e.parentSchema,r=e.it;n.then===void 0&&n.else===void 0&&(0,kN.checkStrictMode)(r,'"if" without "then" and "else" is ignored');var i=jN(r,"then"),o=jN(r,"else");if(i||o){var a,s=t.let("valid",!0),u=t.name("_valid");if(a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.mergeEvaluated(a),e.reset(),i&&o){var c=t.let("ifClause");e.setParams({ifClause:c}),t.if(u,l("then",c),l("else",c))}else i?t.if(u,l("then")):t.if((0,qv.not)(u),l("else"));e.pass(s,function(){return e.error(!0)})}function l(f,h){return function(){var d=e.subschema({keyword:f},u);t.assign(s,u),e.mergeValidEvaluated(d,s),h?t.assign(h,(0,qv._)(hj||(hj=et(["",""])),f)):e.setParams({ifClause:f})}}}};function jN(e,t){var n=e.schema[t];return n!==void 0&&!(0,kN.alwaysValidSchema)(e,n)}cb.default=Xnt;var lb={};Object.defineProperty(lb,"__esModule",{value:!0});var trt=Sn,ert={keyword:["then","else"],schemaType:["object","boolean"],code:function(e){var t=e.keyword,n=e.parentSchema,r=e.it;n.if===void 0&&(0,trt.checkStrictMode)(r,'"'.concat(t,'" without "if" is ignored'))}};lb.default=ert,Object.defineProperty(Qy,"__esModule",{value:!0});var nrt=Pc,rrt=Zy,irt=Tc,ort=Xy,art=tb,srt=pN,urt=eb,crt=Bv,lrt=nb,frt=ib,hrt=ob,drt=ab,vrt=sb,prt=ub,mrt=cb,grt=lb;Qy.default=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=[hrt.default,drt.default,vrt.default,prt.default,mrt.default,grt.default,urt.default,crt.default,srt.default,lrt.default,frt.default];return e?t.push(rrt.default,ort.default):t.push(nrt.default,irt.default),t.push(art.default),t};var fb={},hb={};Object.defineProperty(hb,"__esModule",{value:!0});var xr=pn(),yrt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,xr.str)(dj||(dj=et(['must match format "','"'])),t)},params:function(e){var t=e.schemaCode;return(0,xr._)(vj||(vj=et(["{format: ","}"])),t)}},code:function(e,t){var n=e.gen,r=e.data,i=e.$data,o=e.schema,a=e.schemaCode,s=e.it,u=s.opts,c=s.errSchemaPath,l=s.schemaEnv,f=s.self;u.validateFormats&&(i?function(){var h=n.scopeValue("formats",{ref:f.formats,code:u.code.formats}),d=n.const("fDef",(0,xr._)(pj||(pj=et(["","[","]"])),h,a)),v=n.let("fType"),p=n.let("format");n.if((0,xr._)(mj||(mj=et(["typeof ",' == "object" && !('," instanceof RegExp)"])),d,d),function(){return n.assign(v,(0,xr._)(gj||(gj=et(["",'.type || "string"'])),d)).assign(p,(0,xr._)(yj||(yj=et(["",".validate"])),d))},function(){return n.assign(v,(0,xr._)(bj||(bj=et(['"string"'])))).assign(p,d)}),e.fail$data((0,xr.or)(u.strictSchema===!1?xr.nil:(0,xr._)(wj||(wj=et([""," && !",""])),a,p),(m=l.$async?(0,xr._)(xj||(xj=et(["(",".async ? await ","(",") : ","(","))"])),d,p,r,p,r):(0,xr._)(kj||(kj=et(["","(",")"])),p,r),g=(0,xr._)(jj||(jj=et(["(typeof ",' == "function" ? '," : ",".test(","))"])),p,m,p,r),(0,xr._)(Sj||(Sj=et([""," && "," !== true && "," === "," && !",""])),p,p,v,t,g))));var m,g}():function(){var h=f.formats[o];if(!h)return void function(){if(u.strictSchema===!1)return void f.logger.warn(g());throw new Error(g());function g(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}}();if(h!==!0){var d=ke(function(g){var y=g instanceof RegExp?(0,xr.regexpCode)(g):u.code.formats?(0,xr._)(Cj||(Cj=et(["","",""])),u.code.formats,(0,xr.getProperty)(o)):void 0,b=n.scopeValue("formats",{key:o,ref:g,code:y});return ee(g)=="object"&&!(g instanceof RegExp)?[g.type||"string",g.validate,(0,xr._)($j||($j=et(["",".validate"])),b)]:["string",g,b]}(h),3),v=d[0],p=d[1],m=d[2];v===t&&e.pass(function(){if(ee(h)=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,xr._)(_j||(_j=et(["await ","(",")"])),m,r)}return typeof p=="function"?(0,xr._)(Oj||(Oj=et(["","(",")"])),m,r):(0,xr._)(Mj||(Mj=et(["",".test(",")"])),m,r)}())}}())}};hb.default=yrt,Object.defineProperty(fb,"__esModule",{value:!0});var brt=[hb.default];fb.default=brt;var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.contentVocabulary=Rc.metadataVocabulary=void 0,Rc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Rc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(Ty,"__esModule",{value:!0});var wrt=Iy,xrt=Qy,krt=fb,SN=Rc,jrt=[Ry.default,wrt.default,(0,xrt.default)(),krt.default,SN.metadataVocabulary,SN.contentVocabulary];Ty.default=jrt;var db={},CN={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"})(CN),Object.defineProperty(db,"__esModule",{value:!0});var Nc=pn(),vb=CN,$N=yi,Srt=Sn,Crt={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(e){var t=e.params,n=t.discrError,r=t.tagName;return n===vb.DiscrError.Tag?'tag "'.concat(r,'" must be string'):'value of tag "'.concat(r,'" must be in oneOf')},params:function(e){var t=e.params,n=t.discrError,r=t.tag,i=t.tagName;return(0,Nc._)(Ej||(Ej=et(["{error: ",", tag: ",", tagValue: ","}"])),n,i,r)}},code:function(e){var t=e.gen,n=e.data,r=e.schema,i=e.parentSchema,o=e.it,a=i.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var s=r.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");var u=t.let("valid",!1),c=t.const("tag",(0,Nc._)(Aj||(Aj=et(["","",""])),n,(0,Nc.getProperty)(s)));function l(f){var h=t.name("valid"),d=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(d,Nc.Name),h}t.if((0,Nc._)(Pj||(Pj=et(["typeof ",' == "string"'])),c),function(){return function(){var f=function(){for(var d,v={},p=w(i),m=!0,g=0;g<a.length;g++){var y=a[g];y!=null&&y.$ref&&!(0,Srt.schemaHasRulesButRef)(y,o.self.RULES)&&(y=$N.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,y==null?void 0:y.$ref))instanceof $N.SchemaEnv&&(y=y.schema);var b=(d=y==null?void 0:y.properties)===null||d===void 0?void 0:d[s];if(ee(b)!="object")throw new Error('discriminator: oneOf subschemas (or referenced schemas) must have "properties/'.concat(s,'"'));m=m&&(p||w(y)),j(b,g)}if(!m)throw new Error('discriminator: "'.concat(s,'" must be required'));return v;function w(R){var M=R.required;return Array.isArray(M)&&M.includes(s)}function j(R,M){if(R.const)x(R.const,M);else{if(!R.enum)throw new Error('discriminator: "properties/'.concat(s,'" must have "const" or "enum"'));var E,N=at(R.enum);try{for(N.s();!(E=N.n()).done;)x(E.value,M)}catch(A){N.e(A)}finally{N.f()}}}function x(R,M){if(typeof R!="string"||R in v)throw new Error('discriminator: "'.concat(s,'" values must be unique strings'));v[R]=M}}();for(var h in t.if(!1),f)t.elseIf((0,Nc._)(Tj||(Tj=et([""," === ",""])),c,h)),t.assign(u,l(f[h]));t.else(),e.error(!1,{discrError:vb.DiscrError.Mapping,tag:c,tagName:s}),t.endIf()}()},function(){return e.error(!1,{discrError:vb.DiscrError.Tag,tag:c,tagName:s})}),e.ok(u)}};db.default=Crt;var $rt={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=Ty,r=db,i=$rt,o=["/properties"],a="http://json-schema.org/draft-07/schema",s=function(h){Ot(v,h);var d=Mt(v);function v(){return X(this,v),d.apply(this,arguments)}return tt(v,[{key:"_addVocabularies",value:function(){var p=this;fn(Ke(v.prototype),"_addVocabularies",this).call(this),n.default.forEach(function(m){return p.addVocabulary(m)}),this.opts.discriminator&&this.addKeyword(r.default)}},{key:"_addDefaultMetaSchema",value:function(){if(fn(Ke(v.prototype),"_addDefaultMetaSchema",this).call(this),this.opts.meta){var p=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(p,a,!1),this.refs["http://json-schema.org/schema"]=a}}},{key:"defaultMeta",value:function(){return this.opts.defaultMeta=fn(Ke(v.prototype),"defaultMeta",this).call(this)||(this.getSchema(a)?a:void 0)}}]),v}(AR.default);e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var u=_v();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var c=pn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var l=Oy();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var f=My();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})($y,$y.exports);var _rt=jp($y.exports);function Lrt(e){if(e.schema===void 0)throw new Error("Deprecation warning: the signature of createAjvValidator is changed from createAjvValidator(schema, schemaDefinitions, ajvOptions) to createAjvValidator({ schema, schemaDefinitions, ajvOptions }). Please pass the arguments as an object instead of unnamed arguments.");var t=function(r){var i=r.schemaDefinitions,o=r.ajvOptions,a=new _rt(dt({allErrors:!0,verbose:!0,$data:!0},o));return i&&Object.keys(i).forEach(function(s){a.addSchema(i[s],s)}),a}(e);if(e.onCreateAjv!==void 0&&(t=e.onCreateAjv(t)||t).opts.verbose===!1)throw new Error("Ajv must be configured with the option verbose=true");var n=t.compile(e.schema);if(n.errors)throw n.errors[0];return function(r){return n(r),(n.errors||[]).map(Ort).map(function(i){return function(o,a){return{path:uo(o,a.instancePath),message:a.message||"Unknown error",severity:No.warning}}(r,i)})}}function Ort(e){if(e.keyword==="enum"&&Array.isArray(e.schema)){var t=e.schema;if(t){if((t=t.map(function(r){return JSON.stringify(r)})).length>5){var n=["("+(t.length-5)+" more...)"];(t=t.slice(0,5)).push(n)}e.message="should be equal to one of: "+t.join(", ")}}return e.keyword==="additionalProperties"&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}var Brt={id:"lodash",name:"Lodash",description:`
|
|
<p>
|
|
Enter a JavaScript function to filter, sort, or transform the data.
|
|
You can use <a href="https://lodash.com" target="_blank" rel="noopener noreferrer">Lodash</a>
|
|
functions like <code>_.map</code>, <code>_.filter</code>,
|
|
<code>_.orderBy</code>, <code>_.sortBy</code>, <code>_.groupBy</code>,
|
|
<code>_.pick</code>, <code>_.uniq</code>, <code>_.get</code>, etcetera.
|
|
</p>
|
|
`,createQuery:function(e,t){var n=t.filter,r=t.sort,i=t.projection,o=[` return _.chain(data)
|
|
`];if(n&&n.path&&n.relation&&n.value){var a="item => item".concat(Ho(n.path)),s=Ag(n.value),u=typeof s=="string"?"'".concat(n.value,"'"):L3(n.value)&&!Number.isSafeInteger(s)?"".concat(n.value,"n"):n.value;o.push(" .filter(".concat(a," ").concat(n.relation," ").concat(u,`)
|
|
`))}if(r&&r.path&&r.direction&&o.push(" .orderBy([".concat(function(f){return f.length===0?"":f.every(function(h){return Oh.test(h)||Eg.test(h)})?"'"+f.map(FW).join("").replace(/^\./,"")+"'":JSON.stringify(f)}(r.path),"], ['").concat(r.direction,`'])
|
|
`)),i&&i.paths)if(i.paths.length>1){var c=i.paths.map(function(f){var h=le(f)||"item";return" ".concat(JSON.stringify(h),": item").concat(Ho(f))});o.push(` .map(item => ({
|
|
`.concat(c.join(`,
|
|
`),`
|
|
}))
|
|
`))}else{var l=i.paths[0];o.push(" .map(item => item".concat(Ho(l),`)
|
|
`))}return o.push(` .value()
|
|
`),`function query (data) {
|
|
`.concat(o.join(""),"}")},executeQuery:function(e,t){(function(r){var i,o,a=(i=r.match(/_\.chain\(/g))===null||i===void 0?void 0:i.length,s=(o=r.match(/\.value\(\)/g))===null||o===void 0?void 0:o.length;if(a!==s)throw new Error("Cannot execute query: Lodash _.chain(...) must end with .value()")})(t);var n=new Function("_",`"use strict";
|
|
|
|
`+t+`
|
|
|
|
if (typeof query !== "function") {
|
|
throw new Error("Cannot execute query: expecting a function named 'query' but is undefined")
|
|
}
|
|
|
|
return query;
|
|
`)(yW)(e);return n!==void 0?n:null}},_N={};(function(e){function t(V){return V!==null&&Object.prototype.toString.call(V)==="[object Array]"}function n(V){return V!==null&&Object.prototype.toString.call(V)==="[object Object]"}function r(V,Q){if(V===Q)return!0;if(Object.prototype.toString.call(V)!==Object.prototype.toString.call(Q))return!1;if(t(V)===!0){if(V.length!==Q.length)return!1;for(var ft=0;ft<V.length;ft++)if(r(V[ft],Q[ft])===!1)return!1;return!0}if(n(V)===!0){var wt={};for(var _t in V)if(hasOwnProperty.call(V,_t)){if(r(V[_t],Q[_t])===!1)return!1;wt[_t]=!0}for(var Ut in Q)if(hasOwnProperty.call(Q,Ut)&&wt[Ut]!==!0)return!1;return!0}return!1}function i(V){if(V===""||V===!1||V===null||t(V)&&V.length===0)return!0;if(n(V)){for(var Q in V)if(V.hasOwnProperty(Q))return!1;return!0}return!1}var o;o=typeof String.prototype.trimLeft=="function"?function(V){return V.trimLeft()}:function(V){return V.match(/^\s*(.*)/)[1]};var a=0,s=1,u=2,c=3,l=4,f=6,h=8,d=9,v={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},p="EOF",m="UnquotedIdentifier",g="QuotedIdentifier",y="Rbracket",b="Rparen",w="Comma",j="Colon",x="Rbrace",R="Number",M="Current",E="Expref",N="Pipe",A="Or",L="And",W="EQ",O="GT",I="LT",q="GTE",P="LTE",_="NE",S="Flatten",$="Star",D="Filter",B="Dot",k="Not",H="Lbrace",U="Lbracket",st="Lparen",ut="Literal",gt={".":B,"*":$,",":w,":":j,"{":H,"}":x,"]":y,"(":st,")":b,"@":M},St={"<":!0,">":!0,"=":!0,"!":!0},Pt={" ":!0," ":!0,"\n":!0};function pt(V){return V>="0"&&V<="9"||V==="-"}function Bt(){}Bt.prototype={tokenize:function(V){var Q,ft,wt,_t,Ut=[];for(this._current=0;this._current<V.length;)if((_t=V[this._current])>="a"&&_t<="z"||_t>="A"&&_t<="Z"||_t==="_")Q=this._current,ft=this._consumeUnquotedIdentifier(V),Ut.push({type:m,value:ft,start:Q});else if(gt[V[this._current]]!==void 0)Ut.push({type:gt[V[this._current]],value:V[this._current],start:this._current}),this._current++;else if(pt(V[this._current]))wt=this._consumeNumber(V),Ut.push(wt);else if(V[this._current]==="[")wt=this._consumeLBracket(V),Ut.push(wt);else if(V[this._current]==='"')Q=this._current,ft=this._consumeQuotedIdentifier(V),Ut.push({type:g,value:ft,start:Q});else if(V[this._current]==="'")Q=this._current,ft=this._consumeRawStringLiteral(V),Ut.push({type:ut,value:ft,start:Q});else if(V[this._current]==="`"){Q=this._current;var zt=this._consumeLiteral(V);Ut.push({type:ut,value:zt,start:Q})}else if(St[V[this._current]]!==void 0)Ut.push(this._consumeOperator(V));else if(Pt[V[this._current]]!==void 0)this._current++;else if(V[this._current]==="&")Q=this._current,this._current++,V[this._current]==="&"?(this._current++,Ut.push({type:L,value:"&&",start:Q})):Ut.push({type:E,value:"&",start:Q});else{if(V[this._current]!=="|"){var $e=new Error("Unknown character:"+V[this._current]);throw $e.name="LexerError",$e}Q=this._current,this._current++,V[this._current]==="|"?(this._current++,Ut.push({type:A,value:"||",start:Q})):Ut.push({type:N,value:"|",start:Q})}return Ut},_consumeUnquotedIdentifier:function(V){var Q,ft=this._current;for(this._current++;this._current<V.length&&((Q=V[this._current])>="a"&&Q<="z"||Q>="A"&&Q<="Z"||Q>="0"&&Q<="9"||Q==="_");)this._current++;return V.slice(ft,this._current)},_consumeQuotedIdentifier:function(V){var Q=this._current;this._current++;for(var ft=V.length;V[this._current]!=='"'&&this._current<ft;){var wt=this._current;V[wt]!=="\\"||V[wt+1]!=="\\"&&V[wt+1]!=='"'?wt++:wt+=2,this._current=wt}return this._current++,JSON.parse(V.slice(Q,this._current))},_consumeRawStringLiteral:function(V){var Q=this._current;this._current++;for(var ft=V.length;V[this._current]!=="'"&&this._current<ft;){var wt=this._current;V[wt]!=="\\"||V[wt+1]!=="\\"&&V[wt+1]!=="'"?wt++:wt+=2,this._current=wt}return this._current++,V.slice(Q+1,this._current-1).replace("\\'","'")},_consumeNumber:function(V){var Q=this._current;this._current++;for(var ft=V.length;pt(V[this._current])&&this._current<ft;)this._current++;var wt=parseInt(V.slice(Q,this._current));return{type:R,value:wt,start:Q}},_consumeLBracket:function(V){var Q=this._current;return this._current++,V[this._current]==="?"?(this._current++,{type:D,value:"[?",start:Q}):V[this._current]==="]"?(this._current++,{type:S,value:"[]",start:Q}):{type:U,value:"[",start:Q}},_consumeOperator:function(V){var Q=this._current,ft=V[Q];return this._current++,ft==="!"?V[this._current]==="="?(this._current++,{type:_,value:"!=",start:Q}):{type:k,value:"!",start:Q}:ft==="<"?V[this._current]==="="?(this._current++,{type:P,value:"<=",start:Q}):{type:I,value:"<",start:Q}:ft===">"?V[this._current]==="="?(this._current++,{type:q,value:">=",start:Q}):{type:O,value:">",start:Q}:ft==="="&&V[this._current]==="="?(this._current++,{type:W,value:"==",start:Q}):void 0},_consumeLiteral:function(V){this._current++;for(var Q,ft=this._current,wt=V.length;V[this._current]!=="`"&&this._current<wt;){var _t=this._current;V[_t]!=="\\"||V[_t+1]!=="\\"&&V[_t+1]!=="`"?_t++:_t+=2,this._current=_t}var Ut=o(V.slice(ft,this._current));return Ut=Ut.replace("\\`","`"),Q=this._looksLikeJSON(Ut)?JSON.parse(Ut):JSON.parse('"'+Ut+'"'),this._current++,Q},_looksLikeJSON:function(V){if(V==="")return!1;if('[{"'.indexOf(V[0])>=0||["true","false","null"].indexOf(V)>=0)return!0;if(!("-0123456789".indexOf(V[0])>=0))return!1;try{return JSON.parse(V),!0}catch(Q){return!1}}};var K={};function $t(){}function Kt(V){this.runtime=V}function Ct(V){this._interpreter=V,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[a]}]},avg:{_func:this._functionAvg,_signature:[{types:[h]}]},ceil:{_func:this._functionCeil,_signature:[{types:[a]}]},contains:{_func:this._functionContains,_signature:[{types:[u,c]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[u]},{types:[u]}]},floor:{_func:this._functionFloor,_signature:[{types:[a]}]},length:{_func:this._functionLength,_signature:[{types:[u,c,l]}]},map:{_func:this._functionMap,_signature:[{types:[f]},{types:[c]}]},max:{_func:this._functionMax,_signature:[{types:[h,d]}]},merge:{_func:this._functionMerge,_signature:[{types:[l],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[c]},{types:[f]}]},sum:{_func:this._functionSum,_signature:[{types:[h]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[u]},{types:[u]}]},min:{_func:this._functionMin,_signature:[{types:[h,d]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[c]},{types:[f]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[l]}]},values:{_func:this._functionValues,_signature:[{types:[l]}]},sort:{_func:this._functionSort,_signature:[{types:[d,h]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[c]},{types:[f]}]},join:{_func:this._functionJoin,_signature:[{types:[u]},{types:[d]}]},reverse:{_func:this._functionReverse,_signature:[{types:[u,c]}]},to_array:{_func:this._functionToArray,_signature:[{types:[s]}]},to_string:{_func:this._functionToString,_signature:[{types:[s]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[s]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[s],variadic:!0}]}}}K[p]=0,K[m]=0,K[g]=0,K[y]=0,K[b]=0,K[w]=0,K[x]=0,K[R]=0,K[M]=0,K[E]=0,K[N]=1,K[A]=2,K[L]=3,K[W]=5,K[O]=5,K[I]=5,K[q]=5,K[P]=5,K[_]=5,K[S]=9,K[$]=20,K[D]=21,K[B]=40,K[k]=45,K[H]=50,K[U]=55,K[st]=60,$t.prototype={parse:function(V){this._loadTokens(V),this.index=0;var Q=this.expression(0);if(this._lookahead(0)!==p){var ft=this._lookaheadToken(0),wt=new Error("Unexpected token type: "+ft.type+", value: "+ft.value);throw wt.name="ParserError",wt}return Q},_loadTokens:function(V){var Q=new Bt().tokenize(V);Q.push({type:p,value:"",start:V.length}),this.tokens=Q},expression:function(V){var Q=this._lookaheadToken(0);this._advance();for(var ft=this.nud(Q),wt=this._lookahead(0);V<K[wt];)this._advance(),ft=this.led(wt,ft),wt=this._lookahead(0);return ft},_lookahead:function(V){return this.tokens[this.index+V].type},_lookaheadToken:function(V){return this.tokens[this.index+V]},_advance:function(){this.index++},nud:function(V){var Q,ft;switch(V.type){case ut:return{type:"Literal",value:V.value};case m:return{type:"Field",name:V.value};case g:var wt={type:"Field",name:V.value};if(this._lookahead(0)===st)throw new Error("Quoted identifier not allowed for function names.");return wt;case k:return{type:"NotExpression",children:[Q=this.expression(K.Not)]};case $:return Q=null,{type:"ValueProjection",children:[{type:"Identity"},Q=this._lookahead(0)===y?{type:"Identity"}:this._parseProjectionRHS(K.Star)]};case D:return this.led(V.type,{type:"Identity"});case H:return this._parseMultiselectHash();case S:return{type:"Projection",children:[{type:S,children:[{type:"Identity"}]},Q=this._parseProjectionRHS(K.Flatten)]};case U:return this._lookahead(0)===R||this._lookahead(0)===j?(Q=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},Q)):this._lookahead(0)===$&&this._lookahead(1)===y?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},Q=this._parseProjectionRHS(K.Star)]}):this._parseMultiselectList();case M:return{type:M};case E:return{type:"ExpressionReference",children:[ft=this.expression(K.Expref)]};case st:for(var _t=[];this._lookahead(0)!==b;)this._lookahead(0)===M?(ft={type:M},this._advance()):ft=this.expression(0),_t.push(ft);return this._match(b),_t[0];default:this._errorToken(V)}},led:function(V,Q){var ft;switch(V){case B:var wt=K.Dot;return this._lookahead(0)!==$?{type:"Subexpression",children:[Q,ft=this._parseDotRHS(wt)]}:(this._advance(),{type:"ValueProjection",children:[Q,ft=this._parseProjectionRHS(wt)]});case N:return ft=this.expression(K.Pipe),{type:N,children:[Q,ft]};case A:return{type:"OrExpression",children:[Q,ft=this.expression(K.Or)]};case L:return{type:"AndExpression",children:[Q,ft=this.expression(K.And)]};case st:for(var _t,Ut=Q.name,zt=[];this._lookahead(0)!==b;)this._lookahead(0)===M?(_t={type:M},this._advance()):_t=this.expression(0),this._lookahead(0)===w&&this._match(w),zt.push(_t);return this._match(b),{type:"Function",name:Ut,children:zt};case D:var $e=this.expression(0);return this._match(y),{type:"FilterProjection",children:[Q,ft=this._lookahead(0)===S?{type:"Identity"}:this._parseProjectionRHS(K.Filter),$e]};case S:return{type:"Projection",children:[{type:S,children:[Q]},this._parseProjectionRHS(K.Flatten)]};case W:case _:case O:case q:case I:case P:return this._parseComparator(Q,V);case U:var qe=this._lookaheadToken(0);return qe.type===R||qe.type===j?(ft=this._parseIndexExpression(),this._projectIfSlice(Q,ft)):(this._match($),this._match(y),{type:"Projection",children:[Q,ft=this._parseProjectionRHS(K.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(V){if(this._lookahead(0)!==V){var Q=this._lookaheadToken(0),ft=new Error("Expected "+V+", got: "+Q.type);throw ft.name="ParserError",ft}this._advance()},_errorToken:function(V){var Q=new Error("Invalid token ("+V.type+'): "'+V.value+'"');throw Q.name="ParserError",Q},_parseIndexExpression:function(){if(this._lookahead(0)===j||this._lookahead(1)===j)return this._parseSliceExpression();var V={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(y),V},_projectIfSlice:function(V,Q){var ft={type:"IndexExpression",children:[V,Q]};return Q.type==="Slice"?{type:"Projection",children:[ft,this._parseProjectionRHS(K.Star)]}:ft},_parseSliceExpression:function(){for(var V=[null,null,null],Q=0,ft=this._lookahead(0);ft!==y&&Q<3;){if(ft===j)Q++,this._advance();else{if(ft!==R){var wt=this._lookahead(0),_t=new Error("Syntax error, unexpected token: "+wt.value+"("+wt.type+")");throw _t.name="Parsererror",_t}V[Q]=this._lookaheadToken(0).value,this._advance()}ft=this._lookahead(0)}return this._match(y),{type:"Slice",children:V}},_parseComparator:function(V,Q){return{type:"Comparator",name:Q,children:[V,this.expression(K[Q])]}},_parseDotRHS:function(V){var Q=this._lookahead(0);return[m,g,$].indexOf(Q)>=0?this.expression(V):Q===U?(this._match(U),this._parseMultiselectList()):Q===H?(this._match(H),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(V){var Q;if(K[this._lookahead(0)]<10)Q={type:"Identity"};else if(this._lookahead(0)===U)Q=this.expression(V);else if(this._lookahead(0)===D)Q=this.expression(V);else{if(this._lookahead(0)!==B){var ft=this._lookaheadToken(0),wt=new Error("Sytanx error, unexpected token: "+ft.value+"("+ft.type+")");throw wt.name="ParserError",wt}this._match(B),Q=this._parseDotRHS(V)}return Q},_parseMultiselectList:function(){for(var V=[];this._lookahead(0)!==y;){var Q=this.expression(0);if(V.push(Q),this._lookahead(0)===w&&(this._match(w),this._lookahead(0)===y))throw new Error("Unexpected token Rbracket")}return this._match(y),{type:"MultiSelectList",children:V}},_parseMultiselectHash:function(){for(var V,Q,ft,wt=[],_t=[m,g];;){if(V=this._lookaheadToken(0),_t.indexOf(V.type)<0)throw new Error("Expecting an identifier token, got: "+V.type);if(Q=V.value,this._advance(),this._match(j),ft={type:"KeyValuePair",name:Q,value:this.expression(0)},wt.push(ft),this._lookahead(0)===w)this._match(w);else if(this._lookahead(0)===x){this._match(x);break}}return{type:"MultiSelectHash",children:wt}}},Kt.prototype={search:function(V,Q){return this.visit(V,Q)},visit:function(V,Q){var ft,wt,_t,Ut,zt,$e,qe,De,re;switch(V.type){case"Field":return Q!==null&&n(Q)?($e=Q[V.name])===void 0?null:$e:null;case"Subexpression":for(_t=this.visit(V.children[0],Q),re=1;re<V.children.length;re++)if((_t=this.visit(V.children[1],_t))===null)return null;return _t;case"IndexExpression":return qe=this.visit(V.children[0],Q),this.visit(V.children[1],qe);case"Index":if(!t(Q))return null;var Ne=V.value;return Ne<0&&(Ne=Q.length+Ne),(_t=Q[Ne])===void 0&&(_t=null),_t;case"Slice":if(!t(Q))return null;var Xe=V.children.slice(0),Bn=this.computeSliceParams(Q.length,Xe),ue=Bn[0],_n=Bn[1],Qe=Bn[2];if(_t=[],Qe>0)for(re=ue;re<_n;re+=Qe)_t.push(Q[re]);else for(re=ue;re>_n;re+=Qe)_t.push(Q[re]);return _t;case"Projection":var gn=this.visit(V.children[0],Q);if(!t(gn))return null;for(De=[],re=0;re<gn.length;re++)(wt=this.visit(V.children[1],gn[re]))!==null&&De.push(wt);return De;case"ValueProjection":if(!n(gn=this.visit(V.children[0],Q)))return null;De=[];var ln=function(yt){for(var Zt=Object.keys(yt),Gt=[],fe=0;fe<Zt.length;fe++)Gt.push(yt[Zt[fe]]);return Gt}(gn);for(re=0;re<ln.length;re++)(wt=this.visit(V.children[1],ln[re]))!==null&&De.push(wt);return De;case"FilterProjection":if(!t(gn=this.visit(V.children[0],Q)))return null;var ir=[],or=[];for(re=0;re<gn.length;re++)i(ft=this.visit(V.children[2],gn[re]))||ir.push(gn[re]);for(var ar=0;ar<ir.length;ar++)(wt=this.visit(V.children[1],ir[ar]))!==null&&or.push(wt);return or;case"Comparator":switch(Ut=this.visit(V.children[0],Q),zt=this.visit(V.children[1],Q),V.name){case W:_t=r(Ut,zt);break;case _:_t=!r(Ut,zt);break;case O:_t=Ut>zt;break;case q:_t=Ut>=zt;break;case I:_t=Ut<zt;break;case P:_t=Ut<=zt;break;default:throw new Error("Unknown comparator: "+V.name)}return _t;case S:var zn=this.visit(V.children[0],Q);if(!t(zn))return null;var an=[];for(re=0;re<zn.length;re++)t(wt=zn[re])?an.push.apply(an,wt):an.push(wt);return an;case"Identity":return Q;case"MultiSelectList":if(Q===null)return null;for(De=[],re=0;re<V.children.length;re++)De.push(this.visit(V.children[re],Q));return De;case"MultiSelectHash":if(Q===null)return null;var bt;for(De={},re=0;re<V.children.length;re++)De[(bt=V.children[re]).name]=this.visit(bt.value,Q);return De;case"OrExpression":return i(ft=this.visit(V.children[0],Q))&&(ft=this.visit(V.children[1],Q)),ft;case"AndExpression":return i(Ut=this.visit(V.children[0],Q))===!0?Ut:this.visit(V.children[1],Q);case"NotExpression":return i(Ut=this.visit(V.children[0],Q));case"Literal":return V.value;case N:return qe=this.visit(V.children[0],Q),this.visit(V.children[1],qe);case M:return Q;case"Function":var ie=[];for(re=0;re<V.children.length;re++)ie.push(this.visit(V.children[re],Q));return this.runtime.callFunction(V.name,ie);case"ExpressionReference":var Le=V.children[0];return Le.jmespathType=E,Le;default:throw new Error("Unknown node type: "+V.type)}},computeSliceParams:function(V,Q){var ft=Q[0],wt=Q[1],_t=Q[2],Ut=[null,null,null];if(_t===null)_t=1;else if(_t===0){var zt=new Error("Invalid slice, step cannot be 0");throw zt.name="RuntimeError",zt}var $e=_t<0;return ft=ft===null?$e?V-1:0:this.capSliceRange(V,ft,_t),wt=wt===null?$e?-1:V:this.capSliceRange(V,wt,_t),Ut[0]=ft,Ut[1]=wt,Ut[2]=_t,Ut},capSliceRange:function(V,Q,ft){return Q<0?(Q+=V)<0&&(Q=ft<0?-1:0):Q>=V&&(Q=ft<0?V-1:V),Q}},Ct.prototype={callFunction:function(V,Q){var ft=this.functionTable[V];if(ft===void 0)throw new Error("Unknown function: "+V+"()");return this._validateArgs(V,Q,ft._signature),ft._func.call(this,Q)},_validateArgs:function(V,Q,ft){var wt,_t,Ut,zt;if(ft[ft.length-1].variadic){if(Q.length<ft.length)throw wt=ft.length===1?" argument":" arguments",new Error("ArgumentError: "+V+"() takes at least"+ft.length+wt+" but received "+Q.length)}else if(Q.length!==ft.length)throw wt=ft.length===1?" argument":" arguments",new Error("ArgumentError: "+V+"() takes "+ft.length+wt+" but received "+Q.length);for(var $e=0;$e<ft.length;$e++){zt=!1,_t=ft[$e].types,Ut=this._getTypeName(Q[$e]);for(var qe=0;qe<_t.length;qe++)if(this._typeMatches(Ut,_t[qe],Q[$e])){zt=!0;break}if(!zt){var De=_t.map(function(re){return v[re]}).join(",");throw new Error("TypeError: "+V+"() expected argument "+($e+1)+" to be type "+De+" but received type "+v[Ut]+" instead.")}}},_typeMatches:function(V,Q,ft){if(Q===s)return!0;if(Q!==d&&Q!==h&&Q!==c)return V===Q;if(Q===c)return V===c;if(V===c){var wt;Q===h?wt=a:Q===d&&(wt=u);for(var _t=0;_t<ft.length;_t++)if(!this._typeMatches(this._getTypeName(ft[_t]),wt,ft[_t]))return!1;return!0}},_getTypeName:function(V){switch(Object.prototype.toString.call(V)){case"[object String]":return u;case"[object Number]":return a;case"[object Array]":return c;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return V.jmespathType===E?f:l}},_functionStartsWith:function(V){return V[0].lastIndexOf(V[1])===0},_functionEndsWith:function(V){var Q=V[0],ft=V[1];return Q.indexOf(ft,Q.length-ft.length)!==-1},_functionReverse:function(V){if(this._getTypeName(V[0])===u){for(var Q=V[0],ft="",wt=Q.length-1;wt>=0;wt--)ft+=Q[wt];return ft}var _t=V[0].slice(0);return _t.reverse(),_t},_functionAbs:function(V){return Math.abs(V[0])},_functionCeil:function(V){return Math.ceil(V[0])},_functionAvg:function(V){for(var Q=0,ft=V[0],wt=0;wt<ft.length;wt++)Q+=ft[wt];return Q/ft.length},_functionContains:function(V){return V[0].indexOf(V[1])>=0},_functionFloor:function(V){return Math.floor(V[0])},_functionLength:function(V){return n(V[0])?Object.keys(V[0]).length:V[0].length},_functionMap:function(V){for(var Q=[],ft=this._interpreter,wt=V[0],_t=V[1],Ut=0;Ut<_t.length;Ut++)Q.push(ft.visit(wt,_t[Ut]));return Q},_functionMerge:function(V){for(var Q={},ft=0;ft<V.length;ft++){var wt=V[ft];for(var _t in wt)Q[_t]=wt[_t]}return Q},_functionMax:function(V){if(V[0].length>0){if(this._getTypeName(V[0][0])===a)return Math.max.apply(Math,V[0]);for(var Q=V[0],ft=Q[0],wt=1;wt<Q.length;wt++)ft.localeCompare(Q[wt])<0&&(ft=Q[wt]);return ft}return null},_functionMin:function(V){if(V[0].length>0){if(this._getTypeName(V[0][0])===a)return Math.min.apply(Math,V[0]);for(var Q=V[0],ft=Q[0],wt=1;wt<Q.length;wt++)Q[wt].localeCompare(ft)<0&&(ft=Q[wt]);return ft}return null},_functionSum:function(V){for(var Q=0,ft=V[0],wt=0;wt<ft.length;wt++)Q+=ft[wt];return Q},_functionType:function(V){switch(this._getTypeName(V[0])){case a:return"number";case u:return"string";case c:return"array";case l:return"object";case 5:return"boolean";case f:return"expref";case 7:return"null"}},_functionKeys:function(V){return Object.keys(V[0])},_functionValues:function(V){for(var Q=V[0],ft=Object.keys(Q),wt=[],_t=0;_t<ft.length;_t++)wt.push(Q[ft[_t]]);return wt},_functionJoin:function(V){var Q=V[0];return V[1].join(Q)},_functionToArray:function(V){return this._getTypeName(V[0])===c?V[0]:[V[0]]},_functionToString:function(V){return this._getTypeName(V[0])===u?V[0]:JSON.stringify(V[0])},_functionToNumber:function(V){var Q,ft=this._getTypeName(V[0]);return ft===a?V[0]:ft!==u||(Q=+V[0],isNaN(Q))?null:Q},_functionNotNull:function(V){for(var Q=0;Q<V.length;Q++)if(this._getTypeName(V[Q])!==7)return V[Q];return null},_functionSort:function(V){var Q=V[0].slice(0);return Q.sort(),Q},_functionSortBy:function(V){var Q=V[0].slice(0);if(Q.length===0)return Q;var ft=this._interpreter,wt=V[1],_t=this._getTypeName(ft.visit(wt,Q[0]));if([a,u].indexOf(_t)<0)throw new Error("TypeError");for(var Ut=this,zt=[],$e=0;$e<Q.length;$e++)zt.push([$e,Q[$e]]);zt.sort(function(De,re){var Ne=ft.visit(wt,De[1]),Xe=ft.visit(wt,re[1]);if(Ut._getTypeName(Ne)!==_t)throw new Error("TypeError: expected "+_t+", received "+Ut._getTypeName(Ne));if(Ut._getTypeName(Xe)!==_t)throw new Error("TypeError: expected "+_t+", received "+Ut._getTypeName(Xe));return Ne>Xe?1:Ne<Xe?-1:De[0]-re[0]});for(var qe=0;qe<zt.length;qe++)Q[qe]=zt[qe][1];return Q},_functionMaxBy:function(V){for(var Q,ft,wt=V[1],_t=V[0],Ut=this.createKeyFunction(wt,[a,u]),zt=-1/0,$e=0;$e<_t.length;$e++)(ft=Ut(_t[$e]))>zt&&(zt=ft,Q=_t[$e]);return Q},_functionMinBy:function(V){for(var Q,ft,wt=V[1],_t=V[0],Ut=this.createKeyFunction(wt,[a,u]),zt=1/0,$e=0;$e<_t.length;$e++)(ft=Ut(_t[$e]))<zt&&(zt=ft,Q=_t[$e]);return Q},createKeyFunction:function(V,Q){var ft=this,wt=this._interpreter;return function(_t){var Ut=wt.visit(V,_t);if(Q.indexOf(ft._getTypeName(Ut))<0){var zt="TypeError: expected one of "+Q+", received "+ft._getTypeName(Ut);throw new Error(zt)}return Ut}}},e.tokenize=function(V){return new Bt().tokenize(V)},e.compile=function(V){return new $t().parse(V)},e.search=function(V,Q){var ft=new $t,wt=new Ct,_t=new Kt(wt);wt._interpreter=_t;var Ut=ft.parse(Q);return _t.search(Ut,V)},e.strictDeepEqual=r})(_N);var Mrt=jp(_N),zrt={id:"jmespath",name:"JMESPath",description:`
|
|
<p>
|
|
Enter a <a href="https://jmespath.org" target="_blank" rel="noopener noreferrer">JMESPath</a> query
|
|
to filter, sort, or transform the JSON data.
|
|
To learn JMESPath, go to <a href="https://jmespath.org/tutorial.html" target="_blank" rel="noopener noreferrer">the interactive tutorial</a>.
|
|
</p>
|
|
`,createQuery:function(e,t){var n=t.sort,r=t.filter,i=t.projection,o="";if(r&&r.path&&r.relation&&r.value){var a=se(e,["0"].concat(r.path)),s=Ag(r.value),u=typeof a=="string"&&s!=null?'"'.concat(r.value,'"'):s;o+="[? "+pf(r.path)+" "+r.relation+" `"+u+"`]"}else o+=Array.isArray(e)?"[*]":"@";if(n&&n.path&&n.direction&&(n.direction==="desc"?o+=" | reverse(sort_by(@, &"+pf(n.path)+"))":o+=" | sort_by(@, &"+pf(n.path)+")"),i&&i.paths)if(o[o.length-1]!=="]"&&(o+=" | [*]"),i.paths.length===1){var c=i.paths[0];o+=c.length===0?"":"."+pf(c)}else i.paths.length>1&&(o+=".{"+i.paths.map(function(l){return ON(l[l.length-1])+": "+pf(l)}).join(", ")+"}");return o},executeQuery:function(e,t,n){var r=B6(n,JSON)?e:JSON.parse(n.stringify(e));return Mrt.search(r,t)}};function pf(e){if(e.length===0)return"@";var t=e.map(function(n){return typeof n=="number"?"["+n+"]":"."+ON(String(n))}).join("");return t[0]==="."?t.slice(1):t}function ON(e){return e.match(/^[A-Za-z\d_$]+$/)?e:JSON.stringify(e)}var pb=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},mb=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Hv=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(n,r){var i=[],o=!0,a=!1,s=void 0;try{for(var u,c=n[Symbol.iterator]();!(o=(u=c.next()).done)&&(i.push(u.value),!r||i.length!==r);o=!0);}catch(l){a=!0,s=l}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(e){return this.indexOf(e)===0},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var n=this;n.length<e;)n=t+n;return n};var Ert={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function MN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var Art=function(){function e(t,n,r,i){pb(this,e);var o=this;if(t!==void 0)if(Array.isArray(t))this.rgba=t;else if(r===void 0){var a=t&&""+t;a&&function(s){if(s.startsWith("hsl")){var u=s.match(/([\-\d\.e]+)/g).map(Number),c=Hv(u,4),l=c[0],f=c[1],h=c[2],d=c[3];d===void 0&&(d=1),l/=360,f/=100,h/=100,o.hsla=[l,f,h,d]}else if(s.startsWith("rgb")){var v=s.match(/([\-\d\.e]+)/g).map(Number),p=Hv(v,4),m=p[0],g=p[1],y=p[2],b=p[3];b===void 0&&(b=1),o.rgba=[m,g,y,b]}else s.startsWith("#")?o.rgba=e.hexToRgb(s):o.rgba=e.nameToRgb(s)||e.hexToRgb(s)}(a.toLowerCase())}else this.rgba=[t,n,r,i===void 0?1:i]}return mb(e,[{key:"printRGB",value:function(t){var n=(t?this.rgba:this.rgba.slice(0,3)).map(function(r,i){return MN(r,i===3?3:0)});return t?"rgba("+n+")":"rgb("+n+")"}},{key:"printHSL",value:function(t){var n=[360,100,100,1],r=["","%","%",""],i=(t?this.hsla:this.hsla.slice(0,3)).map(function(o,a){return MN(o*n[a],a===3?3:1)+r[a]});return t?"hsla("+i+")":"hsl("+i+")"}},{key:"printHex",value:function(t){var n=this.hex;return t?n:n.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=e.hslToRgb(this._hsla)},set:function(t){t.length===3&&(t[3]=1),this._rgba=t,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=e.rgbToHsl(this._rgba)},set:function(t){t.length===3&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var t=this.rgba.map(function(n,r){return r<3?n.toString(16):Math.round(255*n).toString(16)});return"#"+t.map(function(n){return n.padStart(2,"0")}).join("")},set:function(t){this.rgba=e.hexToRgb(t)}}],[{key:"hexToRgb",value:function(t){var n=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!n.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var r=n.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(t){var n=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=Ert[n];return r===void 0?r:e.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var n=Hv(t,4),r=n[0],i=n[1],o=n[2],a=n[3];r/=255,i/=255,o/=255;var s=Math.max(r,i,o),u=Math.min(r,i,o),c=void 0,l=void 0,f=(s+u)/2;if(s===u)c=l=0;else{var h=s-u;switch(l=f>.5?h/(2-s-u):h/(s+u),s){case r:c=(i-o)/h+(i<o?6:0);break;case i:c=(o-r)/h+2;break;case o:c=(r-i)/h+4}c/=6}return[c,l,f,a]}},{key:"hslToRgb",value:function(t){var n=Hv(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=void 0,u=void 0,c=void 0;if(i===0)s=u=c=o;else{var l=function(v,p,m){return m<0&&(m+=1),m>1&&(m-=1),m<.16666666666666666?v+6*(p-v)*m:m<.5?p:m<.6666666666666666?v+(p-v)*(.6666666666666666-m)*6:v},f=o<.5?o*(1+i):o+i-o*i,h=2*o-f;s=l(h,f,r+1/3),u=l(h,f,r),c=l(h,f,r-1/3)}var d=[255*s,255*u,255*c].map(Math.round);return d[3]=a,d}}]),e}(),Prt=function(){function e(){pb(this,e),this._events=[]}return mb(e,[{key:"add",value:function(t,n,r){t.addEventListener(n,r,!1),this._events.push({target:t,type:n,handler:r})}},{key:"remove",value:function(t,n,r){this._events=this._events.filter(function(i){var o=!0;return t&&t!==i.target&&(o=!1),n&&n!==i.type&&(o=!1),r&&r!==i.handler&&(o=!1),o&&e._doRemove(i.target,i.type,i.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(t){return e._doRemove(t.target,t.type,t.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(t,n,r){t.removeEventListener(n,r,!1)}}]),e}();function gb(e,t,n){var r=!1;function i(u,c,l){return Math.max(c,Math.min(u,l))}function o(u,c,l){if(l&&(r=!0),r){u.preventDefault();var f=t.getBoundingClientRect(),h=f.width,d=f.height,v=c.clientX,p=c.clientY,m=i(v-f.left,0,h),g=i(p-f.top,0,d);n(m/h,g/d)}}function a(u,c){(u.buttons===void 0?u.which:u.buttons)===1?o(u,u,c):r=!1}function s(u,c){u.touches.length===1?o(u,u.touches[0],c):r=!1}e.add(t,"mousedown",function(u){a(u,!0)}),e.add(t,"touchstart",function(u){s(u,!0)}),e.add(window,"mousemove",a),e.add(t,"touchmove",s),e.add(window,"mouseup",function(u){r=!1}),e.add(t,"touchend",function(u){r=!1}),e.add(t,"touchcancel",function(u){r=!1})}var EN="keydown",Uv="mousedown",yb="focusin";function ca(e,t){return(t||document).querySelector(e)}function AN(e){e.preventDefault(),e.stopPropagation()}function bb(e,t,n,r,i){e.add(t,EN,function(o){n.indexOf(o.key)>=0&&(i&&AN(o),r(o))})}var PN=function(){function e(t){pb(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new Prt,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return mb(e,[{key:"setOptions",value:function(t){var n=this;if(t){var r=this.settings;if(t instanceof HTMLElement)r.parent=t;else{r.parent&&t.parent&&r.parent!==t.parent&&(this._events.remove(r.parent),this._popupInited=!1),function(s,u,c){for(var l in s)c&&c.indexOf(l)>=0||(u[l]=s[l])}(t,r),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var i=t.color||t.colour;i&&this._setColor(i)}var o=r.parent;if(o&&r.popup&&!this._popupInited){var a=function(s){return n.openHandler(s)};this._events.add(o,"click",a),bb(this._events,o,[" ","Spacebar","Enter"],a),this._popupInited=!0}else t.parent&&!r.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var n=t&&t.type===EN?this._domEdit:this.domElement;setTimeout(function(){return n.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var n=t&&t.type,r=!1;if(t)if(n===Uv||n===yb){var i=(this.__containedEvent||0)+100;t.timeStamp>i&&(r=!0)}else AN(t),r=!0;else r=!0;r&&this.hide()&&(this.settings.parent.style.pointerEvents="",n!==Uv&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,n){this.closeHandler(),this.setOptions(t),n&&this.openHandler()}},{key:"setColor",value:function(t,n){this._setColor(t,{silent:n})}},{key:"_setColor",value:function(t,n){if(typeof t=="string"&&(t=t.trim()),t){n=n||{};var r=void 0;try{r=new Art(t)}catch(o){if(n.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,n)}}},{key:"setColour",value:function(t,n){this.setColor(t,n)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var n,r,i=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=(n=i,(r=document.createElement("div")).innerHTML=n,r.firstElementChild);return this.domElement=o,this._domH=ca(".picker_hue",o),this._domSL=ca(".picker_sl",o),this._domA=ca(".picker_alpha",o),this._domEdit=ca(".picker_editor input",o),this._domSample=ca(".picker_sample",o),this._domOkay=ca(".picker_done button",o),this._domCancel=ca(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.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 t=this,n=this,r=this.domElement,i=this._events;function o(u,c,l){i.add(u,c,l)}o(r,"click",function(u){return u.preventDefault()}),gb(i,this._domH,function(u,c){return n._setHSLA(u)}),gb(i,this._domSL,function(u,c){return n._setHSLA(null,u,1-c)}),this.settings.alpha&&gb(i,this._domA,function(u,c){return n._setHSLA(null,null,null,1-c)});var a=this._domEdit;o(a,"input",function(u){n._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(a,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(l){return t.closeHandler(l)};o(window,Uv,u),o(window,yb,u),bb(i,r,["Esc","Escape"],u);var c=function(l){t.__containedEvent=l.timeStamp};o(r,Uv,c),o(r,yb,c),o(t._domCancel,"click",u)});var s=function(u){t._ifPopup(function(){return t.closeHandler(u)}),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",s),bb(i,r,["Enter"],s)}},{key:"_setPosition",value:function(){var t=this.settings.parent,n=this.domElement;t!==n.parentNode&&t.appendChild(n),this._ifPopup(function(r){getComputedStyle(t).position==="static"&&(t.style.position="relative");var i=r===!0?"popup_right":"popup_"+r;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===i?n.classList.add(o):n.classList.remove(o)}),n.classList.add(i)})}},{key:"_setHSLA",value:function(t,n,r,i,o){o=o||{};var a=this.colour,s=a.hsla;[t,n,r,i].forEach(function(u,c){(u||u===0)&&(s[c]=u)}),a.hsla=s,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(a)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var n=this.colour,r=n.hsla,i="hsl("+360*r[0]+", 100%, 50%)",o=n.hslString,a=n.hslaString,s=this._domH,u=this._domSL,c=this._domA,l=ca(".picker_selector",s),f=ca(".picker_selector",u),h=ca(".picker_selector",c);b(0,l,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,b(0,f,r[1]),w(0,f,1-r[2]),u.style.color=o,w(0,h,1-r[3]);var d=o,v=d.replace("hsl","hsla").replace(")",", 0)"),p="linear-gradient("+[d,v]+")";if(this._domA.style.background=p+`, 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`,!t.fromEditor){var m=this.settings.editorFormat,g=this.settings.alpha,y=void 0;switch(m){case"rgb":y=n.printRGB(g);break;case"hsl":y=n.printHSL(g);break;default:y=n.printHex(g)}this._domEdit.value=y}this._domSample.style.color=a}function b(j,x,R){x.style.left=100*R+"%"}function w(j,x,R){x.style.top=100*R+"%"}}},{key:"_ifPopup",value:function(t,n){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):n&&n()}},{key:"_toggleDOM",value:function(t){var n=this.domElement;if(!n)return!1;var r=t?"":"none",i=n.style.display!==r;return i&&(n.style.display=r),i}}]),e}(),wb=document.createElement("style");wb.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(wb),PN.StyleElement=wb;var Trt=Object.freeze({__proto__:null,default:PN})}}]);
|