diff --git a/webinterface/statics/js/svelte-jsoneditor.js b/webinterface/statics/js/svelte-jsoneditor.js new file mode 100644 index 00000000..a7bed6c7 --- /dev/null +++ b/webinterface/statics/js/svelte-jsoneditor.js @@ -0,0 +1,27 @@ +var e,t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M,A,E,P,T,R,N,I,D,z,q,B,L,F,V,H,W,U,J,K,G,Q,Y,X,Z,ee,te,ne,re,oe,ie,ae,se,ce,le,ue,fe,de,he,ve,pe,me,ge,ye,be,we,xe,ke,je,Se,Ce,$e,_e,Oe,Me,Ae,Ee,Pe,Te,Re,Ne,Ie,De,ze,qe,Be,Le,Fe,Ve,He,We,Ue,Je,Ke,Ge,Qe,Ye,Xe,Ze,et,tt,nt,rt,ot,it,at,st,ct,lt,ut,ft,dt,ht,vt,pt,mt,gt,yt,bt,wt,xt,kt,jt,St,Ct,$t,_t,Ot,Mt,At,Et,Pt,Tt,Rt,Nt,It,Dt,zt,qt,Bt,Lt,Ft,Vt,Ht,Wt,Ut,Jt,Kt,Gt,Qt,Yt,Xt,Zt,en,tn,nn,rn,on,an,sn,cn,ln,un,fn,dn,hn,vn,pn,mn,gn,yn,bn,wn,xn,kn,jn,Sn,Cn,$n,_n,On,Mn,An,En,Pn,Tn,Rn,Nn,In,Dn,zn,qn,Bn,Ln,Fn,Vn,Hn,Wn,Un,Jn,Kn,Gn,Qn,Yn,Xn,Zn,er,tr,nr,rr,or,ir,ar,sr,cr,lr,ur,fr,dr,hr,vr,pr,mr,gr,yr,br,wr,xr,kr,jr,Sr,Cr,$r,_r,Or,Mr,Ar,Er,Pr,Tr,Rr,Nr,Ir,Dr,zr,qr,Br,Lr,Fr,Vr,Hr,Wr,Ur,Jr,Kr,Gr,Qr,Yr,Xr,Zr,eo,to,no,ro,oo,io,ao,so,co,lo,uo,fo,ho,vo=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],po=["mainAxis","crossAxis","limiter"];function mo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function go(){return go="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mo(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},go.apply(this,arguments)}function yo(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Lo(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function wo(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */wo=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:$(e,n,s)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="suspendedYield",v="executing",p="completed",m={};function g(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(E([])));k&&k!==n&&r.call(k,a)&&(w=k);var j=b.prototype=g.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,i,a,s){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==Ho(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function $(t,n,r){var o=d;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var c=_(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var l=f(t,n,r);if("normal"===l.type){if(o=r.done?p:h,l.arg===m)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=p,r.method="throw",r.arg=l.arg)}}}function _(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=f(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function E(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:E(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function xo(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function ko(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){xo(i,r,o,a,s,"next",e)}function s(e){xo(i,r,o,a,s,"throw",e)}a(void 0)}))}}function jo(e,t){return Co(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||Lo(e,t)||So()}function So(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Co(e){if(Array.isArray(e))return e}function $o(e){var t="function"==typeof Map?new Map:void 0;return $o=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Oo())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Po(o,n.prototype),o}(e,arguments,Mo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Po(n,e)},$o(e)}function _o(e,t,n){return t=Mo(t),function(e,t){if(t&&("object"===Ho(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ao(e)}(e,Oo()?Reflect.construct(t,n||[],Mo(e).constructor):t.apply(e,n))}function Oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oo=function(){return!!e})()}function Mo(e){return Mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mo(e)}function Ao(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eo(e,t){if("function"!=typeof t&&null!==t)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&&Po(e,t)}function Po(e,t){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Po(e,t)}function To(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ro(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n32){for(var t=[],n=e.ctx.length/32,r=0;r2&&void 0!==arguments[2]?arguments[2]:{},r=n.bubbles,o=void 0!==r&&r,i=n.cancelable;return new CustomEvent(e,{detail:t,bubbles:o,cancelable:void 0!==i&&i})}function Li(e,t){return new e(t)}var Fi,Vi=new Map,Hi=0;function Wi(e,t,n,r,o,i,a){for(var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,c=16.666/r,l="{\n",u=0;u<=1;u+=c){var f=t+(n-t)*i(u);l+=100*u+"%{".concat(a(f,1-f),"}\n")}var d=l+"100% {".concat(a(n,1-n),"}\n}"),h="__svelte_".concat(function(e){for(var t=5381,n=e.length;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}(d),"_").concat(s),v=gi(e),p=Vi.get(v)||function(e,t){var n={stylesheet:yi(t),rules:{}};return Vi.set(e,n),n}(v,e),m=p.stylesheet,g=p.rules;g[h]||(g[h]=!0,m.insertRule("@keyframes ".concat(h," ").concat(d),m.cssRules.length));var y=e.style.animation||"";return e.style.animation="".concat(y?"".concat(y,", "):"").concat(h," ").concat(r,"ms linear ").concat(o,"ms 1 both"),Hi+=1,h}function Ui(e,t){var n=(e.style.animation||"").split(", "),r=n.filter(t?function(e){return e.indexOf(t)<0}:function(e){return-1===e.indexOf("__svelte")}),o=n.length-r.length;o&&(e.style.animation=r.join(", "),(Hi-=o)||fi((function(){Hi||(Vi.forEach((function(e){var t=e.stylesheet.ownerNode;t&&xi(t)})),Vi.clear())})))}function Ji(e){Fi=e}function Ki(){if(!Fi)throw new Error("Function called outside component initialization");return Fi}function Gi(e){Ki().$$.on_mount.push(e)}function Qi(e){Ki().$$.on_destroy.push(e)}function Yi(){var e=Ki();return function(t,n){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,o=void 0!==r&&r,i=e.$$.callbacks[t];if(i){var a=Bi(t,n,{cancelable:o});return i.slice().forEach((function(t){t.call(e,a)})),!a.defaultPrevented}return!0}}function Xi(e,t){return Ki().$$.context.set(e,t),t}function Zi(e){return Ki().$$.context.get(e)}function ea(e,t){var n=this,r=e.$$.callbacks[t.type];r&&r.slice().forEach((function(e){return e.call(n,t)}))}var ta=[],na=[],ra=[],oa=[],ia=Promise.resolve(),aa=!1;function sa(){aa||(aa=!0,ia.then(va))}function ca(){return sa(),ia}function la(e){ra.push(e)}function ua(e){oa.push(e)}var fa,da=new Set,ha=0;function va(){if(0===ha){var e=Fi;do{try{for(;hac.start&&(s=f(c,p),c=null,ma(e,s.b,"start"),w&&(u(),l=Wi(e,a,s.b,s.duration,0,g,i.css))),s)if(t>=s.end)b(a=s.b,1-a),ma(e,s.b,"end"),c||(s.b?u():--s.group.r||Qo(s.group.c)),s=null;else if(t>=s.start){var n=t-s.start;a=s.a+s.d*g(n/s.duration),b(a,1-a)}return!(!s&&!c)},0===di.size&&fi(hi),new Promise((function(e){di.add({c:n,f:e})})))}return{run:function(e){Yo(i)?(fa||(fa=Promise.resolve()).then((function(){fa=null})),fa).then((function(){i=i({direction:e?"in":"out"}),d(e)})):d(e)},end:function(){u(),s=c=null}}}function Ca(e){return void 0!==(null==e?void 0:e.length)?e:Array.from(e)}function $a(e,t){e.d(1),t.delete(e.key)}function _a(e,t){ka(e,1,1,(function(){t.delete(e.key)}))}function Oa(e,t,n,r,o,i,a,s,c,l,u,f){for(var d=e.length,h=i.length,v=d,p={};v--;)p[e[v].key]=v;var m=[],g=new Map,y=new Map,b=[];v=h;for(var w=function(){var e=f(o,i,v),s=n(e),c=a.get(s);c?r&&b.push((function(){return c.p(e,t)})):(c=l(s,e)).c(),g.set(s,m[v]=c),s in p&&y.set(s,Math.abs(v-p[s]))};v--;)w();var x=new Set,k=new Set;function j(e){xa(e,1),e.m(s,u),a.set(e.key,e),u=e.first,h--}for(;d&&h;){var S=m[h-1],C=e[d-1],$=S.key,_=C.key;S===C?(u=S.first,d--,h--):g.has(_)?!a.has($)||x.has($)?j(S):k.has(_)?d--:y.get($)>y.get(_)?(k.add($),j(S)):(x.add(_),d--):(c(C,a),d--)}for(;d--;){var O=e[d];g.has(O.key)||c(O,a)}for(;h;)j(m[h-1]);return Qo(b),m}function Ma(e,t){for(var n={},r={},o={$$scope:1},i=e.length;i--;){var a=e[i],s=t[i];if(s){for(var c in a)c in s||(r[c]=1);for(var l in s)o[l]||(n[l]=s[l],o[l]=1);e[i]=s}else for(var u in a)o[u]=1}for(var f in r)f in n||(n[f]=void 0);return n}function Aa(e){return"object"===Ho(e)&&null!==e?e:{}}function Ea(e,t,n){var r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Pa(e){e&&e.c()}function Ta(e,t,n){var r=e.$$,o=r.fragment,i=r.after_update;o&&o.m(t,n),la((function(){var t,n=e.$$.on_mount.map(Ko).filter(Yo);e.$$.on_destroy?(t=e.$$.on_destroy).push.apply(t,Bo(n)):Qo(n);e.$$.on_mount=[]})),i.forEach(la)}function Ra(e,t){var n,r,o,i=e.$$;null!==i.fragment&&(n=i.after_update,r=[],o=[],ra.forEach((function(e){return-1===n.indexOf(e)?r.push(e):o.push(e)})),o.forEach((function(e){return e()})),ra=r,Qo(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function Na(e,t,n,r,o,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],c=Fi;Ji(e);var l=e.$$={fragment:null,ctx:[],props:i,update:Wo,not_equal:o,bound:Go(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Go(),dirty:s,skip_bound:!1,root:t.target||c.$$.root};a&&a(l.root);var u=!1;if(l.ctx=n?n(e,t.props||{},(function(t,n){var r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return l.ctx&&o(l.ctx[t],l.ctx[t]=r)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](r),u&&function(e,t){-1===e.$$.dirty[0]&&(ta.push(e),sa(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:function(e){var t=function(e){try{if("undefined"!=typeof window&&void 0!==window.localStorage)return window.localStorage[e]}catch(e){}}("debug");return null!=t&&t.endsWith("*")?e.startsWith(t.slice(0,-1)):e===t}(e);if(!t)return za;var n=function(e){for(var t=0,n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.delay,r=void 0===n?0:n,o=t.duration,i=void 0===o?400:o,a=t.easing,s=void 0===a?Uo:a,c=+getComputedStyle(e).opacity;return{delay:r,duration:i,easing:s,css:function(e){return"opacity: ".concat(e*c)}}}var La=vi.window;function Fa(e){mi(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),\n 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),\n 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 Va(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b=e[1].closeButton&&Ha(e),w=e[2];return w&&(a=Li(w,{})),{c:function(){t=ji("div"),n=ji("div"),r=ji("div"),b&&b.c(),o=$i(),i=ji("div"),a&&Pa(a.$$.fragment),Ei(i,"class",s=si(e[1].classContent)+" svelte-n7cvum"),Ei(i,"style",e[9]),qi(i,"content",!e[0]),Ei(r,"class",c=si(e[1].classWindow)+" svelte-n7cvum"),Ei(r,"role","dialog"),Ei(r,"aria-modal","true"),Ei(r,"aria-label",l=e[1].ariaLabelledBy?null:e[1].ariaLabel||null),Ei(r,"aria-labelledby",u=e[1].ariaLabelledBy||null),Ei(r,"style",e[8]),qi(r,"window",!e[0]),Ei(n,"class",d=si(e[1].classWindowWrap)+" svelte-n7cvum"),Ei(n,"style",e[7]),qi(n,"wrap",!e[0]),Ei(t,"aria-hidden","true"),Ei(t,"id",h=e[1].id),Ei(t,"class",v=si(e[1].classBg)+" svelte-n7cvum"),Ei(t,"style",e[6]),qi(t,"bg",!e[0])},m:function(s,c){wi(s,t,c),pi(t,n),pi(n,r),b&&b.m(r,null),pi(r,o),pi(r,i),a&&Ta(a,i,null),e[50](r),e[51](n),e[52](t),m=!0,g||(y=[Oi(r,"introstart",(function(){Yo(e[13])&&e[13].apply(this,arguments)})),Oi(r,"outrostart",(function(){Yo(e[14])&&e[14].apply(this,arguments)})),Oi(r,"introend",(function(){Yo(e[15])&&e[15].apply(this,arguments)})),Oi(r,"outroend",(function(){Yo(e[16])&&e[16].apply(this,arguments)})),Oi(t,"mousedown",e[20]),Oi(t,"mouseup",e[21])],g=!0)},p:function(f,p){if((e=f)[1].closeButton?b?(b.p(e,p),2&p[0]&&xa(b,1)):((b=Ha(e)).c(),xa(b,1),b.m(r,o)):b&&(ba(),ka(b,1,1,(function(){b=null})),wa()),4&p[0]&&w!==(w=e[2])){if(a){ba();var g=a;ka(g.$$.fragment,1,0,(function(){Ra(g,1)})),wa()}w?(Pa((a=Li(w,{})).$$.fragment),xa(a.$$.fragment,1),Ta(a,i,null)):a=null}(!m||2&p[0]&&s!==(s=si(e[1].classContent)+" svelte-n7cvum"))&&Ei(i,"class",s),(!m||512&p[0])&&Ei(i,"style",e[9]),(!m||3&p[0])&&qi(i,"content",!e[0]),(!m||2&p[0]&&c!==(c=si(e[1].classWindow)+" svelte-n7cvum"))&&Ei(r,"class",c),(!m||2&p[0]&&l!==(l=e[1].ariaLabelledBy?null:e[1].ariaLabel||null))&&Ei(r,"aria-label",l),(!m||2&p[0]&&u!==(u=e[1].ariaLabelledBy||null))&&Ei(r,"aria-labelledby",u),(!m||256&p[0])&&Ei(r,"style",e[8]),(!m||3&p[0])&&qi(r,"window",!e[0]),(!m||2&p[0]&&d!==(d=si(e[1].classWindowWrap)+" svelte-n7cvum"))&&Ei(n,"class",d),(!m||128&p[0])&&Ei(n,"style",e[7]),(!m||3&p[0])&&qi(n,"wrap",!e[0]),(!m||2&p[0]&&h!==(h=e[1].id))&&Ei(t,"id",h),(!m||2&p[0]&&v!==(v=si(e[1].classBg)+" svelte-n7cvum"))&&Ei(t,"class",v),(!m||64&p[0])&&Ei(t,"style",e[6]),(!m||3&p[0])&&qi(t,"bg",!e[0])},i:function(n){m||(xa(b),a&&xa(a.$$.fragment,n),n&&la((function(){m&&(f||(f=Sa(r,e[12],e[1].transitionWindowProps,!0)),f.run(1))})),n&&la((function(){m&&(p||(p=Sa(t,e[11],e[1].transitionBgProps,!0)),p.run(1))})),m=!0)},o:function(n){ka(b),a&&ka(a.$$.fragment,n),n&&(f||(f=Sa(r,e[12],e[1].transitionWindowProps,!1)),f.run(0)),n&&(p||(p=Sa(t,e[11],e[1].transitionBgProps,!1)),p.run(0)),m=!1},d:function(n){n&&xi(t),b&&b.d(),a&&Ra(a),e[50](null),n&&f&&f.end(),e[51](null),e[52](null),n&&p&&p.end(),g=!1,Qo(y)}}}function Ha(e){var t,n,r,o,i,a=[Ua,Wa],s=[];function c(e,n){return 2&n[0]&&(t=null),null==t&&(t=!!e[17](e[1].closeButton)),t?0:1}return n=c(e,[-1,-1,-1]),r=s[n]=a[n](e),{c:function(){r.c(),o=_i()},m:function(e,t){s[n].m(e,t),wi(e,o,t),i=!0},p:function(e,t){var i=n;(n=c(e,t))===i?s[n].p(e,t):(ba(),ka(s[i],1,1,(function(){s[i]=null})),wa(),(r=s[n])?r.p(e,t):(r=s[n]=a[n](e)).c(),xa(r,1),r.m(o.parentNode,o))},i:function(e){i||(xa(r),i=!0)},o:function(e){ka(r),i=!1},d:function(e){e&&xi(o),s[n].d(e)}}}function Wa(e){var t,n,r,o;return{c:function(){Ei(t=ji("button"),"class",n=si(e[1].classCloseButton)+" svelte-n7cvum"),Ei(t,"aria-label","Close modal"),Ei(t,"style",e[10]),Ei(t,"type","button"),qi(t,"close",!e[0])},m:function(n,i){wi(n,t,i),r||(o=Oi(t,"click",e[18]),r=!0)},p:function(e,r){2&r[0]&&n!==(n=si(e[1].classCloseButton)+" svelte-n7cvum")&&Ei(t,"class",n),1024&r[0]&&Ei(t,"style",e[10]),3&r[0]&&qi(t,"close",!e[0])},i:Wo,o:Wo,d:function(e){e&&xi(t),r=!1,o()}}}function Ua(e){var t,n,r,o=e[1].closeButton;function i(e,t){return{props:{onClose:e[18]}}}return o&&(t=Li(o,i(e))),{c:function(){t&&Pa(t.$$.fragment),n=_i()},m:function(e,o){t&&Ta(t,e,o),wi(e,n,o),r=!0},p:function(e,r){if(2&r[0]&&o!==(o=e[1].closeButton)){if(t){ba();var a=t;ka(a.$$.fragment,1,0,(function(){Ra(a,1)})),wa()}o?(Pa((t=Li(o,i(e))).$$.fragment),xa(t.$$.fragment,1),Ta(t,n.parentNode,n)):t=null}},i:function(e){r||(t&&xa(t.$$.fragment,e),r=!0)},o:function(e){t&&ka(t.$$.fragment,e),r=!1},d:function(e){e&&xi(n),t&&Ra(t,e)}}}function Ja(e){var t,n,r,o,i=e[2]&&Va(e),a=e[49].default,s=ei(a,e,e[48],null);return{c:function(){i&&i.c(),t=$i(),s&&s.c()},m:function(a,c){i&&i.m(a,c),wi(a,t,c),s&&s.m(a,c),n=!0,r||(o=Oi(La,"keydown",e[19]),r=!0)},p:function(e,r){e[2]?i?(i.p(e,r),4&r[0]&&xa(i,1)):((i=Va(e)).c(),xa(i,1),i.m(t.parentNode,t)):i&&(ba(),ka(i,1,1,(function(){i=null})),wa()),s&&s.p&&(!n||131072&r[1])&&ri(s,a,e,e[48],n?ni(a,e[48],r,null):oi(e[48]),null)},i:function(e){n||(xa(i),xa(s,e),n=!0)},o:function(e){ka(i),ka(s,e),n=!1},d:function(e){e&&xi(t),i&&i.d(e),s&&s.d(e),r=!1,o()}}}function Ka(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){return new e(Ro(Ro({},n),{},{props:Ro(Ro({},t),n.props)}))}}function Ga(e,t,n){var r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y=t.$$slots,b=void 0===y?{}:y,w=t.$$scope,x=Yi(),k=Xi,j=t.isTabbable,S=void 0===j?function(e){return e.tabIndex>=0&&!e.hidden&&!e.disabled&&"none"!==e.style.display&&"hidden"!==e.type&&Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}:j,C=t.show,$=void 0===C?null:C,_=t.id,O=void 0===_?null:_,M=t.key,A=void 0===M?"simple-modal":M,E=t.ariaLabel,P=void 0===E?null:E,T=t.ariaLabelledBy,R=void 0===T?null:T,N=t.closeButton,I=void 0===N||N,D=t.closeOnEsc,z=void 0===D||D,q=t.closeOnOuterClick,B=void 0===q||q,L=t.styleBg,F=void 0===L?{}:L,V=t.styleWindowWrap,H=void 0===V?{}:V,W=t.styleWindow,U=void 0===W?{}:W,J=t.styleContent,K=void 0===J?{}:J,G=t.styleCloseButton,Q=void 0===G?{}:G,Y=t.classBg,X=void 0===Y?null:Y,Z=t.classWindowWrap,ee=void 0===Z?null:Z,te=t.classWindow,ne=void 0===te?null:te,re=t.classContent,oe=void 0===re?null:re,ie=t.classCloseButton,ae=void 0===ie?null:ie,se=t.unstyled,ce=void 0!==se&&se,le=t.setContext,ue=void 0===le?k:le,fe=t.transitionBg,de=void 0===fe?Ba:fe,he=t.transitionBgProps,ve=void 0===he?{duration:250}:he,pe=t.transitionWindow,me=void 0===pe?de:pe,ge=t.transitionWindowProps,ye=void 0===ge?ve:ge,be=t.disableFocusTrap,we=void 0!==be&&be,xe={id:O,ariaLabel:P,ariaLabelledBy:R,closeButton:I,closeOnEsc:z,closeOnOuterClick:B,styleBg:F,styleWindowWrap:H,styleWindow:U,styleContent:K,styleCloseButton:Q,classBg:X,classWindowWrap:ee,classWindow:ne,classContent:oe,classCloseButton:ae,transitionBg:de,transitionBgProps:ve,transitionWindow:me,transitionWindowProps:ye,disableFocusTrap:we,isTabbable:S,unstyled:ce},ke=Ro({},xe),je=null,Se=function(e){return e?Object.keys(e).reduce((function(t,n){return"".concat(t,"; ").concat(function(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}(n),": ").concat(e[n])}),""):""},Ce=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},$e=function(){},_e=$e,Oe=$e,Me=$e,Ae=$e,Ee=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n(2,je=Ka(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),n(1,ke=Ro(Ro({},xe),t)),n(6,s=Se(Object.assign({},{width:window.innerWidth,height:window.innerHeight},ke.styleBg))),n(7,c=Se(ke.styleWindowWrap)),n(8,l=Se(ke.styleWindow)),n(9,u=Se(ke.styleContent)),n(10,f=Se(ke.styleCloseButton)),n(11,d=ke.transitionBg),n(12,h=ke.transitionWindow),Te(),n(13,_e=function(e){r.onOpen&&r.onOpen(e),x("open"),x("opening")}),n(14,Oe=function(e){r.onClose&&r.onClose(e),x("close"),x("closing")}),n(15,Me=function(e){r.onOpened&&r.onOpened(e),x("opened")}),n(16,Ae=function(e){r.onClosed&&r.onClosed(e),x("closed")})},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};je&&(n(14,Oe=e.onClose||Oe),n(16,Ae=e.onClosed||Ae),n(2,je=null),Re())},Te=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%"},Re=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"})};ue(A,{open:Ee,close:Pe});var Ne=!1;return Qi((function(){Ne&&Pe()})),Gi((function(){n(47,Ne=!0)})),e.$$set=function(e){"isTabbable"in e&&n(22,S=e.isTabbable),"show"in e&&n(23,$=e.show),"id"in e&&n(24,O=e.id),"key"in e&&n(25,A=e.key),"ariaLabel"in e&&n(26,P=e.ariaLabel),"ariaLabelledBy"in e&&n(27,R=e.ariaLabelledBy),"closeButton"in e&&n(28,I=e.closeButton),"closeOnEsc"in e&&n(29,z=e.closeOnEsc),"closeOnOuterClick"in e&&n(30,B=e.closeOnOuterClick),"styleBg"in e&&n(31,F=e.styleBg),"styleWindowWrap"in e&&n(32,H=e.styleWindowWrap),"styleWindow"in e&&n(33,U=e.styleWindow),"styleContent"in e&&n(34,K=e.styleContent),"styleCloseButton"in e&&n(35,Q=e.styleCloseButton),"classBg"in e&&n(36,X=e.classBg),"classWindowWrap"in e&&n(37,ee=e.classWindowWrap),"classWindow"in e&&n(38,ne=e.classWindow),"classContent"in e&&n(39,oe=e.classContent),"classCloseButton"in e&&n(40,ae=e.classCloseButton),"unstyled"in e&&n(0,ce=e.unstyled),"setContext"in e&&n(41,ue=e.setContext),"transitionBg"in e&&n(42,de=e.transitionBg),"transitionBgProps"in e&&n(43,ve=e.transitionBgProps),"transitionWindow"in e&&n(44,me=e.transitionWindow),"transitionWindowProps"in e&&n(45,ye=e.transitionWindowProps),"disableFocusTrap"in e&&n(46,we=e.disableFocusTrap),"$$scope"in e&&n(48,w=e.$$scope)},e.$$.update=function(){8388608&e.$$.dirty[0]|65536&e.$$.dirty[1]&&Ne&&(Ce($)?Ee($):Pe())},[ce,ke,je,r,o,i,s,c,l,u,f,d,h,_e,Oe,Me,Ae,Ce,Pe,function(e){if(ke.closeOnEsc&&je&&"Escape"===e.key&&(e.preventDefault(),Pe()),je&&"Tab"===e.key&&!ke.disableFocusTrap){var t=i.querySelectorAll("*"),n=Array.from(t).filter(ke.isTabbable).sort((function(e,t){return e.tabIndex-t.tabIndex})),r=n.indexOf(document.activeElement);-1===r&&e.shiftKey&&(r=0),r+=n.length+(e.shiftKey?-1:1),n[r%=n.length].focus(),e.preventDefault()}},function(e){!ke.closeOnOuterClick||e.target!==r&&e.target!==o||(g=e.target)},function(e){ke.closeOnOuterClick&&e.target===g&&(e.preventDefault(),Pe())},S,$,O,A,P,R,I,z,B,F,H,U,K,Q,X,ee,ne,oe,ae,ue,de,ve,me,ye,we,Ne,w,b,function(e){na[e?"unshift":"push"]((function(){n(5,i=e)}))},function(e){na[e?"unshift":"push"]((function(){n(4,o=e)}))},function(e){na[e?"unshift":"push"]((function(){n(3,r=e)}))}]}var Qa,Ya,Xa,Za,es,ts,ns,rs=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,Ga,Ja,Xo,{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},Fa,[-1,-1,-1]),n}return Eo(t,Ia),Do(t)}();!function(e){e.text="text",e.tree="tree",e.table="table"}(Qa||(Qa={})),function(e){e.after="after",e.inside="inside",e.key="key",e.value="value",e.multi="multi",e.text="text"}(Ya||(Ya={})),function(e){e.after="after",e.key="key",e.value="value",e.inside="inside"}(Xa||(Xa={})),function(e){e.info="info",e.warning="warning",e.error="error"}(Za||(Za={})),function(e){e.key="key",e.value="value"}(es||(es={})),function(e){e.asc="asc",e.desc="desc"}(ts||(ts={})),function(e){e.no="no",e.self="self",e.nextInside="nextInside"}(ns||(ns={}));var os=50,is=200,as=400,ss=1200,cs=1e3,ls=100,us=100,fs=2e4,ds=[{start:0,end:ls}],hs=104857600,vs=1048576,ps=10485760,ms=10240,gs={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-container"},ys=Ro(Ro({},gs),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),bs=Ro(Ro({},gs),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),ws=Ro(Ro({},gs),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),xs="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",ks="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",js="hover-insert-inside",Ss="hover-insert-after",Cs="hover-collection",$s="valid",_s="repairable",Os=336,Ms=260,As=100,Es=zo(zo({},ts.asc,"ascending"),ts.desc,"descending"),Ps=0;function Ts(){return++Ps}function Rs(e){return Array.isArray(e)}function Ns(e){return null!==e&&"object"===Ho(e)&&(void 0===e.constructor||"Object"===e.constructor.name)}function Is(e){return!(!e||"object"!==Ho(e))&&"add"===e.op}function Ds(e){return!(!e||"object"!==Ho(e))&&"remove"===e.op}function zs(e){return!(!e||"object"!==Ho(e))&&"replace"===e.op}function qs(e){return!(!e||"object"!==Ho(e))&&"copy"===e.op}function Bs(e){return!(!e||"object"!==Ho(e))&&"move"===e.op}function Ls(e,t){return e===t}function Fs(e){return e.slice(0,e.length-1)}function Vs(e){return"object"===Ho(e)&&null!==e}function Hs(e){if(Rs(e)){var t=e.slice();return Object.getOwnPropertySymbols(e).forEach((function(n){t[n]=e[n]})),t}if(Ns(e)){var n=Ro({},e);return Object.getOwnPropertySymbols(e).forEach((function(t){n[t]=e[t]})),n}return e}function Ws(e,t,n){if(e[t]===n)return e;var r=Hs(e);return r[t]=n,r}function Us(e,t){for(var n=e,r=0;r3&&void 0!==arguments[3]&&arguments[3];if(0===t.length)return n;var o=t[0],i=Js(e?e[o]:void 0,t.slice(1),n,r);if(Ns(e)||Rs(e))return Ws(e,o,i);if(r){var a=Ks.test(o)?[]:{};return a[o]=i,a}throw new Error("Path does not exist")}var Ks=/^\d+$/;function Gs(e,t,n){if(0===t.length)return n(e);if(!Vs(e))throw new Error("Path doesn't exist");var r=t[0];return Ws(e,r,Gs(e[r],t.slice(1),n))}function Qs(e,t){if(0===t.length)return e;if(!Vs(e))throw new Error("Path does not exist");if(1===t.length){var n=t[0];if(n in e){var r=Hs(e);return Rs(r)&&r.splice(parseInt(n),1),Ns(r)&&delete r[n],r}return e}var o=t[0];return Ws(e,o,Qs(e[o],t.slice(1)))}function Ys(e,t,n){var r=t.slice(0,t.length-1),o=t[t.length-1];return Gs(e,r,(function(e){if(!Array.isArray(e))throw new TypeError("Array expected at path "+JSON.stringify(r));var t=Hs(e);return t.splice(parseInt(o),0,n),t}))}function Xs(e,t){return void 0!==e&&(0===t.length||null!==e&&Xs(e[t[0]],t.slice(1)))}function Zs(e){var t=e.split("/");return t.shift(),t.map((function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}))}function ec(e){return e.map(tc).join("")}function tc(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")}function nc(e,t){return e+tc(t)}function rc(e,t){return e.startsWith(t)&&(e.length===t.length||"/"===e[t.length])}function oc(e,t,n){for(var r=e,o=0;o2&&void 0!==arguments[2]?arguments[2]:Ls;if(e.length=0?r=function(){var t="",n=!0;"-"==e[a]&&(t+=d());t+="0"==e[a]?d():p(),"."==e[a]&&(t+=d()+p(),n=!1);"e"!=e[a]&&"E"!=e[a]||(t+=d(),"+"!=e[a]&&"-"!=e[a]||(t+=d()),t+=p(),n=!1);var r=+t;return s&&n&&(r>Number.MAX_SAFE_INTEGER||r="a"&&n<="f"?t+=n.charCodeAt()-kc+10:n>="0"&&n<="9"?t+=+n:w()}return String.fromCharCode(t)}function p(){for(var t="";e[a]>="0"&&e[a]<="9";)t+=d();if(t.length)return t;x(),b()}function m(e,t){g(e,t,y())}function g(e,t,n){r[e]=r[e]||{},r[e][t]=n}function y(){return{line:o,column:i,pos:a}}function b(){throw new SyntaxError("Unexpected token "+e[a]+" in JSON at position "+a)}function w(){h(),b()}function x(){if(a>=e.length)throw new SyntaxError("Unexpected end of JSON input")}},wc.stringify=function(e,t,n){if(Sc(e)){var r,o,i=0,a="object"==Ho(n)?n.space:n;switch(Ho(a)){case"number":var s=a>10?10:a<0?0:Math.floor(a);a=s&&y(s," "),r=s,o=s;break;case"string":a=a.slice(0,10),r=0,o=0;for(var c=0;c=0}var Cc=/"|\\/g,$c=/[\b]/g,_c=/\f/g,Oc=/\n/g,Mc=/\r/g,Ac=/\t/g;function Ec(e){return'"'+(e=e.replace(Cc,"\\$&").replace(_c,"\\f").replace($c,"\\b").replace(Oc,"\\n").replace(Mc,"\\r").replace(Ac,"\\t"))+'"'}var Pc=/~/g,Tc=/\//g;function Rc(e){return e.replace(Pc,"~0").replace(Tc,"~1")}var Nc=function(e){function t(e,n){var r;return No(this,t),(r=_o(this,t,[e+" at position "+n])).position=n,r}return Eo(t,$o(Error)),Do(t)}(),Ic=92,Dc=47,zc=42,qc=123,Bc=125,Lc=91,Fc=93,Vc=40,Hc=41,Wc=32,Uc=10,Jc=9,Kc=13,Gc=8,Qc=12,Yc=34,Xc=43,Zc=45,el=39,tl=48,nl=57,rl=44,ol=46,il=58,al=59,sl=65,cl=97,ll=69,ul=101,fl=70,dl=102,hl=160,vl=8192,pl=8202,ml=8239,gl=8287,yl=12288,bl=8220,wl=8221,xl=8216,kl=8217,jl=96,Sl=180;function Cl(e){return e>=tl&&e<=nl||e>=sl&&e<=fl||e>=cl&&e<=dl}function $l(e){return e>=tl&&e<=nl}function _l(e){return e>=32&&e<=1114111}function Ol(e){return Ml.test(e)}var Ml=/^[,:[\]/{}()\n+]$/;function Al(e){return El.test(e)||e&&Nl(e.charCodeAt(0))}var El=/^[[{\w-]$/;function Pl(e){return e===Uc||e===Kc||e===Jc||e===Gc||e===Qc}function Tl(e){return e===Wc||e===Uc||e===Jc||e===Kc}function Rl(e){return e===hl||e>=vl&&e<=pl||e===ml||e===gl||e===yl}function Nl(e){return Il(e)||zl(e)}function Il(e){return e===Yc||e===bl||e===wl}function Dl(e){return e===Yc}function zl(e){return e===el||e===xl||e===kl||e===jl||e===Sl}function ql(e){return e===el}function Bl(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.lastIndexOf(t);return-1!==r?e.substring(0,r)+(n?"":e.substring(r+1)):e}function Ll(e,t){var n=e.length;if(!Tl(e.charCodeAt(n-1)))return e+t;for(;Tl(e.charCodeAt(n-1));)n--;return e.substring(0,n)+t+e.substring(n)}function Fl(e,t,n){return e.substring(0,t)+e.substring(t+n)}var Vl={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Hl={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Wl(e){var t=0,n="";o()||function(){throw new Nc("Unexpected end of json string",e.length)}();var r=c(rl);for(r&&i(),Al(e[t])&&function(e){return/[,\n][ \t\r]*$/.test(e)}(n)?(r||(n=Ll(n,",")),function(){var e=!0,t=!0;for(;t;){if(e)e=!1;else c(rl)||(n=Ll(n,","));t=o()}t||(n=Bl(n,","));n="[\n".concat(n,"\n]")}()):r&&(n=Bl(n,","));e.charCodeAt(t)===Bc||e.charCodeAt(t)===Fc;)t++,i();if(t>=e.length)return n;function o(){i();var r=function(){if(e.charCodeAt(t)===qc){n+="{",t++,i();for(var r=!0;t=e.length;a||(Al(e[t])||s?n=Ll(n,":"):b()),o()||(a||s?n+="null":b())}return e.charCodeAt(t)===Bc?(n+="}",t++):n=Ll(n,"}"),!0}return!1}()||function(){if(e.charCodeAt(t)===Lc){n+="[",t++,i();for(var r=!0;tr){var o=e.slice(r,t),i=/^0\d/.test(o);return n+=i?'"'.concat(o,'"'):o,!0}return!1}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return i(),r}function i(){var e=t,n=a();do{(n=s())&&(n=a())}while(n);return t>e}function a(){for(var r,o="";(r=Tl(e.charCodeAt(t)))||Rl(e.charCodeAt(t));)o+=r?e[t]:" ",t++;return o.length>0&&(n+=o,!0)}function s(){if(e.charCodeAt(t)===Dc&&e.charCodeAt(t+1)===zc){for(;t0&&void 0!==arguments[0]&&arguments[0],o=e.charCodeAt(t)===Ic;if(o&&(t++,o=!0),Nl(e.charCodeAt(t))){var a=Dl(e.charCodeAt(t))?Dl:ql(e.charCodeAt(t))?ql:zl(e.charCodeAt(t))?zl:Il,s=t,c=n.length,d='"';for(t++;;){if(t>=e.length)return r?(d=Ll(d,'"'),n+=d,!0):(t=s,n=n.substring(0,c),u(!0));if(a(e.charCodeAt(t))){var h=t,p=d.length;if(t++,n+=d+='"',i(),r||t>=e.length||Ol(e.charAt(t))||Nl(e.charCodeAt(t)))return f(),!0;if(Ol(e.charAt(v(h-1))))return t=s,n=n.substring(0,c),u(!0);n=n.substring(0,c),t=h+1,d=d.substring(0,p)+"\\"+d.substring(p)}else{if(r&&Ol(e[t]))return d=Ll(d,'"'),n+=d,f(),!0;if(e.charCodeAt(t)===Ic){var m=e.charAt(t+1);if(void 0!==Hl[m])d+=e.slice(t,t+2),t+=2;else if("u"===m){for(var y=2;y<6&&Cl(e.charCodeAt(t+y));)y++;6===y?(d+=e.slice(t,t+6),t+=6):t+y>=e.length?t=e.length:w()}else d+=m,t+=2}else{var b=e.charAt(t),x=e.charCodeAt(t);x===Yc&&e.charCodeAt(t-1)!==Ic?(d+="\\"+b,t++):Pl(x)?(d+=Vl[b],t++):(_l(x)||g(b),d+=b,t++)}}o&&l()}}return!1}function f(){var r=!1;for(i();e.charCodeAt(t)===Xc;){r=!0,t++,i();var o=(n=Bl(n,'"',!0)).length,a=u();n=a?Fl(n,o,1):Ll(n,'"')}return r}function d(r,o){return e.slice(t,t+r.length)===r&&(n+=o,t+=r.length,!0)}function h(){for(var r=t;tr){if(e.charCodeAt(t)===Vc)return t++,o(),e.charCodeAt(t)===Hc&&(t++,e.charCodeAt(t)===al&&t++),!0;for(;Tl(e.charCodeAt(t-1))&&t>0;)t--;var i=e.slice(r,t);return n+="undefined"===i?"null":JSON.stringify(i),e.charCodeAt(t)===Yc&&t++,!0}}function v(t){for(var n=t;n>0&&Tl(e.charCodeAt(n));)n--;return n}function p(n){if(!$l(e.charCodeAt(t))){var r=e.slice(n,t);throw new Nc("Invalid number '".concat(r,"', expecting a digit ").concat(e[t]?"but got '".concat(e[t],"'"):"but reached end of input"),t)}}function m(r){return t>=e.length?(n+=e.slice(r,t)+"0",!0):(p(r),!1)}function g(e){throw new Nc("Invalid character "+JSON.stringify(e),t)}function y(){throw new Nc("Object key expected",t)}function b(){throw new Nc("Colon expected",t)}function w(){var n=e.slice(t,t+6);throw new Nc('Invalid unicode character "'.concat(n,'"'),t)}!function(){throw new Nc("Unexpected character "+JSON.stringify(e[t]),t)}()}function Ul(e,t){return"*"===e[t]&&"/"===e[t+1]}function Jl(e){return parseInt(e,10)}function Kl(e){return Gl.test(e)}var Gl=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ql(e){return"object"===Ho(e)&&null!==e&&(void 0===e.constructor||"Object"===e.constructor.name)}function Yl(e){return"object"===Ho(e)&&null!==e&&(void 0===e.constructor||"Object"===e.constructor.name||"Array"===e.constructor.name)}function Xl(e){if("number"==typeof e)return e>9466848e5&&isFinite(e)&&Math.floor(e)===e&&!isNaN(new Date(e).valueOf());if("bigint"==typeof e)return Xl(Number(e));try{var t=e?e.valueOf():e;if(t!==e)return Xl(t)}catch(e){return!1}return!1}function Zl(e){(eu=eu||window.document.createElement("div")).style.color="",eu.style.color=e;var t=eu.style.color;return""!==t?t.replace(/\s+/g,"").toLowerCase():null}var eu=null;function tu(e,t){if("number"==typeof e||"string"==typeof e||"boolean"==typeof e||void 0===e)return Ho(e);if("bigint"==typeof e)return"number";if(null===e)return"null";if(Array.isArray(e))return"array";if(Ql(e))return"object";var n=t.stringify(e);return n&&Kl(n)?"number":"true"===n||"false"===n?"boolean":"null"===n?"null":"unknown"}var nu=/^https?:\/\/\S+$/;function ru(e){return"string"==typeof e&&nu.test(e)}function ou(e,t){if(""===e)return"";var n=e.trim();return"null"===n?null:"true"===n||"false"!==n&&(Kl(n)?t.parse(n):e)}function iu(e){return au.test(e)}var au=/^-?[0-9]+$/,su="object"==("undefined"==typeof global?"undefined":Ho(global))&&global&&global.Object===Object&&global,cu="object"==("undefined"==typeof self?"undefined":Ho(self))&&self&&self.Object===Object&&self,lu=su||cu||Function("return this")(),uu=lu.Symbol,fu=Object.prototype,du=fu.hasOwnProperty,hu=fu.toString,vu=uu?uu.toStringTag:void 0;var pu=Object.prototype.toString;var mu="[object Null]",gu="[object Undefined]",yu=uu?uu.toStringTag:void 0;function bu(e){return null==e?void 0===e?gu:mu:yu&&yu in Object(e)?function(e){var t=du.call(e,vu),n=e[vu];try{e[vu]=void 0;var r=!0}catch(e){}var o=hu.call(e);return r&&(t?e[vu]=n:delete e[vu]),o}(e):function(e){return pu.call(e)}(e)}function wu(e){return null!=e&&"object"==Ho(e)}var xu="[object Symbol]";function ku(e){return"symbol"==Ho(e)||wu(e)&&bu(e)==xu}var ju=NaN;function Su(e){return"number"==typeof e?e:ku(e)?ju:+e}function Cu(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Vf=Ff(gf),Hf=/\{\n\/\* \[wrapped with (.+)\] \*/,Wf=/,? & /;var Uf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Jf(e){return function(){return e}}var Kf=function(){try{var e=vf(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Gf=Kf?function(e,t){return Kf(e,"toString",{configurable:!0,enumerable:!1,value:Jf(t),writable:!0})}:Gu,Qf=Ff(Gf);function Yf(e,t){for(var n=-1,r=null==e?0:e.length;++n-1}var nd=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function rd(e,t,n){var r=t+"";return Qf(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Uf,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Yf(nd,(function(n){var r="_."+n[0];t&n[1]&&!td(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Hf);return t?t[1].split(Wf):[]}(r),n)))}var od=1,id=2,ad=4,sd=8,cd=32,ld=64;function ud(e,t,n,r,o,i,a,s,c,l){var u=t&sd;t|=u?cd:ld,(t&=~(u?ld:cd))&ad||(t&=~(od|id));var f=[e,t,o,u?i:void 0,u?a:void 0,u?void 0:i,u?void 0:a,s,c,l],d=n.apply(void 0,f);return Bf(e)&&Vf(d,f),d.placeholder=r,rd(d,e,t)}function fd(e){return e.placeholder}var dd=9007199254740991,hd=/^(?:0|[1-9]\d*)$/;function vd(e,t){var n=Ho(e);return!!(t=null==t?dd:t)&&("number"==n||"symbol"!=n&&hd.test(e))&&e>-1&&e%1==0&&e1&&y.reverse(),u&&c-1&&e%1==0&&e<=Zd}function th(e){return null!=e&&eh(e.length)&&!ef(e)}function nh(e,t,n){if(!Du(n))return!1;var r=Ho(t);return!!("number"==r?th(n)&&vd(t,n.length):"string"==r&&t in n)&&Ud(n[t],e)}function rh(e){return Xd((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&nh(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1},Zh.prototype.set=function(e,t){var n=this.__data__,r=Yh(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ev=vf(lu,"Map");function tv(e,t){var n=e.__data__;return function(e){var t=Ho(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function nv(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&n(s)?t>1?yv(s,t-1,n,r,o):pv(o,s):r||(o[o.length]=s)}return o}function bv(e){return(null==e?0:e.length)?yv(e,1):[]}function wv(e){return Qf(Yd(e,void 0,bv),e+"")}var xv=wv(vv),kv=_h(Object.getPrototypeOf,Object),jv="[object Object]",Sv=Function.prototype,Cv=Object.prototype,$v=Sv.toString,_v=Cv.hasOwnProperty,Ov=$v.call(Object);function Mv(e){if(!wu(e)||bu(e)!=jv)return!1;var t=kv(e);if(null===t)return!0;var n=_v.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$v.call(n)==Ov}var Av="[object DOMException]",Ev="[object Error]";function Pv(e){if(!wu(e))return!1;var t=bu(e);return t==Ev||t==Av||"string"==typeof e.message&&"string"==typeof e.name&&!Mv(e)}var Tv=Xd((function(e,t){try{return kf(e,void 0,t)}catch(e){return Pv(e)?e:new Error(e)}})),Rv=Tv,Nv="Expected a function";function Iv(e,t){var n;if("function"!=typeof t)throw new TypeError(Nv);return e=Ju(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var Dv=Xd((function(e,t,n){var r=1;if(n.length){var o=gd(n,fd(Dv));r|=32}return Fd(e,r,t,n,o)}));Dv.placeholder={};var zv=Dv,qv=wv((function(e,t){return Yf(t,(function(t){t=fv(t),Wd(e,t,zv(e[t],e))})),e})),Bv=qv,Lv=Xd((function(e,t,n){var r=3;if(n.length){var o=gd(n,fd(Lv));r|=32}return Fd(t,r,e,n,o)}));Lv.placeholder={};var Fv=Lv;function Vv(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:Vv(e,t,n)}var Wv=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Uv(e){return Wv.test(e)}var Jv="\\ud800-\\udfff",Kv="["+Jv+"]",Gv="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Qv="\\ud83c[\\udffb-\\udfff]",Yv="[^"+Jv+"]",Xv="(?:\\ud83c[\\udde6-\\uddff]){2}",Zv="[\\ud800-\\udbff][\\udc00-\\udfff]",ep="(?:"+Gv+"|"+Qv+")"+"?",tp="[\\ufe0e\\ufe0f]?",np=tp+ep+("(?:\\u200d(?:"+[Yv,Xv,Zv].join("|")+")"+tp+ep+")*"),rp="(?:"+[Yv+Gv+"?",Gv,Xv,Zv,Kv].join("|")+")",op=RegExp(Qv+"(?="+Qv+")|"+rp+np,"g");function ip(e){return Uv(e)?function(e){return e.match(op)||[]}(e):function(e){return e.split("")}(e)}function ap(e){return function(t){var n=Uv(t=cv(t))?ip(t):void 0,r=n?n[0]:t.charAt(0),o=n?Hv(n,1).join(""):t.slice(1);return r[e]()+o}}var sp=ap("toUpperCase");function cp(e){return sp(cv(e).toLowerCase())}function lp(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o=t?e:t)),e}function em(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Vu(n))==n?n:0),void 0!==t&&(t=(t=Vu(t))==t?t:0),Zp(Vu(e),t,n)}function tm(e){var t=this.__data__=new Zh(e);this.size=t.size}function nm(e,t){return e&&Gd(t,Eh(t),e)}tm.prototype.clear=function(){this.__data__=new Zh,this.size=0},tm.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},tm.prototype.get=function(e){return this.__data__.get(e)},tm.prototype.has=function(e){return this.__data__.has(e)},tm.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Zh){var r=n.__data__;if(!ev||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new nv(r)}return n.set(e,t),this.size=n.size,this};var rm="object"==("undefined"==typeof exports?"undefined":Ho(exports))&&exports&&!exports.nodeType&&exports,om=rm&&"object"==("undefined"==typeof module?"undefined":Ho(module))&&module&&!module.nodeType&&module,im=om&&om.exports===rm?lu.Buffer:void 0,am=im?im.allocUnsafe:void 0;function sm(e,t){if(t)return e.slice();var n=e.length,r=am?am(n):new e.constructor(n);return e.copy(r),r}function cm(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++ns))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var f=-1,d=!0,h=n&Rg?new Ag:void 0;for(i.set(e,t),i.set(t,e);++f=t||n<0||f&&e-l>=i}function p(){var e=Fy();if(v(e))return m(e);s=setTimeout(p,function(e){var n=t-(e-c);return f?Wy(n,i-(e-l)):n}(e))}function m(e){return s=void 0,d&&r?h(e):(r=o=void 0,a)}function g(){var e=Fy(),n=v(e);if(r=arguments,o=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(p,t),u?h(e):a}(c);if(f)return clearTimeout(s),s=setTimeout(p,t),h(c)}return void 0===s&&(s=setTimeout(p,t)),a}return t=Vu(t)||0,Du(n)&&(u=!!n.leading,i=(f="maxWait"in n)?Hy(Vu(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),g.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=o=s=void 0},g.flush=function(){return void 0===s?a:m(Fy())},g}function Jy(e,t){return null==e||e!=e?t:e}var Ky=Object.prototype,Gy=Ky.hasOwnProperty,Qy=Xd((function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&nh(t[0],t[1],o)&&(r=1);++n=hb&&(i=Pg,a=!1,t=new Ag(t));e:for(;++o=0&&e.slice(n,o)==t}function Ib(e){return function(t){var n=Em(t);return"[object Map]"==n?Ig(t):"[object Set]"==n?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Cu(t,(function(t){return[t,e[t]]}))}(t,e(t))}}var Db=Ib(Eh),zb=Ib(Dh),qb=up({"&":"&","<":"<",">":">",'"':""","'":"'"}),Bb=/[&<>"']/g,Lb=RegExp(Bb.source);function Fb(e){return(e=cv(e))&&Lb.test(e)?e.replace(Bb,qb):e}var Vb=/[\\^$.*+?()[\]{}|]/g,Hb=RegExp(Vb.source);function Wb(e){return(e=cv(e))&&Hb.test(e)?e.replace(Vb,"\\$&"):e}function Ub(e,t){for(var n=-1,r=null==e?0:e.length;++no?0:o+n),(r=void 0===r||r>o?o:Ju(r))<0&&(r+=o),r=n>r?0:Qb(r);n-1?o[i?t[a]:a]:void 0}}var tw=Math.max;function nw(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Ju(n);return o<0&&(o=tw(r+o,0)),Xf(e,jy(t),o)}var rw=ew(nw);function ow(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function iw(e,t){return ow(e,jy(t),Ey)}var aw=Math.max,sw=Math.min;function cw(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return void 0!==n&&(o=Ju(n),o=n<0?aw(r+o,0):sw(o,r-1)),Xf(e,jy(t),o,!0)}var lw=ew(cw);function uw(e,t){return ow(e,jy(t),Pb)}function fw(e){return e&&e.length?e[0]:void 0}function dw(e,t){var n=-1,r=th(e)?Array(e.length):[];return Ty(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function hw(e,t){return($u(e)?Cu:dw)(e,jy(t))}function vw(e,t){return yv(hw(e,t),1)}function pw(e,t){return yv(hw(e,t),Infinity)}function mw(e,t,n){return n=void 0===n?1:Ju(n),yv(hw(e,t),n)}function gw(e){return(null==e?0:e.length)?yv(e,Infinity):[]}function yw(e,t){return(null==e?0:e.length)?yv(e,t=void 0===t?1:Ju(t)):[]}function bw(e){return Fd(e,512)}var ww=Jp("floor");function xw(e){return wv((function(t){var n=t.length,r=n,o=Nf.prototype.thru;for(e&&t.reverse();r--;){var i=t[r];if("function"!=typeof i)throw new TypeError("Expected a function");if(o&&!a&&"wrapper"==Rf(i))var a=new Nf([],!0)}for(r=a?r:n;++rt}function Iw(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Vu(t),n=Vu(n)),e(t,n)}}var Dw=Iw(Nw),zw=Iw((function(e,t){return e>=t})),qw=Object.prototype.hasOwnProperty;function Bw(e,t){return null!=e&&qw.call(e,t)}function Lw(e,t){return null!=e&&my(e,t,Bw)}var Fw=Math.max,Vw=Math.min;function Hw(e,t,n){return t=Uu(t),void 0===n?(n=t,t=0):n=Uu(n),function(e,t,n){return e>=Vw(t,n)&&e-1:!!o&&ed(e,t,n)>-1}var Yw=Math.max;function Xw(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Ju(n);return o<0&&(o=Yw(r+o,0)),ed(e,t,o)}function Zw(e){return(null==e?0:e.length)?Vv(e,0,-1):[]}var ex=Math.min;function tx(e,t,n){for(var r=n?db:td,o=e[0].length,i=e.length,a=i,s=Array(i),c=1/0,l=[];a--;){var u=e[a];a&&t&&(u=Cu(u,yh(t))),c=ex(u.length,c),s[a]=!n&&(t||o>=120&&u.length>=120)?new Ag(a&&u):void 0}u=e[0];var f=-1,d=s[0];e:for(;++f=-9007199254740991&&e<=Jx}function Gx(e){return void 0===e}function Qx(e){return wu(e)&&"[object WeakMap]"==Em(e)}function Yx(e){return wu(e)&&"[object WeakSet]"==bu(e)}function Xx(e){return jy("function"==typeof e?e:yg(e,1))}var Zx=Array.prototype.join;function ek(e,t){return null==e?"":Zx.call(e,t)}var tk=Lp((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),nk=tk,rk=Ny((function(e,t,n){Wd(e,n,t)})),ok=rk;var ik=Math.max,ak=Math.min;function sk(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=Ju(n))<0?ik(r+o,0):ak(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Xf(e,Zf,o,!0)}var ck=Lp((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),lk=ck,uk=ap("toLowerCase");function fk(e,t){return e=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}}function Vk(e,t){var n=e.length;if(n)return vd(t+=t<0?n:0,n)?e[t]:void 0}function Hk(e,t){return e&&e.length?Vk(e,Ju(t)):void 0}function Wk(e){return e=Ju(e),Xd((function(t){return Vk(t,e)}))}function Uk(e,t){return null==(e=mx(e,t=lv(t,e)))||delete e[fv(gb(t))]}function Jk(e){return Mv(e)?void 0:e}var Kk=wv((function(e,t){var n={};if(null==e)return n;var r=!1;t=Cu(t,(function(t){return t=lv(t,e),r||(r=t.length>1),t})),Gd(e,mm(e),n),r&&(n=yg(n,7,Jk));for(var o=t.length;o--;)Uk(n,t[o]);return n})),Gk=Kk;function Qk(e,t,n,r){if(!Du(e))return e;for(var o=-1,i=(t=lv(t,e)).length,a=i-1,s=e;null!=s&&++ot||i&&a&&c&&!s&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!i&&!l&&e=s?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function rj(e,t,n,r){return null==e?[]:($u(t)||(t=null==t?[]:[t]),$u(n=r?void 0:n)||(n=null==n?[]:[n]),nj(e,t,n))}function oj(e){return wv((function(t){return t=Cu(t,yh(jy)),Xd((function(n){var r=this;return e(t,(function(e){return kf(e,r,n)}))}))}))}var ij=oj(Cu),aj=Xd,sj=Math.min,cj=aj((function(e,t){var n=(t=1==t.length&&$u(t[0])?Cu(t[0],yh(jy)):Cu(yv(t,1),yh(jy))).length;return Xd((function(r){for(var o=-1,i=sj(r.length,n);++odj)return n;do{t%2&&(n+=e),(t=hj(t/2))&&(e+=e)}while(t);return n}var pj=xy("length"),mj="\\ud800-\\udfff",gj="["+mj+"]",yj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",bj="\\ud83c[\\udffb-\\udfff]",wj="[^"+mj+"]",xj="(?:\\ud83c[\\udde6-\\uddff]){2}",kj="[\\ud800-\\udbff][\\udc00-\\udfff]",jj="(?:"+yj+"|"+bj+")"+"?",Sj="[\\ufe0e\\ufe0f]?",Cj=Sj+jj+("(?:\\u200d(?:"+[wj,xj,kj].join("|")+")"+Sj+jj+")*"),$j="(?:"+[wj+yj+"?",yj,xj,kj,gj].join("|")+")",_j=RegExp(bj+"(?="+bj+")|"+$j+Cj,"g");function Oj(e){return Uv(e)?function(e){for(var t=_j.lastIndex=0;_j.test(e);)++t;return t}(e):pj(e)}var Mj=Math.ceil;function Aj(e,t){var n=(t=void 0===t?" ":Au(t)).length;if(n<2)return n?vj(t,e):t;var r=vj(t,Mj(e/Oj(t)));return Uv(t)?Hv(ip(r),0,e).join(""):r.slice(0,e)}var Ej=Math.ceil,Pj=Math.floor;function Tj(e,t,n){e=cv(e);var r=(t=Ju(t))?Oj(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Aj(Pj(o),n)+e+Aj(Ej(o),n)}function Rj(e,t,n){e=cv(e);var r=(t=Ju(t))?Oj(e):0;return t&&r-1;)s!==e&&Qj.call(s,c,1),Qj.call(e,c,1);return e}function Xj(e,t){return e&&e.length&&t&&t.length?Yj(e,t):e}var Zj=Xd(Xj);function eS(e,t,n){return e&&e.length&&t&&t.length?Yj(e,t,jy(n)):e}function tS(e,t,n){return e&&e.length&&t&&t.length?Yj(e,t,void 0,n):e}var nS=Array.prototype.splice;function rS(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;vd(o)?nS.call(e,o,1):Uk(e,o)}}return e}var oS=wv((function(e,t){var n=null==e?0:e.length,r=vv(e,t);return rS(e,Cu(t,(function(e){return vd(e,n)?+e:e})).sort(tj)),r})),iS=oS,aS=Math.floor,sS=Math.random;function cS(e,t){return e+aS(sS()*(t-e+1))}var lS=parseFloat,uS=Math.min,fS=Math.random;function dS(e,t,n){if(n&&"boolean"!=typeof n&&nh(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Uu(e),void 0===t?(t=e,e=0):t=Uu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=fS();return uS(e+o*(t-e+lS("1e-"+((o+"").length-1))),t)}return cS(e,t)}var hS=Math.ceil,vS=Math.max;function pS(e){return function(t,n,r){return r&&"number"!=typeof r&&nh(t,n,r)&&(n=r=void 0),t=Uu(t),void 0===n?(n=t,t=0):n=Uu(n),function(e,t,n,r){for(var o=-1,i=vS(hS((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,n,r=void 0===r?t1&&nh(e,t[0],t[1])?t=[]:n>2&&nh(t[0],t[1],t[2])&&(t=[t[0]]),nj(e,yv(t,1),[])})),XS=YS,ZS=4294967294,eC=Math.floor,tC=Math.min;function nC(e,t,n,r){var o=0,i=null==e?0:e.length;if(0===i)return 0;for(var a=(t=n(t))!=t,s=null===t,c=ku(t),l=void 0===t;o>>1,a=e[i];null!==a&&!ku(a)&&(n?a<=t:a>>0)?(e=cv(e))&&("string"==typeof t||null!=t&&!Ux(t))&&!(t=Au(t))&&Uv(e)?Hv(ip(e),0,n):e.split(t,n):[]}var pC=Math.max;function mC(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=null==t?0:pC(Ju(t),0),Xd((function(n){var r=n[t],o=Hv(n,0,t);return r&&pv(o,r),kf(e,this,o)}))}var gC=Lp((function(e,t,n){return e+(n?" ":"")+sp(t)})),yC=gC;function bC(e,t,n){return e=cv(e),n=null==n?0:Zp(Ju(n),0,e.length),t=Au(t),e.slice(n,n+t.length)==t}function wC(){return{}}function xC(){return""}function kC(){return!0}var jC=Eu((function(e,t){return e-t}),0);function SC(e){return e&&e.length?xk(e,Gu):0}function CC(e,t){return e&&e.length?xk(e,jy(t)):0}function $C(e){var t=null==e?0:e.length;return t?Vv(e,1,t):[]}function _C(e,t,n){return e&&e.length?Vv(e,0,(t=n||void 0===t?1:Ju(t))<0?0:t):[]}function OC(e,t,n){var r=null==e?0:e.length;return r?Vv(e,(t=r-(t=n||void 0===t?1:Ju(t)))<0?0:t,r):[]}function MC(e,t){return e&&e.length?Cb(e,jy(t),!1,!0):[]}function AC(e,t){return e&&e.length?Cb(e,jy(t)):[]}function EC(e,t){return t(e),e}var PC=Object.prototype,TC=PC.hasOwnProperty;function RC(e,t,n,r){return void 0===e||Ud(e,PC[n])&&!TC.call(r,n)?t:e}var NC={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function IC(e){return"\\"+NC[e]}var DC=/<%=([\s\S]+?)%>/g,zC={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:DC,variable:"",imports:{_:{escape:Fb}}},qC=/\b__p \+= '';/g,BC=/\b(__p \+=) '' \+/g,LC=/(__e\(.*?\)|\b__t\)) \+\n'';/g,FC=/[()=,{}\[\]\/\s]/,VC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,HC=/($^)/,WC=/['\n\r\u2028\u2029\\]/g,UC=Object.prototype.hasOwnProperty;function JC(e,t,n){var r=zC.imports._.templateSettings||zC;n&&nh(e,t,n)&&(t=void 0),e=cv(e),t=Lh({},t,r,RC);var o,i,a=Lh({},t.imports,r.imports,RC),s=Eh(a),c=Jw(a,s),l=0,u=t.interpolate||HC,f="__p += '",d=RegExp((t.escape||HC).source+"|"+u.source+"|"+(u===DC?VC:HC).source+"|"+(t.evaluate||HC).source+"|$","g"),h=UC.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(d,(function(t,n,r,a,s,c){return r||(r=a),f+=e.slice(l,c).replace(WC,IC),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),f+="';\n";var v=UC.call(t,"variable")&&t.variable;if(v){if(FC.test(v))throw new Error("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(i?f.replace(qC,""):f).replace(BC,"$1").replace(LC,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var p=Rv((function(){return Function(s,h+"return "+f).apply(void 0,c)}));if(p.source=f,Pv(p))throw p;return p}function KC(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Du(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Uy(e,t,{leading:r,maxWait:t,trailing:o})}function GC(e,t){return t(e)}var QC=9007199254740991,YC=4294967295,XC=Math.min;function ZC(e,t){if((e=Ju(e))<1||e>QC)return[];var n=YC,r=XC(e,YC);t=Ob(t),e-=YC;for(var o=ah(r,t);++n-1;);return n}function u$(e,t){for(var n=-1,r=e.length;++n-1;);return n}function f$(e,t,n){if((e=cv(e))&&(n||void 0===t))return Iu(e);if(!e||!(t=Au(t)))return e;var r=ip(e),o=ip(t);return Hv(r,u$(r,o),l$(r,o)+1).join("")}function d$(e,t,n){if((e=cv(e))&&(n||void 0===t))return e.slice(0,Ru(e)+1);if(!e||!(t=Au(t)))return e;var r=ip(e);return Hv(r,0,l$(r,ip(t))+1).join("")}var h$=/^\s+/;function v$(e,t,n){if((e=cv(e))&&(n||void 0===t))return e.replace(h$,"");if(!e||!(t=Au(t)))return e;var r=ip(e);return Hv(r,u$(r,ip(t))).join("")}var p$=/\w*$/;function m$(e,t){var n=30,r="...";if(Du(t)){var o="separator"in t?t.separator:o;n="length"in t?Ju(t.length):n,r="omission"in t?Au(t.omission):r}var i=(e=cv(e)).length;if(Uv(e)){var a=ip(e);i=a.length}if(n>=i)return e;var s=n-Oj(r);if(s<1)return r;var c=a?Hv(a,0,s).join(""):e.slice(0,s);if(void 0===o)return c+r;if(a&&(s+=c.length-s),Ux(o)){if(e.slice(s).search(o)){var l,u=c;for(o.global||(o=RegExp(o.source,cv(p$.exec(o))+"g")),o.lastIndex=0;l=o.exec(u);)var f=l.index;c=c.slice(0,void 0===f?s:f)}}else if(e.indexOf(Au(o),s)!=s){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r}function g$(e){return Hd(e,1)}var y$=up({"&":"&","<":"<",">":">",""":'"',"'":"'"}),b$=/&(?:amp|lt|gt|quot|#39);/g,w$=RegExp(b$.source);function x$(e){return(e=cv(e))&&w$.test(e)?e.replace(b$,y$):e}var k$=bm&&1/Dg(new bm([,-0]))[1]==1/0?function(e){return new bm(e)}:Af,j$=200;function S$(e,t,n){var r=-1,o=td,i=e.length,a=!0,s=[],c=s;if(n)a=!1,o=db;else if(i>=j$){var l=t?null:k$(e);if(l)return Dg(l);a=!1,o=Pg,c=new Ag}else c=t?[]:s;e:for(;++r1||this.__actions__.length)&&r instanceof Mf&&vd(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:GC,args:[o],thisArg:void 0}),new Nf(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)})),K$=J$;function G$(){return Gp(this)}function Q$(){var e=this.__wrapped__;if(e instanceof Mf){var t=e;return this.__actions__.length&&(t=new Mf(this)),(t=t.reverse()).__actions__.push({func:GC,args:[ES],thisArg:void 0}),new Nf(t,this.__chain__)}return this.thru(ES)}function Y$(e,t,n){var r=e.length;if(r<2)return r?S$(e[0]):[];for(var o=-1,i=Array(r);++o1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,D$(e,n)})),s_=a_,c_={chunk:Xp,compact:Og,concat:Mg,difference:mb,differenceBy:bb,differenceWith:xb,drop:jb,dropRight:Sb,dropRightWhile:$b,dropWhile:_b,fill:Yb,findIndex:nw,findLastIndex:cw,first:fw,flatten:bv,flattenDeep:gw,flattenDepth:yw,fromPairs:Ow,head:fw,indexOf:Xw,initial:Zw,intersection:rx,intersectionBy:ix,intersectionWith:ax,join:ek,last:gb,lastIndexOf:sk,nth:Hk,pull:Zj,pullAll:Xj,pullAllBy:eS,pullAllWith:tS,pullAt:iS,remove:CS,reverse:ES,slice:US,sortedIndex:iC,sortedIndexBy:aC,sortedIndexOf:sC,sortedLastIndex:cC,sortedLastIndexBy:lC,sortedLastIndexOf:uC,sortedUniq:dC,sortedUniqBy:hC,tail:$C,take:_C,takeRight:OC,takeRightWhile:MC,takeWhile:AC,union:C$,unionBy:_$,unionWith:O$,uniq:M$,uniqBy:A$,uniqWith:E$,unzip:I$,unzipWith:D$,without:W$,xor:X$,xorBy:e_,xorWith:t_,zip:n_,zipObject:o_,zipObjectDeep:i_,zipWith:s_},l_={countBy:zy,each:Mb,eachRight:Rb,every:Kb,filter:Zb,find:rw,findLast:lw,flatMap:vw,flatMapDeep:pw,flatMapDepth:mw,forEach:Mb,forEachRight:Rb,groupBy:Rw,includes:Qw,invokeMap:wx,keyBy:ok,map:hw,orderBy:rj,partition:Hj,reduce:xS,reduceRight:jS,reject:SS,sample:NS,sampleSize:qS,shuffle:HS,size:WS,some:QS,sortBy:XS},u_={now:Fy},f_={after:Ku,ary:Hd,before:Iv,bind:zv,bindKey:Fv,curry:By,curryRight:Ly,debounce:Uy,defer:lb,delay:fb,flip:bw,memoize:ov,negate:Dk,once:ej,overArgs:lj,partial:Bj,partialRight:Fj,rearg:bS,rest:OS,spread:mC,throttle:KC,unary:g$,wrap:U$},d_={castArray:Hp,clone:bg,cloneDeep:kg,cloneDeepWith:Cg,cloneWith:$g,conformsTo:_y,eq:Ud,gt:Dw,gte:zw,isArguments:fh,isArray:$u,isArrayBuffer:kx,isArrayLike:th,isArrayLikeObject:Zy,isBoolean:jx,isBuffer:mh,isDate:Cx,isElement:$x,isEmpty:Ax,isEqual:Ex,isEqualWith:Px,isError:Pv,isFinite:Rx,isFunction:ef,isInteger:Nx,isLength:eh,isMap:sg,isMatch:Ix,isMatchWith:Dx,isNaN:Bx,isNative:Fx,isNil:Vx,isNull:Hx,isNumber:qx,isObject:Du,isObjectLike:wu,isPlainObject:Mv,isRegExp:Ux,isSafeInteger:Kx,isSet:lg,isString:Uw,isSymbol:ku,isTypedArray:Sh,isUndefined:Gx,isWeakMap:Qx,isWeakSet:Yx,lt:dk,lte:hk,toArray:Lk,toFinite:Uu,toInteger:Ju,toLength:Qb,toNumber:Vu,toPlainObject:tb,toSafeInteger:a$,toString:cv},h_={add:Pu,ceil:Kp,divide:kb,floor:ww,max:bk,maxBy:wk,mean:Sk,meanBy:Ck,min:Pk,minBy:Tk,multiply:Nk,round:PS,subtract:jC,sum:SC,sumBy:CC},v_=em,p_=Hw,m_=dS,g_={assign:Rh,assignIn:qh,assignInWith:Lh,assignWith:Vh,at:xv,create:qy,defaults:Yy,defaultsDeep:ab,entries:Db,entriesIn:zb,extend:qh,extendWith:Lh,findKey:iw,findLastKey:uw,forIn:Sw,forInRight:Cw,forOwn:$w,forOwnRight:_w,functions:Aw,functionsIn:Ew,get:hv,has:Lw,hasIn:gy,invert:ux,invertBy:px,invoke:yx,keys:Eh,keysIn:Dh,mapKeys:vk,mapValues:pk,merge:_k,mergeWith:ib,omit:Gk,omitBy:Zk,pick:Uj,pickBy:Xk,result:MS,set:BS,setWith:LS,toPairs:Db,toPairsIn:zb,transform:c$,unset:R$,update:q$,updateWith:B$,values:Kw,valuesIn:V$},y_={at:K$,chain:Gp,commit:_g,lodash:qf,next:Fk,plant:Jj,reverse:Q$,tap:EC,thru:GC,toIterator:e$,toJSON:n$,value:n$,valueOf:n$,wrapperChain:G$},b_={camelCase:Vp,capitalize:cp,deburr:vp,endsWith:Nb,escape:Fb,escapeRegExp:Wb,kebabCase:nk,lowerCase:lk,lowerFirst:uk,pad:Tj,padEnd:Rj,padStart:Nj,parseInt:zj,repeat:$S,replace:_S,snakeCase:KS,split:vC,startCase:yC,startsWith:bC,template:JC,templateSettings:zC,toLower:r$,toUpper:s$,trim:f$,trimEnd:d$,trimStart:v$,truncate:m$,unescape:x$,upperCase:F$,upperFirst:sp,words:qp},w_={attempt:Rv,bindAll:Bv,cond:Sy,conforms:$y,constant:Jf,defaultTo:Jy,flow:kw,flowRight:jw,identity:Gu,iteratee:Xx,matches:mk,matchesProperty:gk,method:Mk,methodOf:Ek,mixin:Rk,noop:Af,nthArg:Wk,over:ij,overEvery:uj,overSome:fj,property:ky,propertyOf:Kj,range:mS,rangeRight:gS,stubArray:lm,stubFalse:dh,stubObject:wC,stubString:xC,stubTrue:kC,times:ZC,toPath:o$,uniqueId:T$};var x_=Math.max,k_=Math.min;var j_=Math.min; +/** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */var S_,C_=4294967295,$_=Array.prototype,__=Object.prototype.hasOwnProperty,O_=uu?uu.iterator:void 0,M_=Math.max,A_=Math.min,E_=function(e){return function(t,n,r){if(null==r){var o=Du(n),i=o&&Eh(n),a=i&&i.length&&Mw(n,i);(a?a.length:o)||(r=n,n=t,t=this)}return e(t,n,r)}}(Rk);qf.after=f_.after,qf.ary=f_.ary,qf.assign=g_.assign,qf.assignIn=g_.assignIn,qf.assignInWith=g_.assignInWith,qf.assignWith=g_.assignWith,qf.at=g_.at,qf.before=f_.before,qf.bind=f_.bind,qf.bindAll=w_.bindAll,qf.bindKey=f_.bindKey,qf.castArray=d_.castArray,qf.chain=y_.chain,qf.chunk=c_.chunk,qf.compact=c_.compact,qf.concat=c_.concat,qf.cond=w_.cond,qf.conforms=w_.conforms,qf.constant=w_.constant,qf.countBy=l_.countBy,qf.create=g_.create,qf.curry=f_.curry,qf.curryRight=f_.curryRight,qf.debounce=f_.debounce,qf.defaults=g_.defaults,qf.defaultsDeep=g_.defaultsDeep,qf.defer=f_.defer,qf.delay=f_.delay,qf.difference=c_.difference,qf.differenceBy=c_.differenceBy,qf.differenceWith=c_.differenceWith,qf.drop=c_.drop,qf.dropRight=c_.dropRight,qf.dropRightWhile=c_.dropRightWhile,qf.dropWhile=c_.dropWhile,qf.fill=c_.fill,qf.filter=l_.filter,qf.flatMap=l_.flatMap,qf.flatMapDeep=l_.flatMapDeep,qf.flatMapDepth=l_.flatMapDepth,qf.flatten=c_.flatten,qf.flattenDeep=c_.flattenDeep,qf.flattenDepth=c_.flattenDepth,qf.flip=f_.flip,qf.flow=w_.flow,qf.flowRight=w_.flowRight,qf.fromPairs=c_.fromPairs,qf.functions=g_.functions,qf.functionsIn=g_.functionsIn,qf.groupBy=l_.groupBy,qf.initial=c_.initial,qf.intersection=c_.intersection,qf.intersectionBy=c_.intersectionBy,qf.intersectionWith=c_.intersectionWith,qf.invert=g_.invert,qf.invertBy=g_.invertBy,qf.invokeMap=l_.invokeMap,qf.iteratee=w_.iteratee,qf.keyBy=l_.keyBy,qf.keys=Eh,qf.keysIn=g_.keysIn,qf.map=l_.map,qf.mapKeys=g_.mapKeys,qf.mapValues=g_.mapValues,qf.matches=w_.matches,qf.matchesProperty=w_.matchesProperty,qf.memoize=f_.memoize,qf.merge=g_.merge,qf.mergeWith=g_.mergeWith,qf.method=w_.method,qf.methodOf=w_.methodOf,qf.mixin=E_,qf.negate=Dk,qf.nthArg=w_.nthArg,qf.omit=g_.omit,qf.omitBy=g_.omitBy,qf.once=f_.once,qf.orderBy=l_.orderBy,qf.over=w_.over,qf.overArgs=f_.overArgs,qf.overEvery=w_.overEvery,qf.overSome=w_.overSome,qf.partial=f_.partial,qf.partialRight=f_.partialRight,qf.partition=l_.partition,qf.pick=g_.pick,qf.pickBy=g_.pickBy,qf.property=w_.property,qf.propertyOf=w_.propertyOf,qf.pull=c_.pull,qf.pullAll=c_.pullAll,qf.pullAllBy=c_.pullAllBy,qf.pullAllWith=c_.pullAllWith,qf.pullAt=c_.pullAt,qf.range=w_.range,qf.rangeRight=w_.rangeRight,qf.rearg=f_.rearg,qf.reject=l_.reject,qf.remove=c_.remove,qf.rest=f_.rest,qf.reverse=c_.reverse,qf.sampleSize=l_.sampleSize,qf.set=g_.set,qf.setWith=g_.setWith,qf.shuffle=l_.shuffle,qf.slice=c_.slice,qf.sortBy=l_.sortBy,qf.sortedUniq=c_.sortedUniq,qf.sortedUniqBy=c_.sortedUniqBy,qf.split=b_.split,qf.spread=f_.spread,qf.tail=c_.tail,qf.take=c_.take,qf.takeRight=c_.takeRight,qf.takeRightWhile=c_.takeRightWhile,qf.takeWhile=c_.takeWhile,qf.tap=y_.tap,qf.throttle=f_.throttle,qf.thru=GC,qf.toArray=d_.toArray,qf.toPairs=g_.toPairs,qf.toPairsIn=g_.toPairsIn,qf.toPath=w_.toPath,qf.toPlainObject=d_.toPlainObject,qf.transform=g_.transform,qf.unary=f_.unary,qf.union=c_.union,qf.unionBy=c_.unionBy,qf.unionWith=c_.unionWith,qf.uniq=c_.uniq,qf.uniqBy=c_.uniqBy,qf.uniqWith=c_.uniqWith,qf.unset=g_.unset,qf.unzip=c_.unzip,qf.unzipWith=c_.unzipWith,qf.update=g_.update,qf.updateWith=g_.updateWith,qf.values=g_.values,qf.valuesIn=g_.valuesIn,qf.without=c_.without,qf.words=b_.words,qf.wrap=f_.wrap,qf.xor=c_.xor,qf.xorBy=c_.xorBy,qf.xorWith=c_.xorWith,qf.zip=c_.zip,qf.zipObject=c_.zipObject,qf.zipObjectDeep=c_.zipObjectDeep,qf.zipWith=c_.zipWith,qf.entries=g_.toPairs,qf.entriesIn=g_.toPairsIn,qf.extend=g_.assignIn,qf.extendWith=g_.assignInWith,E_(qf,qf),qf.add=h_.add,qf.attempt=w_.attempt,qf.camelCase=b_.camelCase,qf.capitalize=b_.capitalize,qf.ceil=h_.ceil,qf.clamp=v_,qf.clone=d_.clone,qf.cloneDeep=d_.cloneDeep,qf.cloneDeepWith=d_.cloneDeepWith,qf.cloneWith=d_.cloneWith,qf.conformsTo=d_.conformsTo,qf.deburr=b_.deburr,qf.defaultTo=w_.defaultTo,qf.divide=h_.divide,qf.endsWith=b_.endsWith,qf.eq=d_.eq,qf.escape=b_.escape,qf.escapeRegExp=b_.escapeRegExp,qf.every=l_.every,qf.find=l_.find,qf.findIndex=c_.findIndex,qf.findKey=g_.findKey,qf.findLast=l_.findLast,qf.findLastIndex=c_.findLastIndex,qf.findLastKey=g_.findLastKey,qf.floor=h_.floor,qf.forEach=l_.forEach,qf.forEachRight=l_.forEachRight,qf.forIn=g_.forIn,qf.forInRight=g_.forInRight,qf.forOwn=g_.forOwn,qf.forOwnRight=g_.forOwnRight,qf.get=g_.get,qf.gt=d_.gt,qf.gte=d_.gte,qf.has=g_.has,qf.hasIn=g_.hasIn,qf.head=c_.head,qf.identity=Gu,qf.includes=l_.includes,qf.indexOf=c_.indexOf,qf.inRange=p_,qf.invoke=g_.invoke,qf.isArguments=d_.isArguments,qf.isArray=$u,qf.isArrayBuffer=d_.isArrayBuffer,qf.isArrayLike=d_.isArrayLike,qf.isArrayLikeObject=d_.isArrayLikeObject,qf.isBoolean=d_.isBoolean,qf.isBuffer=d_.isBuffer,qf.isDate=d_.isDate,qf.isElement=d_.isElement,qf.isEmpty=d_.isEmpty,qf.isEqual=d_.isEqual,qf.isEqualWith=d_.isEqualWith,qf.isError=d_.isError,qf.isFinite=d_.isFinite,qf.isFunction=d_.isFunction,qf.isInteger=d_.isInteger,qf.isLength=d_.isLength,qf.isMap=d_.isMap,qf.isMatch=d_.isMatch,qf.isMatchWith=d_.isMatchWith,qf.isNaN=d_.isNaN,qf.isNative=d_.isNative,qf.isNil=d_.isNil,qf.isNull=d_.isNull,qf.isNumber=d_.isNumber,qf.isObject=Du,qf.isObjectLike=d_.isObjectLike,qf.isPlainObject=d_.isPlainObject,qf.isRegExp=d_.isRegExp,qf.isSafeInteger=d_.isSafeInteger,qf.isSet=d_.isSet,qf.isString=d_.isString,qf.isSymbol=d_.isSymbol,qf.isTypedArray=d_.isTypedArray,qf.isUndefined=d_.isUndefined,qf.isWeakMap=d_.isWeakMap,qf.isWeakSet=d_.isWeakSet,qf.join=c_.join,qf.kebabCase=b_.kebabCase,qf.last=gb,qf.lastIndexOf=c_.lastIndexOf,qf.lowerCase=b_.lowerCase,qf.lowerFirst=b_.lowerFirst,qf.lt=d_.lt,qf.lte=d_.lte,qf.max=h_.max,qf.maxBy=h_.maxBy,qf.mean=h_.mean,qf.meanBy=h_.meanBy,qf.min=h_.min,qf.minBy=h_.minBy,qf.stubArray=w_.stubArray,qf.stubFalse=w_.stubFalse,qf.stubObject=w_.stubObject,qf.stubString=w_.stubString,qf.stubTrue=w_.stubTrue,qf.multiply=h_.multiply,qf.nth=c_.nth,qf.noop=w_.noop,qf.now=u_.now,qf.pad=b_.pad,qf.padEnd=b_.padEnd,qf.padStart=b_.padStart,qf.parseInt=b_.parseInt,qf.random=m_,qf.reduce=l_.reduce,qf.reduceRight=l_.reduceRight,qf.repeat=b_.repeat,qf.replace=b_.replace,qf.result=g_.result,qf.round=h_.round,qf.sample=l_.sample,qf.size=l_.size,qf.snakeCase=b_.snakeCase,qf.some=l_.some,qf.sortedIndex=c_.sortedIndex,qf.sortedIndexBy=c_.sortedIndexBy,qf.sortedIndexOf=c_.sortedIndexOf,qf.sortedLastIndex=c_.sortedLastIndex,qf.sortedLastIndexBy=c_.sortedLastIndexBy,qf.sortedLastIndexOf=c_.sortedLastIndexOf,qf.startCase=b_.startCase,qf.startsWith=b_.startsWith,qf.subtract=h_.subtract,qf.sum=h_.sum,qf.sumBy=h_.sumBy,qf.template=b_.template,qf.times=w_.times,qf.toFinite=d_.toFinite,qf.toInteger=Ju,qf.toLength=d_.toLength,qf.toLower=b_.toLower,qf.toNumber=d_.toNumber,qf.toSafeInteger=d_.toSafeInteger,qf.toString=d_.toString,qf.toUpper=b_.toUpper,qf.trim=b_.trim,qf.trimEnd=b_.trimEnd,qf.trimStart=b_.trimStart,qf.truncate=b_.truncate,qf.unescape=b_.unescape,qf.uniqueId=w_.uniqueId,qf.upperCase=b_.upperCase,qf.upperFirst=b_.upperFirst,qf.each=l_.forEach,qf.eachRight=l_.forEachRight,qf.first=c_.head,E_(qf,(S_={},Ey(qf,(function(e,t){__.call(qf.prototype,t)||(S_[t]=e)})),S_),{chain:!1}),qf.VERSION="4.17.21",(qf.templateSettings=b_.templateSettings).imports._=qf,Yf(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qf[e].placeholder=qf})),Yf(["drop","take"],(function(e,t){Mf.prototype[e]=function(n){n=void 0===n?1:M_(Ju(n),0);var r=this.__filtered__&&!t?new Mf(this):this.clone();return r.__filtered__?r.__takeCount__=A_(n,r.__takeCount__):r.__views__.push({size:A_(n,C_),type:e+(r.__dir__<0?"Right":"")}),r},Mf.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Yf(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Mf.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:jy(e),type:n}),t.__filtered__=t.__filtered__||r,t}})),Yf(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Mf.prototype[e]=function(){return this[n](1).value()[0]}})),Yf(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Mf.prototype[e]=function(){return this.__filtered__?new Mf(this):this[n](1)}})),Mf.prototype.compact=function(){return this.filter(Gu)},Mf.prototype.find=function(e){return this.filter(e).head()},Mf.prototype.findLast=function(e){return this.reverse().find(e)},Mf.prototype.invokeMap=Xd((function(e,t){return"function"==typeof e?new Mf(this):this.map((function(n){return gx(n,e,t)}))})),Mf.prototype.reject=function(e){return this.filter(Dk(jy(e)))},Mf.prototype.slice=function(e,t){e=Ju(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Mf(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=Ju(t))<0?n.dropRight(-t):n.take(t-e)),n)},Mf.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Mf.prototype.toArray=function(){return this.take(C_)},Ey(Mf.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=qf[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(qf.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof Mf,c=a[0],l=s||$u(t),u=function(e){var t=o.apply(qf,pv([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=i&&!f,v=s&&!d;if(!i&&l){t=v?t:new Mf(this);var p=e.apply(t,a);return p.__actions__.push({func:GC,args:[u],thisArg:void 0}),new Nf(p,f)}return h&&v?e.apply(this,a):(p=this.thru(u),h?r?p.value()[0]:p.value():p)})})),Yf(["pop","push","shift","sort","splice","unshift"],(function(e){var t=$_[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);qf.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply($u(o)?o:[],e)}return this[n]((function(n){return t.apply($u(n)?n:[],e)}))}})),Ey(Mf.prototype,(function(e,t){var n=qf[t];if(n){var r=n.name+"";__.call(Pf,r)||(Pf[r]=[]),Pf[r].push({name:t,func:n})}})),Pf[Sd(void 0,2).name]=[{name:"wrapper",func:void 0}],Mf.prototype.clone=function(){var e=new Mf(this.__wrapped__);return e.__actions__=If(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=If(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=If(this.__views__),e},Mf.prototype.reverse=function(){if(this.__filtered__){var e=new Mf(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Mf.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$u(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */;var P_=Object.freeze({__proto__:null,add:Pu,after:Ku,ary:Hd,assign:Rh,assignIn:qh,assignInWith:Lh,assignWith:Vh,at:xv,attempt:Rv,before:Iv,bind:zv,bindAll:Bv,bindKey:Fv,camelCase:Vp,capitalize:cp,castArray:Hp,ceil:Kp,chain:Gp,chunk:Xp,clamp:em,clone:bg,cloneDeep:kg,cloneDeepWith:Cg,cloneWith:$g,commit:_g,compact:Og,concat:Mg,cond:Sy,conforms:$y,conformsTo:_y,constant:Jf,countBy:zy,create:qy,curry:By,curryRight:Ly,debounce:Uy,deburr:vp,default:qf,defaultTo:Jy,defaults:Yy,defaultsDeep:ab,defer:lb,delay:fb,difference:mb,differenceBy:bb,differenceWith:xb,divide:kb,drop:jb,dropRight:Sb,dropRightWhile:$b,dropWhile:_b,each:Mb,eachRight:Rb,endsWith:Nb,entries:Db,entriesIn:zb,eq:Ud,escape:Fb,escapeRegExp:Wb,every:Kb,extend:qh,extendWith:Lh,fill:Yb,filter:Zb,find:rw,findIndex:nw,findKey:iw,findLast:lw,findLastIndex:cw,findLastKey:uw,first:fw,flatMap:vw,flatMapDeep:pw,flatMapDepth:mw,flatten:bv,flattenDeep:gw,flattenDepth:yw,flip:bw,floor:ww,flow:kw,flowRight:jw,forEach:Mb,forEachRight:Rb,forIn:Sw,forInRight:Cw,forOwn:$w,forOwnRight:_w,fromPairs:Ow,functions:Aw,functionsIn:Ew,get:hv,groupBy:Rw,gt:Dw,gte:zw,has:Lw,hasIn:gy,head:fw,identity:Gu,inRange:Hw,includes:Qw,indexOf:Xw,initial:Zw,intersection:rx,intersectionBy:ix,intersectionWith:ax,invert:ux,invertBy:px,invoke:yx,invokeMap:wx,isArguments:fh,isArray:$u,isArrayBuffer:kx,isArrayLike:th,isArrayLikeObject:Zy,isBoolean:jx,isBuffer:mh,isDate:Cx,isElement:$x,isEmpty:Ax,isEqual:Ex,isEqualWith:Px,isError:Pv,isFinite:Rx,isFunction:ef,isInteger:Nx,isLength:eh,isMap:sg,isMatch:Ix,isMatchWith:Dx,isNaN:Bx,isNative:Fx,isNil:Vx,isNull:Hx,isNumber:qx,isObject:Du,isObjectLike:wu,isPlainObject:Mv,isRegExp:Ux,isSafeInteger:Kx,isSet:lg,isString:Uw,isSymbol:ku,isTypedArray:Sh,isUndefined:Gx,isWeakMap:Qx,isWeakSet:Yx,iteratee:Xx,join:ek,kebabCase:nk,keyBy:ok,keys:Eh,keysIn:Dh,last:gb,lastIndexOf:sk,lodash:qf,lowerCase:lk,lowerFirst:uk,lt:dk,lte:hk,map:hw,mapKeys:vk,mapValues:pk,matches:mk,matchesProperty:gk,max:bk,maxBy:wk,mean:Sk,meanBy:Ck,memoize:ov,merge:_k,mergeWith:ib,method:Mk,methodOf:Ek,min:Pk,minBy:Tk,mixin:Rk,multiply:Nk,negate:Dk,next:Fk,noop:Af,now:Fy,nth:Hk,nthArg:Wk,omit:Gk,omitBy:Zk,once:ej,orderBy:rj,over:ij,overArgs:lj,overEvery:uj,overSome:fj,pad:Tj,padEnd:Rj,padStart:Nj,parseInt:zj,partial:Bj,partialRight:Fj,partition:Hj,pick:Uj,pickBy:Xk,plant:Jj,property:ky,propertyOf:Kj,pull:Zj,pullAll:Xj,pullAllBy:eS,pullAllWith:tS,pullAt:iS,random:dS,range:mS,rangeRight:gS,rearg:bS,reduce:xS,reduceRight:jS,reject:SS,remove:CS,repeat:$S,replace:_S,rest:OS,result:MS,reverse:ES,round:PS,sample:NS,sampleSize:qS,set:BS,setWith:LS,shuffle:HS,size:WS,slice:US,snakeCase:KS,some:QS,sortBy:XS,sortedIndex:iC,sortedIndexBy:aC,sortedIndexOf:sC,sortedLastIndex:cC,sortedLastIndexBy:lC,sortedLastIndexOf:uC,sortedUniq:dC,sortedUniqBy:hC,split:vC,spread:mC,startCase:yC,startsWith:bC,stubArray:lm,stubFalse:dh,stubObject:wC,stubString:xC,stubTrue:kC,subtract:jC,sum:SC,sumBy:CC,tail:$C,take:_C,takeRight:OC,takeRightWhile:MC,takeWhile:AC,tap:EC,template:JC,templateSettings:zC,throttle:KC,thru:GC,times:ZC,toArray:Lk,toFinite:Uu,toInteger:Ju,toIterator:e$,toJSON:n$,toLength:Qb,toLower:r$,toNumber:Vu,toPairs:Db,toPairsIn:zb,toPath:o$,toPlainObject:tb,toSafeInteger:a$,toString:cv,toUpper:s$,transform:c$,trim:f$,trimEnd:d$,trimStart:v$,truncate:m$,unary:g$,unescape:x$,union:C$,unionBy:_$,unionWith:O$,uniq:M$,uniqBy:A$,uniqWith:E$,uniqueId:T$,unset:R$,unzip:I$,unzipWith:D$,update:q$,updateWith:B$,upperCase:F$,upperFirst:sp,value:n$,valueOf:n$,values:Kw,valuesIn:V$,without:W$,words:qp,wrap:U$,wrapperAt:K$,wrapperChain:G$,wrapperCommit:_g,wrapperLodash:qf,wrapperNext:Fk,wrapperPlant:Jj,wrapperReverse:Q$,wrapperToIterator:e$,wrapperValue:n$,xor:X$,xorBy:e_,xorWith:t_,zip:n_,zipObject:o_,zipObjectDeep:i_,zipWith:s_}),T_=1e4,R_=[];function N_(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={};if(!Array.isArray(e))throw new TypeError("Array expected");function r(e,o){(!Array.isArray(e)&&!Ql(e)||t&&o.length>0)&&(n[ec(o)]=!0),Ql(e)&&Object.keys(e).forEach((function(t){r(e[t],o.concat(t))}))}for(var o=Math.min(e.length,T_),i=0;it?e.slice(0,t):e}function z_(e){return Ro({},e)}function q_(e){return Object.values(e)}function B_(e,t,n,r){var o=e.slice(0),i=o.splice(t,n);return o.splice.apply(o,[t+r,0].concat(Bo(i))),o}function L_(e,t){try{return t.parse(e)}catch(n){return t.parse(Wl(e))}}function F_(e,t){try{return L_(e,t)}catch(e){return}}function V_(e,t){e=e.replace(W_,"");try{return t(e)}catch(e){}try{return t("["+e+"]")}catch(e){}try{return t("{"+e+"}")}catch(e){}throw new Error("Failed to parse partial JSON")}function H_(e){e=e.replace(W_,"");try{return Wl(e)}catch(e){}try{var t=Wl("["+e+"]");return t.substring(1,t.length-1)}catch(e){}try{var n=Wl("{"+e+"}");return n.substring(1,n.length-1)}catch(e){}throw new Error("Failed to repair partial JSON")}var W_=/,\s*$/;function U_(e,t){var n=nO.exec(t);if(n){var r=Jl(n[2]),o=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,o=0,i=n;i1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return G_(e)?e:{text:n.stringify(e.json,null,t)}}function X_(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return Q_(e)?e:{json:t.parse(e.text)}}function Z_(e,t,n){return Y_(e,t,n).text}function eO(e,t){return tO(e,t)>t}function tO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(G_(e))return e.text.length;var n=e.json,r=0;return function e(n){if(Array.isArray(n)){if((r+=n.length-1+2)>t)return r;for(var o=0;ot)return r}}else if(Ql(n)){var i=Object.keys(n);r+=2+i.length+(i.length-1);for(var a=0;a0&&t.height>0})),u),l=u(n);function u(e){var t=e.getBoundingClientRect();return{x:t.left+t.width/2,y:t.top+t.height/2,rect:t,element:e}}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=e.x-t.x,o=(e.y-t.y)*n;return Math.sqrt(r*r+o*o)}var d=function(e){return f(e,l)};if("Left"===r||"Right"===r){var h="Left"===r?c.filter((function(e){return t=l,e.rect.left+st.rect.right+s;var t})),v=Tk(h.filter((function(e){return t=e,n=l,Math.abs(t.y-n.y)t.y+s;var t})),m=Tk(p.filter((function(e){return i(e.element)})),d)||Tk(p,d);return null==m?void 0:m.element}}function TO(e){return!!e&&"DIV"===e.nodeName&&"function"==typeof e.refresh&&"function"==typeof e.cancel}function RO(e){var t=arguments.length>1&&void 0!==arguments[1]?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=1===e.key.length?e.key.toUpperCase():e.key;return r in NO||n.push(r),n.join(t)}var NO={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},IO=vi.window;function DO(e){mi(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 zO(e){var t,n,r,o,i,a,s=[e[0].props],c=e[0].component;function l(e,t){for(var n={},r=0;rwindow.innerHeight&&h>i,g="left"===u||d+r>window.innerWidth&&d>r;return{left:g?p-l:d+l,top:m?h-s:v+s,positionAbove:m,positionLeft:g}}if("number"==typeof t.left&&"number"==typeof t.top){var y=t.left,b=t.top,w=t.width,x=void 0===w?0:w,k=t.height,j=void 0===k?0:k;return{left:y,top:b,positionAbove:b+j>window.innerHeight&&b>j,positionLeft:y+x>window.innerWidth&&y>x}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),o=r.left,i=r.top,a=r.positionAbove,s=r.positionLeft;return(a?"bottom: ".concat(n.top-i,"px;"):"top: ".concat(i-n.top,"px;"))+(s?"right: ".concat(n.left-o,"px;"):"left: ".concat(o-n.left,"px;"))}function FO(e,t,n){var r,o,i=t.popup,a=t.closeAbsolutePopup;function s(e){i.options&&i.options.closeOnOuterClick&&!kO(e.target,(function(e){return e===r}))&&a(i.id)}return Gi((function(){o&&o.focus()})),e.$$set=function(e){"popup"in e&&n(0,i=e.popup),"closeAbsolutePopup"in e&&n(6,a=e.closeAbsolutePopup)},[i,r,o,function(e){s(e)},function(e){"Escape"===RO(e)&&a(i.id)},function(e){s(e)},a,function(e){na[e?"unshift":"push"]((function(){n(2,o=e)}))},function(e){na[e?"unshift":"push"]((function(){n(1,r=e)}))}]}var VO=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,FO,qO,Xo,{popup:0,closeAbsolutePopup:6},DO),n}return Eo(t,Ia),Do(t)}();function HO(e,t,n){var r=e.slice();return r[6]=t[n],r}function WO(e){var t,n;return t=new VO({props:{popup:e[6],closeAbsolutePopup:e[1]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.popup=e[6]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function UO(e){for(var t,n,r=Ca(e[0]),o=[],i=0;i0?".":"")+e})).join("")}function QO(e){for(var t=[],n=0;n1&&void 0!==arguments[1]&&arguments[1],o="";n1?" "+i:"");o="".concat(r," (").concat(a,")"),i++}return o}function rM(e,t){var n=t-3;return e.length>t?e.substring(0,n)+"...":e}function oM(e){if(""===e)return"";var t=e.toLowerCase();if("null"===t)return null;if("true"===t)return!0;if("false"===t)return!1;if("undefined"!==t){var n=Number(e),r=parseFloat(e);return isNaN(n)||isNaN(r)?e:n}}var iM={id:"javascript",name:"JavaScript",description:"\n

\n Enter a JavaScript function to filter, sort, or transform the data.\n

\n",createQuery:function(e,t){var n=t.filter,r=t.sort,o=t.projection,i=[" return data\n"];if(n&&n.path&&n.relation&&n.value){var a="item => item".concat(ZO(n.path)),s=oM(n.value),c="string"==typeof s?"'".concat(n.value,"'"):iu(n.value)&&!Number.isSafeInteger(s)?"".concat(n.value,"n"):n.value;i.push(" .filter(".concat(a," ").concat(n.relation," ").concat(c,")\n"))}r&&r.path&&r.direction&&("desc"===r.direction?i.push(" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(ZO(r.path),"\n")+" const valueB = b".concat(ZO(r.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n"):i.push(" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(ZO(r.path),"\n")+" const valueB = b".concat(ZO(r.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"));if(o&&o.paths)if(o.paths.length>1){var l=o.paths.map((function(e){var t=e[e.length-1]||"item",n="item".concat(ZO(e));return" ".concat(JSON.stringify(t),": ").concat(n)}));i.push(" .map(item => ({\n".concat(l.join(",\n"),"})\n )\n"))}else{var u="item".concat(ZO(o.paths[0]));i.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(i.join(""),"}")},executeQuery:function(e,t){var n=new Function('"use strict";\n\n'+t+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')()(e);return void 0!==n?n:null}};var aM={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"]},sM={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"]},cM={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"]},lM={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 uM(e){var t;return{c:function(){t=Si("g")},m:function(n,r){wi(n,t,r),t.innerHTML=e[0]},p:function(e,n){1&jo(n,1)[0]&&(t.innerHTML=e[0])},i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function fM(e,t,n){var r=870711;var o="",i=t.data;function a(e){if(!e||!e.raw)return"";var t=e.raw,n={};return t=t.replace(/\s(?:xml:)?id=["']?([^"')\s]+)/g,(function(e,t){var o="fa-".concat((r+=1).toString(16));return n[t]=o,' id="'.concat(o,'"')})),t=t.replace(/#(?:([^'")\s]+)|xpointer\(id\((['"]?)([^')]+)\2\)\))/g,(function(e,t,r,o){var i=t||o;return i&&n[i]?"#".concat(n[i]):e})),t}return e.$$set=function(e){"data"in e&&n(1,i=e.data)},e.$$.update=function(){2&e.$$.dirty&&n(0,o=a(i))},[o,i]}var dM=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,fM,uM,Xo,{data:1}),n}return Eo(t,Ia),Do(t)}();function hM(e){mi(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 vM(e){for(var t,n,r,o,i=e[12].default,a=ei(i,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]],c={},l=0;l300},{anchor:r,closeOnOuterClick:!0,onClose:f,offsetTop:18,offsetLeft:-8,height:300})}},i,c,l]}var DM=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,IM,NM,Zo,{path:4,value:0,readOnly:1,onPatch:5,focus:6},RM),n}return Eo(t,Ia),Do(t)}();function zM(e){for(var t=XS(e,(function(e){return e.start})),n=[t[0]],r=0;r=e.start&&t0){var c=VM(t,s);HM(n,c,(function(t){i[a]=String(t),e(n[t])})),i.pop()}}}else if(Ql(n)&&r(i)){o[ec(i)]=!0;var l=Object.keys(n);if(l.length>0){var u,f=bo(l);try{for(f.s();!(u=f.n()).done;){var d=u.value;i[a]=d,e(n[d])}}catch(e){f.e(e)}finally{f.f()}i.pop()}}}(a),Ro(Ro({},t),{},{expandedMap:o})}function JM(e,t){var n=XM(e.expandedMap,t),r=XM(e.enforceStringMap,t),o=XM(e.visibleSectionsMap,t);return Ro(Ro({},e),{},{expandedMap:n,enforceStringMap:r,visibleSectionsMap:o})}function KM(e,t,n){if(n){var r=Ro({},e.enforceStringMap);return r[t]=n,Ro(Ro({},e),{},{enforceStringMap:r})}if("boolean"==typeof e.enforceStringMap[t]){var o=Ro({},e.enforceStringMap);return delete o[t],Ro(Ro({},e),{},{enforceStringMap:o})}return e}function GM(e,t,n){var r=oc(e,n),o=n.reduce((function(e,t){return Is(t)?QM(r,e,t):Ds(t)?YM(r,e,t):zs(t)?function(e,t,n){var r=n.path,o=rA(e,t.expandedMap),i=rA(e,t.enforceStringMap),a=rA(e,t.visibleSectionsMap);Ns(n.value)||Rs(n.value)||delete o[r];Rs(n.value)||delete a[r];(Ns(n.value)||Rs(n.value))&&delete i[r];return Ro(Ro({},t),{},{expandedMap:o,enforceStringMap:i,visibleSectionsMap:a})}(r,e,t):qs(t)||Bs(t)?function(e,t,n){if(Bs(n)&&n.from===n.path)return t;var r=function(e){return n.path+e.substring(n.from.length)},o=tA(ZM(t.expandedMap,n.from),r),i=tA(ZM(t.enforceStringMap,n.from),r),a=tA(ZM(t.visibleSectionsMap,n.from),r),s=t;Bs(n)&&(s=YM(e,s,{op:"remove",path:n.from}));s=QM(e,s,{op:"add",path:n.path,value:null});var c=eA(s.expandedMap,o),l=eA(s.enforceStringMap,i),u=eA(s.visibleSectionsMap,a);return Ro(Ro({},t),{},{expandedMap:c,enforceStringMap:l,visibleSectionsMap:u})}(r,e,t):e}),t);return{json:r,documentState:o}}function QM(e,t,n){var r=hc(e,n.path),o=Zw(r),i=ec(o);if(Rs(Us(e,o))){var a=Jl(gb(r)),s=nA(t.expandedMap,o,a,1),c=nA(t.enforceStringMap,o,a,1),l=nA(t.visibleSectionsMap,o,a,1);return l=oA(l,i,(function(e){return iA(e,a,1)})),Ro(Ro({},t),{},{expandedMap:s,enforceStringMap:c,visibleSectionsMap:l})}return t}function YM(e,t,n){var r=hc(e,n.path),o=Zw(r),i=ec(o),a=Us(e,o),s=t.expandedMap,c=t.enforceStringMap,l=t.visibleSectionsMap;if(s=XM(s,r),c=XM(c,r),l=XM(l,r),Rs(a)){var u=Jl(gb(r));s=nA(s,o,u,-1),c=nA(c,o,u,-1),l=oA(l=nA(l,o,u,-1),i,(function(e){return iA(e,u,-1)}))}return Ro(Ro({},t),{},{expandedMap:s,enforceStringMap:c,visibleSectionsMap:l})}function XM(e,t){var n={},r=ec(t);return Object.keys(e).forEach((function(t){rc(t,r)||(n[t]=e[t])})),n}function ZM(e,t){var n={};return Object.keys(e).forEach((function(r){rc(r,t)&&(n[r]=e[r])})),n}function eA(e,t){return Ro(Ro({},e),t)}function tA(e,t){var n={};return Object.keys(e).forEach((function(r){var o=t(r);n[o]=e[r]})),n}function nA(e,t,n,r){for(var o=t.length,i=ec(t),a=[],s=0,c=Object.keys(e);s=n&&(u[o]=String(f+r),a.push({oldPointer:l,newPointer:ec(u),value:e[l]}))}}if(0===a.length)return e;var d=Ro({},e);return a.forEach((function(e){delete d[e.oldPointer]})),a.forEach((function(e){d[e.newPointer]=e.value})),d}function rA(e,t){var n={};return Object.keys(t).filter((function(t){return Xs(e,hc(e,t))})).forEach((function(e){n[e]=t[e]})),n}function oA(e,t,n){var r=e[t];if(t in e){var o=n(r);if(!Ex(r,o)){var i=Ro({},e);return void 0===o?delete i[t]:i[t]=o,i}}return e}function iA(e,t,n){return function(e){var t=e.slice(0),n=1;for(;nt?e.start+n:e.start,end:e.end>t?e.end+n:e.end}})))}function aA(e,t,n,r){var o=t?t[n]:void 0;return"boolean"==typeof o?o:function(e,t){return"string"==typeof e&&"string"!=typeof ou(e,t)}(e,r)}function sA(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.indexOf(t);return-1!==r?n?e.slice(r):e.slice(r+1):[]}function cA(e,t){var n=[];return function e(r,o){n.push(o);var i=ec(o);if(r&&!0===t.expandedMap[i]){if(Rs(r)){var a=VM(t,i);HM(r,a,(function(t){e(r[t],o.concat(String(t)))}))}Ns(r)&&Object.keys(r).forEach((function(t){e(r[t],o.concat(t))}))}}(e,[]),n}function lA(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=[];return function e(o,i){r.push({path:i,type:Xa.value});var a=ec(i);if(o&&!0===t.expandedMap[a]){if(n&&r.push({path:i,type:Xa.inside}),Rs(o)){var s=VM(t,a);HM(o,s,(function(t){var a=i.concat(String(t));e(o[t],a),n&&r.push({path:a,type:Xa.after})}))}if(Ns(o))Object.keys(o).forEach((function(t){var a=i.concat(t);r.push({path:a,type:Xa.key}),e(o[t],a),n&&r.push({path:a,type:Xa.after})}))}}(e,[]),r}function uA(e,t,n){var r=cA(e,t),o=r.map(ec).indexOf(ec(n));return-1!==o&&on?t.focusPath:t.anchorPath}function $A(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.selection;if(!r)return null;var o=n?GA(r):SA(e,r),i=function(e,t,n){var r=cA(e,t),o=r.map(ec),i=ec(n),a=o.indexOf(i);return-1!==a&&a>0?r[a-1]:null}(e,t,o);if(n)return pA(r)||vA(r)?null!==i?qA(o,o):null:null!==i?qA(QA(r),i):null;if(vA(r))return IA(o,!1);if(pA(r))return IA(o,!1);if(mA(r)){if(null==i||0===i.length)return null;var a=Us(e,Zw(i));return Array.isArray(a)||Ax(i)?IA(i,!1):NA(i,!1)}return gA(r),null!==i?IA(i,!1):null}function _A(e,t,n){var r=t.selection;if(!r)return{caret:null,previous:null,next:null};var o=lA(e,t,n),i=o.findIndex((function(e){return Ex(e.path,GA(r))&&String(e.type)===String(r.type)}));return{caret:-1!==i?o[i]:null,previous:-1!==i&&i>0?o[i-1]:null,next:-1!==i&&in[r].length;)r++;var o=n[r];return void 0===o||0===o.length||Array.isArray(Us(e,Zw(o)))?IA(o,!1):NA(o,!1)}function MA(e,t){if(1===t.length){var n=fw(t);if("replace"===n.op)return IA(hc(e,n.path),!1)}if(!Ax(t)&&t.every((function(e){return"move"===e.op}))){var r=fw(t),o=t.slice(1);if((qs(r)||Bs(r))&&r.from!==r.path&&o.every((function(e){return(qs(e)||Bs(e))&&e.from===e.path})))return NA(hc(e,r.path),!1)}var i=t.filter((function(e){return"test"!==e.op&&"remove"!==e.op&&("move"!==e.op||e.from!==e.path)&&"string"==typeof e.path})).map((function(t){return hc(e,t.path)}));return Ax(i)?null:{type:Ya.multi,anchorPath:fw(i),focusPath:gb(i)}}function AA(e,t){for(var n=0;nn.length&&t.length>n.length;return{type:Ya.multi,anchorPath:r?n.concat(e[n.length]):n,focusPath:r?n.concat(t[n.length]):n}}function BA(e,t,n,r){if(mA(t))return String(gb(t.path));if(gA(t)){var o,i=Us(e,t.path);return"string"==typeof i?i:null!==(o=r.stringify(i,null,n))&&void 0!==o?o:null}if(yA(t)){var a;if(Ax(t.focusPath))return null!==(a=r.stringify(e,null,n))&&void 0!==a?a:null;var s=jA(t),c=Us(e,s);if(Array.isArray(c)){if(bA(t)){var l,u=Us(e,t.focusPath);return null!==(l=r.stringify(u,null,n))&&void 0!==l?l:null}return kA(e,t).map((function(t){var o=Us(e,t);return"".concat(r.stringify(o,null,n),",")})).join("\n")}return kA(e,t).map((function(t){var o=gb(t),i=Us(e,t);return"".concat(r.stringify(o),": ").concat(r.stringify(i,null,n),",")})).join("\n")}return null}function LA(e){return(mA(e)||gA(e))&&!0===e.edit}function FA(e){return mA(e)||gA(e)||yA(e)}function VA(e){return mA(e)||gA(e)||bA(e)}function HA(e){switch(e.type){case Xa.key:return NA(e.path,!1);case Xa.value:return IA(e.path,!1);case Xa.after:return zA(e.path);case Xa.inside:return DA(e.path)}}function WA(e,t,n){switch(t){case Ya.key:return NA(n,!1);case Ya.value:return IA(n,!1);case Ya.after:return zA(n);case Ya.inside:return DA(n);case Ya.multi:case Ya.text:return qA(n,n)}}function UA(e,t,n){return t&&(JA(e,t,n)||TA(yA(t)?Zw(t.focusPath):t.path,n))?t:null}function JA(e,t,n){if(void 0===e||!t)return!1;if(mA(t)||pA(t)||vA(t))return Ex(t.path,n);if(gA(t))return TA(n,t.path);if(yA(t)){var r=SA(e,t),o=CA(e,t),i=Zw(t.focusPath);if(!TA(n,i)||n.length<=i.length)return!1;var a=KA(e,t,r),s=KA(e,t,o),c=KA(e,t,n);return-1!==c&&c>=a&&c<=s}return!1}function KA(e,t,n){var r=Zw(t.focusPath);if(!TA(n,r)||n.length<=r.length)return-1;var o=n[r.length],i=Us(e,r);if(Ns(i))return Object.keys(i).indexOf(o);if(Rs(i)){var a=Jl(o);if(a0?0:-1,a=t.map((function(e,t){return Ro(Ro({},e),{},{active:t===i})})),s=a[i];return{items:a,itemsMap:Rw(a,(function(e){return ec(e.path)})),activeItem:s,activeIndex:i}}function yE(e){var t=e.activeIndex0?0:-1,n=e.items[t],r=e.items.map((function(e,n){return Ro(Ro({},e),{},{active:n===t})}));return Ro(Ro({},e),{},{items:r,itemsMap:Rw(r,(function(e){return ec(e.path)})),activeItem:n,activeIndex:t})}function bE(e){var t=e.activeIndex>0?e.activeIndex-1:e.items.length-1,n=e.items[t],r=e.items.map((function(e,n){return Ro(Ro({},e),{},{active:n===t})}));return Ro(Ro({},e),{},{items:r,itemsMap:Rw(r,(function(e){return ec(e.path)})),activeItem:n,activeIndex:t})}function wE(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=e.toLowerCase(),i=null!==(n=null==r?void 0:r.maxResults)&&void 0!==n?n:1/0,a=null==r?void 0:r.columns,s=[],c=[];function l(e){s.length>=i||s.push(e)}function u(e,t){if(Rs(t)){var n=c.length;c.push("0");for(var r=0;r=i)return;c.pop()}else if(Ns(t)){var o=Object.keys(t),a=c.length;c.push("");for(var f=0,d=o;f=i)return}c.pop()}else xE(String(t),e,c,es.value,l)}if(""===e)return[];if(a){if(!Array.isArray(t))throw new Error("json must be an Array when option columns is defined");for(var f=0;fv.length+1;)c.pop();u(o,Us(d,v))}if(s.length>=i)break}return s}return u(o,t),s}function xE(e,t,n,r,o){var i=e.toLowerCase(),a=0,s=-1,c=-1;do{-1!==(c=i.indexOf(t,s))&&(s=c+t.length,o({path:n.slice(0),field:r,fieldIndex:a,start:c,end:s}),a++)}while(-1!==c)}function kE(e,t,n,r){return e.substring(0,n)+t+e.substring(r)}function jE(e,t,n){var r=e;return Rb(n,(function(e){r=kE(r,t,e.start,e.end)})),r}function SE(e,t,n,r,o){var i=r.field,a=r.path,s=r.start,c=r.end;if(i===es.key){var l=Zw(a),u=Us(e,l),f=gb(a),d=cE(l,Object.keys(u),f,kE(f,n,s,c));return{newSelection:MA(e,d),operations:d}}if(i===es.value){var h=Us(e,a);if(void 0===h)throw new Error("Cannot replace: path not found ".concat(ec(a)));var v="string"==typeof h?h:String(h),p=ec(a),m=aA(h,t.enforceStringMap,p,o),g=kE(v,n,s,c),y=[{op:"replace",path:ec(a),value:m?g:ou(g,o)}];return{newSelection:MA(e,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(i))}function CE(e,t,n,r,o){for(var i=wE(n,e,{maxResults:1/0}),a=[],s=0;st.floating[i]&&(a=aT(a)),[a,aT(a)]}function rT(e){var t=aT(e);return[oT(e),t,oT(t)]}function oT(e){return e.replace(/start|end/g,(function(e){return JP[e]}))}function iT(e,t,n,r){var o=YP(e),i=function(e,t,n){var r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(QP(e),"start"===n,r);return o&&(i=i.map((function(e){return e+"-"+o})),t&&(i=i.concat(i.map(oT)))),i}function aT(e){return e.replace(/left|right|bottom|top/g,(function(e){return UP[e]}))}function sT(e){return"number"!=typeof e?function(e){return Ro({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function cT(e){return Ro(Ro({},e),{},{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function lT(e,t,n){var r,o=e.reference,i=e.floating,a=eT(t),s=tT(t),c=ZP(s),l=QP(t),u="y"===a,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[c]/2-i[c]/2;switch(l){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(YP(t)){case"start":r[s]-=h*(n&&u?-1:1);break;case"end":r[s]+=h*(n&&u?-1:1)}return r}var uT=function(){var e=ko(wo().mark((function e(t,n,r){var o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.placement,i=void 0===o?"bottom":o,a=r.strategy,s=void 0===a?"absolute":a,c=r.middleware,l=void 0===c?[]:c,u=r.platform,f=l.filter(Boolean),e.next=4,null==u.isRTL?void 0:u.isRTL(n);case 4:return d=e.sent,e.next=7,u.getElementRects({reference:t,floating:n,strategy:s});case 7:h=e.sent,v=lT(h,i,d),p=v.x,m=v.y,g=i,y={},b=0,w=0;case 13:if(!(w0})).reduce((function(e,t){return e+t}),0)]})).sort((function(e,t){return e[1]-t[1]}))[0])?void 0:z[0],q&&(D=q),n.abrupt("break",35);case 33:return D=c,n.abrupt("break",35);case 35:if(i===D){n.next=37;break}return n.abrupt("return",{reset:{placement:D}});case 37:return n.abrupt("return",{});case 38:case"end":return n.stop()}}),n)})))()}}},KT=function(e,t,n){var r=new Map,o=Ro({platform:HT},n),i=Ro(Ro({},o.platform),{},{_c:r});return uT(e,t,Ro(Ro({},o),{},{platform:i}))};function GT(e){var t=e.loadOptions,n=e.filterText,r=e.items,o=e.multiple,i=e.value,a=e.itemId,s=e.groupBy,c=e.filterSelectedItems,l=e.itemFilter,u=e.convertStringItemsToObjects,f=e.filterGroupedItems,d=e.label;if(r&&t)return r;if(!r)return[];r&&r.length>0&&"object"!==Ho(r[0])&&(r=u(r));var h=r.filter((function(e){var t=l(e[d],n,e);return t&&o&&null!=i&&i.length&&(t=!i.some((function(t){return!!c&&t[a]===e[a]}))),t}));return s&&(h=f(h)),h}function QT(e){return YT.apply(this,arguments)}function YT(){return YT=ko(wo().mark((function e(t){var n,r,o,i,a;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dispatch,r=t.loadOptions,o=t.convertStringItemsToObjects,i=t.filterText,e.next=3,r(i).catch((function(e){console.warn("svelte-select loadOptions error :>> ",e),n("error",{type:"loadOptions",details:e})}));case 3:if(!(a=e.sent)||a.cancelled){e.next=7;break}return a?(a&&a.length>0&&"object"!==Ho(a[0])&&(a=o(a)),n("loaded",{items:a})):a=[],e.abrupt("return",{filteredItems:a,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return e.stop()}}),e)}))),YT.apply(this,arguments)}function XT(e){mi(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 ZT(e){var t,n;return{c:function(){t=Si("svg"),Ei(n=Si("path"),"fill","currentColor"),Ei(n,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),Ei(t,"width","100%"),Ei(t,"height","100%"),Ei(t,"viewBox","0 0 20 20"),Ei(t,"focusable","false"),Ei(t,"aria-hidden","true"),Ei(t,"class","svelte-qbd276")},m:function(e,r){wi(e,t,r),pi(t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}var eR=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,null,ZT,Xo,{},XT),n}return Eo(t,Ia),Do(t)}();function tR(e){mi(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 nR(e){var t,n;return{c:function(){t=Si("svg"),Ei(n=Si("path"),"fill","currentColor"),Ei(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\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),Ei(t,"width","100%"),Ei(t,"height","100%"),Ei(t,"viewBox","-2 -2 50 50"),Ei(t,"focusable","false"),Ei(t,"aria-hidden","true"),Ei(t,"role","presentation"),Ei(t,"class","svelte-whdbu1")},m:function(e,r){wi(e,t,r),pi(t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}var rR=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,null,nR,Xo,{},tR),n}return Eo(t,Ia),Do(t)}();function oR(e){mi(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 iR(e){var t,n;return{c:function(){t=Si("svg"),Ei(n=Si("circle"),"class","circle_path svelte-1p3nqvd"),Ei(n,"cx","50"),Ei(n,"cy","50"),Ei(n,"r","20"),Ei(n,"fill","none"),Ei(n,"stroke","currentColor"),Ei(n,"stroke-width","5"),Ei(n,"stroke-miterlimit","10"),Ei(t,"class","loading svelte-1p3nqvd"),Ei(t,"viewBox","25 25 50 50")},m:function(e,r){wi(e,t,r),pi(t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}var aR=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,null,iR,Xo,{},oR),n}return Eo(t,Ia),Do(t)}();function sR(e){mi(e,"svelte-82qwg8",".svelte-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--groupTitleBorderColor:var(--group-title-border-color);--groupTitleBorderWidth:var(--group-title-border-width);--groupTitleBorderStyle:var(--group-title-border-style);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px);max-height:var(--max-height)}.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:var(--value-container-padding, 5px 0);position:relative;overflow:var(--value-container-overflow, hidden);align-self:stretch}.prepend.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.indicators.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;flex-shrink:0;align-items:center}.indicators.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{position:var(--indicators-position);top:var(--indicators-top);right:var(--indicators-right);bottom:var(--indicators-bottom)}input.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{position:absolute;cursor:default;border:none;color:var(--input-color, var(--item-color));padding:var(--input-padding, 0);letter-spacing:var(--input-letter-spacing, inherit);margin:var(--input-margin, 0);min-width:10px;top:0;right:0;bottom:0;left:0;background:transparent;font-size:var(--font-size, 16px)}.svelte-82qwg8:not(.multi)>.value-container.svelte-82qwg8>input.svelte-82qwg8{width:100%;height:100%}input.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:focus{outline:none}.svelte-select.focused.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-82qwg8 input.svelte-82qwg8.svelte-82qwg8::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{position:relative;overflow:var(--selected-item-overflow, hidden);padding:var(--selected-item-padding, 0 20px 0 0);text-overflow:ellipsis;white-space:nowrap;color:var(--selected-item-color, inherit);font-size:var(--font-size, 16px)}.multi.svelte-82qwg8 .selected-item.svelte-82qwg8.svelte-82qwg8{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:focus{outline:none}.hide-selected-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{opacity:0}.icon.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;align-items:center;justify-content:center}.clear-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{all:unset;display:flex;align-items:center;justify-content:center;width:var(--clear-select-width, 40px);height:var(--clear-select-height, 100%);color:var(--clear-select-color, var(--icons-color));margin:var(--clear-select-margin, 0);pointer-events:all;flex-shrink:0}.clear-select.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{width:var(--loading-width, 40px);height:var(--loading-height);color:var(--loading-color, var(--icons-color));margin:var(--loading--margin, 0);flex-shrink:0}.chevron.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{width:var(--chevron-width, 40px);height:var(--chevron-height, 40px);background:var(--chevron-background, transparent);pointer-events:var(--chevron-pointer-events, none);color:var(--chevron-color, var(--icons-color));border:var(--chevron-border, 0 0 0 1px solid #d8dbdf);flex-shrink:0}.multi.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-82qwg8 input.svelte-82qwg8.svelte-82qwg8{padding:var(--multi-select-input-padding, 0);position:relative;margin:var(--multi-select-input-margin, 5px 0);flex:1 1 40px}.svelte-select.error.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}.multi-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{background:var(--multi-item-bg, #ebedef);margin:var(--multi-item-margin, 0);outline:var(--multi-item-outline, 1px solid #ddd);border-radius:var(--multi-item-border-radius, 4px);height:var(--multi-item-height, 25px);line-height:var(--multi-item-height, 25px);display:flex;cursor:default;padding:var(--multi-item-padding, 0 5px);overflow:hidden;gap:var(--multi-item-gap, 4px);outline-offset:-1px;max-width:var(--multi-max-width, none);color:var(--multi-item-color, var(--item-color))}.multi-item.disabled.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{box-shadow:var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--list-border-radius, 4px);max-height:var(--list-max-height, 252px);overflow-y:auto;background:var(--list-background, #fff);position:var(--list-position, absolute);z-index:var(--list-z-index, 2);border:var(--list-border)}.prefloat.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{opacity:0;pointer-events:none}.list-group-title.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase);border-width:var(--group-title-border-width, medium);border-style:var(--group-title-border-style, none);border-color:var(--group-title-border-color, color)}.empty.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{cursor:default;height:var(--item-height, var(--height, 42px));line-height:var(--item-line-height, var(--height, 42px));padding:var(--item-padding, 0 20px);color:var(--item-color, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:var(--item-transition, all 0.2s);align-items:center;width:100%}.item.group-item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.item.hover.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.item.active.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8,.item.not-selectable.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-82qwg8.svelte-82qwg8.svelte-82qwg8{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var cR=function(e){return{value:8&e[0]}},lR=function(e){return{value:e[3]}},uR=function(e){return{value:8&e[0]}},fR=function(e){return{value:e[3]}},dR=function(e){return{listOpen:64&e[0]}},hR=function(e){return{listOpen:e[6]}},vR=function(e){return{}},pR=function(e){return{}},mR=function(e){return{}},gR=function(e){return{}},yR=function(e){return{selection:8&e[0]}},bR=function(e){return{selection:e[3]}};function wR(e,t,n){var r=e.slice();return r[126]=t[n],r[128]=n,r}var xR=function(e){return{}},kR=function(e){return{}},jR=function(e){return{selection:8&e[0]}},SR=function(e){return{selection:e[126],index:e[128]}},CR=function(e){return{}},$R=function(e){return{}},_R=function(e){return{}},OR=function(e){return{}},MR=function(e){return{}},AR=function(e){return{}};function ER(e,t,n){var r=e.slice();return r[126]=t[n],r[128]=n,r}var PR=function(e){return{item:16777216&e[0]}},TR=function(e){return{item:e[126],index:e[128]}},RR=function(e){return{filteredItems:16777216&e[0]}},NR=function(e){return{filteredItems:e[24]}},IR=function(e){return{}},DR=function(e){return{}};function zR(e){var t,n,r,o,i,a,s,c,l=e[50]["list-prepend"]&&qR(e),u=[FR,LR,BR],f=[];function d(e,t){return e[50].list?0:e[24].length>0?1:e[19]?-1:2}~(r=d(e))&&(o=f[r]=u[r](e));var h=e[50]["list-append"]&&HR(e);return{c:function(){t=ji("div"),l&&l.c(),n=$i(),o&&o.c(),i=$i(),h&&h.c(),Ei(t,"class","svelte-select-list svelte-82qwg8"),Ei(t,"role","none"),qi(t,"prefloat",e[28])},m:function(o,u){wi(o,t,u),l&&l.m(t,null),pi(t,n),~r&&f[r].m(t,null),pi(t,i),h&&h.m(t,null),e[91](t),a=!0,s||(c=[ci(e[49].call(null,t)),Oi(t,"scroll",e[41]),Oi(t,"pointerup",Ai(Mi(e[85]))),Oi(t,"mousedown",Ai(Mi(e[86])))],s=!0)},p:function(e,s){e[50]["list-prepend"]?l?(l.p(e,s),524288&s[1]&&xa(l,1)):((l=qR(e)).c(),xa(l,1),l.m(t,n)):l&&(ba(),ka(l,1,1,(function(){l=null})),wa());var c=r;(r=d(e))===c?~r&&f[r].p(e,s):(o&&(ba(),ka(f[c],1,1,(function(){f[c]=null})),wa()),~r?((o=f[r])?o.p(e,s):(o=f[r]=u[r](e)).c(),xa(o,1),o.m(t,i)):o=null),e[50]["list-append"]?h?(h.p(e,s),524288&s[1]&&xa(h,1)):((h=HR(e)).c(),xa(h,1),h.m(t,null)):h&&(ba(),ka(h,1,1,(function(){h=null})),wa()),(!a||268435456&s[0])&&qi(t,"prefloat",e[28])},i:function(e){a||(xa(l),xa(o),xa(h),a=!0)},o:function(e){ka(l),ka(o),ka(h),a=!1},d:function(n){n&&xi(t),l&&l.d(),~r&&f[r].d(),h&&h.d(),e[91](null),s=!1,Qo(c)}}}function qR(e){var t,n=e[83]["list-prepend"],r=ei(n,e,e[82],DR);return{c:function(){r&&r.c()},m:function(e,n){r&&r.m(e,n),t=!0},p:function(e,o){r&&r.p&&(!t||1048576&o[2])&&ri(r,n,e,e[82],t?ni(n,e[82],o,IR):oi(e[82]),DR)},i:function(e){t||(xa(r,e),t=!0)},o:function(e){ka(r,e),t=!1},d:function(e){r&&r.d(e)}}}function BR(e){var t,n,r=e[83].empty,o=ei(r,e,e[82],AR),i=o||{c:function(){(n=ji("div")).textContent="No options",Ei(n,"class","empty svelte-82qwg8")},m:function(e,t){wi(e,n,t)},p:Wo,d:function(e){e&&xi(n)}};return{c:function(){i&&i.c()},m:function(e,n){i&&i.m(e,n),t=!0},p:function(e,n){o&&o.p&&(!t||1048576&n[2])&&ri(o,r,e,e[82],t?ni(r,e[82],n,MR):oi(e[82]),AR)},i:function(e){t||(xa(i,e),t=!0)},o:function(e){ka(i,e),t=!1},d:function(e){i&&i.d(e)}}}function LR(e){for(var t,n,r=Ca(e[24]),o=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(d),d=setTimeout(e,t)}:Be,Fe=t.debounceWait,Ve=void 0===Fe?300:Fe,He=t.hideEmptyState,We=void 0!==He&&He,Ue=t.inputAttributes,Je=void 0===Ue?{}:Ue,Ke=t.listAutoWidth,Ge=void 0===Ke||Ke,Qe=t.showChevron,Ye=void 0!==Qe&&Qe,Xe=t.listOffset,Ze=void 0===Xe?5:Xe,et=t.hoverItemIndex,tt=void 0===et?0:et,nt=t.floatingConfig,rt=void 0===nt?{}:nt,ot=t.class,it=void 0===ot?"":ot;function at(e){var t=[],n={};e.forEach((function(e){var r=se(e);t.includes(r)||(t.push(r),n[r]=[],r&&n[r].push(Object.assign(Me(r,e),{id:r,groupHeader:!0,selectable:fe}))),n[r].push(Object.assign({groupItem:!!r},e))}));var r=[];return le(t).forEach((function(e){n[e]&&r.push.apply(r,Bo(n[e]))})),r}function st(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;n(7,tt=e<0?0:e),!t&&se&&l[tt]&&!l[tt].selectable&&Mt(1)}function ct(){var e=!0;if(J){var t=[],r=[];J.forEach((function(n){t.includes(n[he])?e=!1:(t.push(n[he]),r.push(n))})),e||n(3,J=r)}return e}function lt(e){var t=e?e[he]:J[he];return te.find((function(e){return e[he]===t}))}function ut(e){return ft.apply(this,arguments)}function ft(){return ft=ko(wo().mark((function e(t){var r;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=J[t],1===J.length?n(3,J=void 0):n(3,J=J.filter((function(e){return e!==r}))),j("clear",r);case 3:case"end":return e.stop()}}),e)}))),ft.apply(this,arguments)}function dt(e){var t,r;W&&D===(null===(t=document)||void 0===t?void 0:t.activeElement)||(e&&j("focus",e),null===(r=D)||void 0===r||r.focus(),n(2,W=!0))}function ht(e){return vt.apply(this,arguments)}function vt(){return(vt=ko(wo().mark((function e(t){var r;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Ct){e.next=2;break}return e.abrupt("return");case 2:(qe||W)&&(j("blur",t),pt(),n(2,W=!1),n(26,h=void 0),null===(r=D)||void 0===r||r.blur());case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pt(){_e&&n(4,G=""),n(6,qe=!1)}y=ko(wo().mark((function e(){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n(78,v=J),n(79,p=G),n(80,m=q);case 3:case"end":return e.stop()}}),e)}))),Ki().$$.before_update.push(y),Gi((function(){qe&&n(2,W=!0),W&&D&&D.focus()}));var mt=t.ariaValues,gt=void 0===mt?function(e){return"Option ".concat(e,", selected.")}:mt,yt=t.ariaListOpen,bt=void 0===yt?function(e,t){return"You are currently focused on option ".concat(e,". There are ").concat(t," results available.")}:yt,wt=t.ariaFocused,xt=void 0===wt?function(){return"Select is focused, type to refine list, press down to open the menu."}:wt;var kt,jt=null;function St(){clearTimeout(kt),kt=setTimeout((function(){Ct=!1}),100)}Qi((function(){var e;null===(e=jt)||void 0===e||e.remove()}));var Ct=!1;function $t(e){e&&!1!==e.selectable&&function(e){if(e){n(4,G="");var t=Object.assign({},e);if(t.groupHeader&&!t.selectable)return;n(3,J=q?J?J.concat([t]):[t]:n(3,J=t)),setTimeout((function(){Ce&&pt(),n(26,h=void 0),j("change",J),j("select",e)}))}}(e)}function _t(e){Ct||n(7,tt=e)}function Ot(e){var t=e.item,r=e.i;if(!1!==(null==t?void 0:t.selectable))return J&&!q&&J[he]===t[he]?pt():void(function(e){return e.groupHeader&&e.selectable||e.selectable||!e.hasOwnProperty("selectable")}(t)&&(n(7,tt=r),$t(t)))}function Mt(e){if(0===l.filter((function(e){return!Object.hasOwn(e,"selectable")||!0===e.selectable})).length)return n(7,tt=0);e>0&&tt===l.length-1?n(7,tt=0):n(7,e<0&&0===tt?tt=l.length-1:tt+=e);var t=l[tt];t&&!1===t.selectable&&(1!==e&&-1!==e||Mt(e))}var At=Pt,Et=Pt;function Pt(e){return{update:function(t){t.scroll&&(St(),e.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Tt,Rt={strategy:"absolute",placement:"bottom-start",middleware:[(Tt=Ze,void 0===Tt&&(Tt=0),{name:"offset",options:Tt,fn:function(e){return ko(wo().mark((function t(){var n,r,o,i,a,s,c;return wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.x,i=e.y,a=e.placement,s=e.middlewareData,t.next=3,hT(e,Tt);case 3:if(c=t.sent,a!==(null==(n=s.offset)?void 0:n.placement)||null==(r=s.arrow)||!r.alignmentOffset){t.next=6;break}return t.abrupt("return",{});case 6:return t.abrupt("return",{x:o+c.x,y:i+c.y,data:Ro(Ro({},c),{},{placement:a})});case 7:case"end":return t.stop()}}),t)})))()}}),JT(),UT()],autoUpdate:!1},Nt=function(e){var t,n,r={autoUpdate:!0},o=e,i=function(t){return Ro(Ro(Ro({},r),e||{}),t||{})},a=function(e){t&&n&&(o=i(e),KT(t,n,o).then((function(e){var t;Object.assign(n.style,{position:e.strategy,left:"".concat(e.x,"px"),top:"".concat(e.y,"px")}),(null===(t=o)||void 0===t?void 0:t.onComputed)&&o.onComputed(e)})))},s=function(e){Qi(e.subscribe((function(e){void 0===t?(t=e,a()):(Object.assign(t,e),a())})))};return[function(e){if("subscribe"in e)return s(e),{};t=e,a()},function(e,r){var s;n=e,o=i(r),setTimeout((function(){return a(r)}),0),a(r);var c=function(){s&&(s(),s=void 0)},l=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o||{}).autoUpdate;c(),!1!==e&&ca().then((function(){return WT(t,n,(function(){return a(o)}),!0===e?{}:e)}))};return s=l(),{update:function(e){a(e),s=l(e)},destroy:function(){c()}}},a]}(Rt),It=jo(Nt,3),Dt=It[0],zt=It[1],qt=It[2],Bt=!0;return e.$$set=function(e){"justValue"in e&&n(52,C=e.justValue),"filter"in e&&n(53,_=e.filter),"getItems"in e&&n(54,M=e.getItems),"id"in e&&n(55,E=e.id),"name"in e&&n(8,T=e.name),"container"in e&&n(0,N=e.container),"input"in e&&n(1,D=e.input),"multiple"in e&&n(9,q=e.multiple),"multiFullItemClearable"in e&&n(10,L=e.multiFullItemClearable),"disabled"in e&&n(11,V=e.disabled),"focused"in e&&n(2,W=e.focused),"value"in e&&n(3,J=e.value),"filterText"in e&&n(4,G=e.filterText),"placeholder"in e&&n(56,Y=e.placeholder),"placeholderAlwaysShow"in e&&n(57,Z=e.placeholderAlwaysShow),"items"in e&&n(51,te=e.items),"label"in e&&n(12,re=e.label),"itemFilter"in e&&n(58,ie=e.itemFilter),"groupBy"in e&&n(59,se=e.groupBy),"groupFilter"in e&&n(60,le=e.groupFilter),"groupHeaderSelectable"in e&&n(61,fe=e.groupHeaderSelectable),"itemId"in e&&n(13,he=e.itemId),"loadOptions"in e&&n(62,pe=e.loadOptions),"containerStyles"in e&&n(14,ge=e.containerStyles),"hasError"in e&&n(15,be=e.hasError),"filterSelectedItems"in e&&n(63,xe=e.filterSelectedItems),"required"in e&&n(16,je=e.required),"closeListOnChange"in e&&n(64,Ce=e.closeListOnChange),"clearFilterTextOnBlur"in e&&n(65,_e=e.clearFilterTextOnBlur),"createGroupHeaderItem"in e&&n(66,Me=e.createGroupHeaderItem),"searchable"in e&&n(17,Ee=e.searchable),"inputStyles"in e&&n(18,Te=e.inputStyles),"clearable"in e&&n(68,Ne=e.clearable),"loading"in e&&n(5,De=e.loading),"listOpen"in e&&n(6,qe=e.listOpen),"debounce"in e&&n(69,Le=e.debounce),"debounceWait"in e&&n(70,Ve=e.debounceWait),"hideEmptyState"in e&&n(19,We=e.hideEmptyState),"inputAttributes"in e&&n(71,Je=e.inputAttributes),"listAutoWidth"in e&&n(72,Ge=e.listAutoWidth),"showChevron"in e&&n(20,Ye=e.showChevron),"listOffset"in e&&n(73,Ze=e.listOffset),"hoverItemIndex"in e&&n(7,tt=e.hoverItemIndex),"floatingConfig"in e&&n(74,rt=e.floatingConfig),"class"in e&&n(21,it=e.class),"ariaValues"in e&&n(75,gt=e.ariaValues),"ariaListOpen"in e&&n(76,bt=e.ariaListOpen),"ariaFocused"in e&&n(77,xt=e.ariaFocused),"$$scope"in e&&n(82,x=e.$$scope)},e.$$.update=function(){var t,d,y,b,w;(8&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&J&&function(){if("string"==typeof J){var e=(te||[]).find((function(e){return e[he]===J}));n(3,J=e||zo(zo({},he,J),"label",J))}else q&&Array.isArray(J)&&J.length>0&&n(3,J=J.map((function(e){return"string"==typeof e?{value:e,label:e}:e})))}(),131072&e.$$.dirty[0]|512&e.$$.dirty[2]&&(!Je&&Ee||(n(27,g=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},Je)),E&&n(27,g.id=E,g),Ee||n(27,g.readonly=!0,g))),512&e.$$.dirty[0]&&q&&J&&(Array.isArray(J)?n(3,J=Bo(J)):n(3,J=[J])),512&e.$$.dirty[0]|262144&e.$$.dirty[2]&&m&&!q&&J&&n(3,J=null),520&e.$$.dirty[0]&&q&&J&&J.length>1&&ct(),8&e.$$.dirty[0]&&J&&(q?JSON.stringify(J)!==JSON.stringify(v)&&ct()&&j("input",J):v&&JSON.stringify(J[he])===JSON.stringify(v[he])||j("input",J)),520&e.$$.dirty[0]|65536&e.$$.dirty[2]&&!J&&q&&v&&j("input",J),6&e.$$.dirty[0]&&!W&&D&&pt(),16&e.$$.dirty[0]|131072&e.$$.dirty[2]&&G!==p&&(pe||0!==G.length)&&(pe?Le(ko(wo().mark((function e(){var t;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(5,De=!0),e.next=3,M({dispatch:j,loadOptions:pe,convertStringItemsToObjects:nN,filterText:G});case 3:(t=e.sent)?(n(5,De=t.loading),n(6,qe=qe?t.listOpen:G.length>0),n(2,W=qe&&t.focused),n(51,te=se?at(t.filteredItems):t.filteredItems)):(n(5,De=!1),n(2,W=!0),n(6,qe=!0));case 5:case"end":return e.stop()}}),e)}))),Ve):(n(6,qe=!0),q&&n(26,h=void 0))),12824&e.$$.dirty[0]|407896064&e.$$.dirty[1]|3&e.$$.dirty[2]&&n(24,l=_({loadOptions:pe,filterText:G,items:te,multiple:q,value:J,itemId:he,groupBy:se,label:re,filterSelectedItems:xe,itemFilter:ie,convertStringItemsToObjects:nN,filterGroupedItems:at})),16777800&e.$$.dirty[0]&&!q&&qe&&J&&l&&(t=l.findIndex((function(e){return e[he]===J[he]})),st(t,!0)),576&e.$$.dirty[0]&&qe&&q&&n(7,tt=0),16&e.$$.dirty[0]&&G&&n(7,tt=0),128&e.$$.dirty[0]&&function(e){j("hoverItem",e)}(tt),520&e.$$.dirty[0]&&n(25,r=q?J&&J.length>0:J),33554448&e.$$.dirty[0]&&n(35,o=r&&G.length>0),33556512&e.$$.dirty[0]|64&e.$$.dirty[2]&&n(34,i=r&&Ne&&!V&&!De),520&e.$$.dirty[0]|100663296&e.$$.dirty[1])&&n(33,a=Z&&q||q&&0===(null===(d=J)||void 0===d?void 0:d.length)?Y:J?"":Y);(520&e.$$.dirty[0]&&n(32,s=J?(y=void 0,y=q&&J.length>0?J.map((function(e){return e[re]})).join(", "):J[re],gt(y)):""),16777412&e.$$.dirty[0]&&n(31,c=function(){if(!l||0===l.length)return"";var e=l[tt];if(qe&&e){var t=l?l.length:0;return bt(e[re],t)}return xt()}()),1048576&e.$$.dirty[1]&&function(e){e&&0!==e.length&&!e.some((function(e){return"object"!==Ho(e)}))&&J&&(q?!J.some((function(e){return!e||!e[he]})):J[he])&&(Array.isArray(J)?n(3,J=J.map((function(e){return lt(e)||e}))):n(3,J=lt()||J))}(te),8712&e.$$.dirty[0]&&n(52,C=q?J?J.map((function(e){return e[he]})):null:J?J[he]:J),520&e.$$.dirty[0]|65536&e.$$.dirty[2]&&(q||!v||J||j("input",J)),16777800&e.$$.dirty[0]&&qe&&l&&!q&&!J&&st(),16777216&e.$$.dirty[0]&&function(e){qe&&j("filter",e)}(l),1&e.$$.dirty[0]|4096&e.$$.dirty[2])&&(N&&void 0===(null===(b=rt)||void 0===b?void 0:b.autoUpdate)&&n(81,Rt.autoUpdate=!0,Rt));1&e.$$.dirty[0]|528384&e.$$.dirty[2]&&N&&rt&&qt(Object.assign(Rt,rt)),8388608&e.$$.dirty[0]&&n(30,u=!!jt),8388672&e.$$.dirty[0]&&function(e,t){if(!e||!t)return n(28,Bt=!0);setTimeout((function(){n(28,Bt=!1)}),0)}(jt,qe),8388673&e.$$.dirty[0]&&qe&&N&&jt&&(w=N.getBoundingClientRect().width,n(23,jt.style.width=Ge?w+"px":"auto",jt)),128&e.$$.dirty[0]&&n(29,f=tt),70&e.$$.dirty[0]&&D&&qe&&!W&&dt()},[N,D,W,J,G,De,qe,tt,T,q,L,V,re,he,ge,be,je,Ee,Te,We,Ye,it,function(){j("clear",J),n(3,J=void 0),pt(),dt()},jt,l,r,h,g,Bt,f,u,c,s,a,i,o,ut,function(e){if(W)switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),pt();break;case"Enter":if(e.preventDefault(),qe){if(0===l.length)break;var t=l[tt];if(J&&!q&&J[he]===t[he]){pt();break}$t(l[tt])}break;case"ArrowDown":e.preventDefault(),qe?Mt(1):(n(6,qe=!0),n(26,h=void 0));break;case"ArrowUp":e.preventDefault(),qe?Mt(-1):(n(6,qe=!0),n(26,h=void 0));break;case"Tab":if(qe&&W){if(0===l.length||J&&J[he]===l[tt][he])return pt();e.preventDefault(),$t(l[tt]),pt()}break;case"Backspace":if(!q||G.length>0)return;if(q&&J&&J.length>0){if(ut(void 0!==h?h:J.length-1),0===h||void 0===h)break;n(26,h=J.length>h?h-1:void 0)}break;case"ArrowLeft":if(!J||!q||G.length>0)return;void 0===h?n(26,h=J.length-1):J.length>h&&0!==h&&n(26,h-=1);break;case"ArrowRight":if(!J||!q||G.length>0||void 0===h)return;h===J.length-1?n(26,h=void 0):h0?n(6,qe=!0):void n(6,qe=!qe)},St,function(e){var t;qe||W||!N||N.contains(e.target)||null!==(t=jt)&&void 0!==t&&t.contains(e.target)||ht()},_t,Ot,function(e,t,n){if(!q)return t&&t[n]===e[n]},At,Et,Dt,zt,k,te,C,_,M,E,Y,Z,ie,se,le,fe,pe,xe,Ce,_e,Me,function(){return l},Ne,Le,Ve,Je,Ge,Ze,rt,gt,bt,xt,v,p,m,Rt,x,w,function(t){ea.call(this,e,t)},function(t){ea.call(this,e,t)},function(t){ea.call(this,e,t)},function(t){ea.call(this,e,t)},function(e){return _t(e)},function(e){return _t(e)},function(e,t){return Ot({item:e,i:t})},function(e){na[e?"unshift":"push"]((function(){n(23,jt=e)}))},function(e){return ut(e)},function(e){return L?ut(e):{}},function(e){na[e?"unshift":"push"]((function(){n(1,D=e)}))},function(){G=this.value,n(4,G)},function(e){na[e?"unshift":"push"]((function(){n(0,N=e)}))}]}var oN=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,rN,tN,Xo,{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,clearFilterTextOnBlur:65,createGroupHeaderItem:66,getFilteredItems:67,searchable:17,inputStyles:18,clearable:68,loading:5,listOpen:6,debounce:69,debounceWait:70,hideEmptyState:19,inputAttributes:71,listAutoWidth:72,showChevron:20,listOffset:73,hoverItemIndex:7,floatingConfig:74,class:21,handleClear:22,ariaValues:75,ariaListOpen:76,ariaFocused:77},sR,[-1,-1,-1,-1,-1]),n}return Eo(t,Ia),Do(t,[{key:"getFilteredItems",get:function(){return this.$$.ctx[67]}},{key:"handleClear",get:function(){return this.$$.ctx[22]}}]),t}();function iN(e){mi(e,"svelte-ijtq0l","table.jse-transform-wizard.svelte-ijtq0l.svelte-ijtq0l{border-collapse:collapse;border-spacing:0;width:100%}table.jse-transform-wizard.svelte-ijtq0l input.svelte-ijtq0l{font-family:inherit;font-size:inherit}table.jse-transform-wizard.svelte-ijtq0l tr th.svelte-ijtq0l{font-weight:normal;text-align:left;width:60px}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l{width:100%;display:flex;flex-direction:row;margin-bottom:calc(0.5 * var(--jse-padding, 10px))}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select .multi-item{align-items:center}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select .value-container{gap:0 !important}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select.jse-filter-path{flex:4;margin-right:calc(0.5 * var(--jse-padding, 10px))}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select.jse-filter-relation{flex:1.5;margin-right:calc(0.5 * var(--jse-padding, 10px))}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select.jse-sort-path{flex:3;margin-right:calc(0.5 * var(--jse-padding, 10px))}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select.jse-sort-direction{flex:1}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select.jse-projection-paths{flex:1}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal.svelte-ijtq0l .svelte-select input{box-sizing:border-box}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal .jse-filter-value.svelte-ijtq0l{flex:4;padding:4px 8px;border:var(--jse-input-border, 1px solid #d8dbdf);border-radius:var(--jse-input-radius, 3px);outline:none;background:var(--jse-input-background, var(--jse-background-color, #fff));color:inherit}table.jse-transform-wizard.svelte-ijtq0l tr td .jse-horizontal .jse-filter-value.svelte-ijtq0l:focus{border:var(--jse-input-border-focus, 1px solid var(--jse-input-border-focus, var(--jse-theme-color, #3883fa)))}")}function aN(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M,A,E,P,T,R,N;function I(t){e[16](t)}var D={class:"jse-filter-path",showChevron:!0,items:e[7]};function z(t){e[17](t)}void 0!==e[0]&&(D.value=e[0]),s=new oN({props:D}),na.push((function(){return Ea(s,"value",I)}));var q={class:"jse-filter-relation",showChevron:!0,items:e[8]};function B(t){e[19](t)}void 0!==e[1]&&(q.value=e[1]),u=new oN({props:q}),na.push((function(){return Ea(u,"value",z)}));var L={class:"jse-sort-path",showChevron:!0,items:e[7]};function F(t){e[20](t)}void 0!==e[3]&&(L.value=e[3]),w=new oN({props:L}),na.push((function(){return Ea(w,"value",B)}));var V={class:"jse-sort-direction",showChevron:!0,items:e[9]};function H(t){e[21](t)}void 0!==e[4]&&(V.value=e[4]),j=new oN({props:V}),na.push((function(){return Ea(j,"value",F)}));var W={class:"jse-projection-paths",multiple:!0,showChevron:!0,items:e[6]};return void 0!==e[5]&&(W.value=e[5]),E=new oN({props:W}),na.push((function(){return Ea(E,"value",H)})),{c:function(){t=ji("table"),n=ji("tr"),(r=ji("th")).textContent="Filter",o=$i(),i=ji("td"),a=ji("div"),Pa(s.$$.fragment),l=$i(),Pa(u.$$.fragment),d=$i(),h=ji("input"),v=$i(),p=ji("tr"),(m=ji("th")).textContent="Sort",g=$i(),y=ji("td"),b=ji("div"),Pa(w.$$.fragment),k=$i(),Pa(j.$$.fragment),C=$i(),$=ji("tr"),(_=ji("th")).textContent="Pick",O=$i(),M=ji("td"),A=ji("div"),Pa(E.$$.fragment),Ei(r,"class","svelte-ijtq0l"),Ei(h,"class","jse-filter-value svelte-ijtq0l"),Ei(a,"class","jse-horizontal svelte-ijtq0l"),Ei(m,"class","svelte-ijtq0l"),Ei(b,"class","jse-horizontal svelte-ijtq0l"),Ei(_,"class","svelte-ijtq0l"),Ei(A,"class","jse-horizontal svelte-ijtq0l"),Ei(t,"class","jse-transform-wizard svelte-ijtq0l")},m:function(c,f){wi(c,t,f),pi(t,n),pi(n,r),pi(n,o),pi(n,i),pi(i,a),Ta(s,a,null),pi(a,l),Ta(u,a,null),pi(a,d),pi(a,h),Ii(h,e[2]),pi(t,v),pi(t,p),pi(p,m),pi(p,g),pi(p,y),pi(y,b),Ta(w,b,null),pi(b,k),Ta(j,b,null),pi(t,C),pi(t,$),pi($,_),pi($,O),pi($,M),pi(M,A),Ta(E,A,null),T=!0,R||(N=Oi(h,"input",e[18]),R=!0)},p:function(e,t){var n=jo(t,1)[0],r={};128&n&&(r.items=e[7]),!c&&1&n&&(c=!0,r.value=e[0],ua((function(){return c=!1}))),s.$set(r);var o={};!f&&2&n&&(f=!0,o.value=e[1],ua((function(){return f=!1}))),u.$set(o),4&n&&h.value!==e[2]&&Ii(h,e[2]);var i={};128&n&&(i.items=e[7]),!x&&8&n&&(x=!0,i.value=e[3],ua((function(){return x=!1}))),w.$set(i);var a={};!S&&16&n&&(S=!0,a.value=e[4],ua((function(){return S=!1}))),j.$set(a);var l={};64&n&&(l.items=e[6]),!P&&32&n&&(P=!0,l.value=e[5],ua((function(){return P=!1}))),E.$set(l)},i:function(e){T||(xa(s.$$.fragment,e),xa(u.$$.fragment,e),xa(w.$$.fragment,e),xa(j.$$.fragment,e),xa(E.$$.fragment,e),T=!0)},o:function(e){ka(s.$$.fragment,e),ka(u.$$.fragment,e),ka(w.$$.fragment,e),ka(j.$$.fragment,e),ka(E.$$.fragment,e),T=!1},d:function(e){e&&xi(t),Ra(s),Ra(u),Ra(w),Ra(j),Ra(E),R=!1,N()}}}function sN(e,t,n){var r,o,i,a,s,c,l,u,f,d,h,v=Da("jsoneditor:TransformWizard"),p=t.json,m=t.queryOptions,g=void 0===m?{}:m,y=t.onChange,b=["==","!=","<","<=",">",">="].map((function(e){return{value:e,label:e}})),w=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],x=null!==(r=g)&&void 0!==r&&null!==(r=r.filter)&&void 0!==r&&r.path?YO(g.filter.path):null,k=null!==(o=g)&&void 0!==o&&null!==(o=o.filter)&&void 0!==o&&o.relation?b.find((function(e){var t;return e.value===(null===(t=g.filter)||void 0===t?void 0:t.relation)})):null,j=(null===(i=g)||void 0===i||null===(i=i.filter)||void 0===i?void 0:i.value)||"",S=null!==(a=g)&&void 0!==a&&null!==(a=a.sort)&&void 0!==a&&a.path?YO(g.sort.path):null,C=null!==(s=g)&&void 0!==s&&null!==(s=s.sort)&&void 0!==s&&s.direction?w.find((function(e){var t;return e.value===(null===(t=g.sort)||void 0===t?void 0:t.direction)})):null;return e.$$set=function(e){"json"in e&&n(11,p=e.json),"queryOptions"in e&&n(10,g=e.queryOptions),"onChange"in e&&n(12,y=e.onChange)},e.$$.update=function(){var t,r,o,i,a,s,m,b,w,$,_,O,M;(2048&e.$$.dirty&&n(15,c=Array.isArray(p)),34816&e.$$.dirty&&n(14,l=c?N_(p):[]),34816&e.$$.dirty&&n(13,u=c?N_(p,!0):[]),16384&e.$$.dirty&&n(7,f=l.map(YO)),8192&e.$$.dirty&&n(6,d=u?u.map(YO):[]),1088&e.$$.dirty)&&n(5,h=null!==(t=g)&&void 0!==t&&null!==(t=t.projection)&&void 0!==t&&t.paths&&d?g.projection.paths.map((function(e){return d.find((function(t){return Ex(t.value,e)}))})).filter((function(e){return!!e})):null);1&e.$$.dirty&&(o=null===(r=x)||void 0===r?void 0:r.value,Ex(null===(i=g)||void 0===i||null===(i=i.filter)||void 0===i?void 0:i.path,o)||(v("changeFilterPath",o),n(10,g=Js(g,["filter","path"],o,!0)),y(g)));2&e.$$.dirty&&(s=null===(a=k)||void 0===a?void 0:a.value,Ex(null===(m=g)||void 0===m||null===(m=m.filter)||void 0===m?void 0:m.relation,s)||(v("changeFilterRelation",s),n(10,g=Js(g,["filter","relation"],s,!0)),y(g)));(4&e.$$.dirty&&(b=j,Ex(null===(w=g)||void 0===w||null===(w=w.filter)||void 0===w?void 0:w.value,b)||(v("changeFilterValue",b),n(10,g=Js(g,["filter","value"],b,!0)),y(g))),8&e.$$.dirty)&&function(e){var t;Ex(null===(t=g)||void 0===t||null===(t=t.sort)||void 0===t?void 0:t.path,e)||(v("changeSortPath",e),n(10,g=Js(g,["sort","path"],e,!0)),y(g))}(null===($=S)||void 0===$?void 0:$.value);16&e.$$.dirty&&(O=null===(_=C)||void 0===_?void 0:_.value,Ex(null===(M=g)||void 0===M||null===(M=M.sort)||void 0===M?void 0:M.direction,O)||(v("changeSortDirection",O),n(10,g=Js(g,["sort","direction"],O,!0)),y(g)));32&e.$$.dirty&&function(e){var t;Ex(null===(t=g)||void 0===t||null===(t=t.projection)||void 0===t?void 0:t.paths,e)||(v("changeProjectionPaths",e),n(10,g=Js(g,["projection","paths"],e,!0)),y(g))}(h?h.map((function(e){return e.value})):void 0)},[x,k,j,S,C,h,d,f,b,w,g,p,y,u,l,c,function(e){n(0,x=e)},function(e){n(1,k=e)},function(){j=this.value,n(2,j)},function(e){n(3,S=e)},function(e){n(4,C=e)},function(e){n(5,h=e),n(10,g),n(6,d),n(13,u),n(15,c),n(11,p)}]}var cN=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,sN,aN,Zo,{json:11,queryOptions:10,onChange:12},iN),n}return Eo(t,Ia),Do(t)}();function lN(e){mi(e,"svelte-1wg043c",'.jse-select-query-language.svelte-1wg043c.svelte-1wg043c{position:relative;width:32px}.jse-select-query-language.svelte-1wg043c .jse-select-query-language-container.svelte-1wg043c{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24))}.jse-select-query-language.svelte-1wg043c .jse-select-query-language-container .jse-query-language.svelte-1wg043c{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;text-align:left;padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px));white-space:nowrap;color:var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff));background:var(--jse-context-menu-background, #656565)}.jse-select-query-language.svelte-1wg043c .jse-select-query-language-container .jse-query-language.svelte-1wg043c:hover{background:var(--jse-context-menu-background-highlight, #7a7a7a)}')}function uN(e,t,n){var r=e.slice();return r[5]=t[n],r}function fN(e){var t,n;return t=new CM({props:{data:cM}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function dN(e){var t,n;return t=new CM({props:{data:sM}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function hN(e){var t,n,r,o,i,a,s,c,l,u,f=e[5].name+"",d=[dN,fN],h=[];function v(e,t){return e[5].id===e[0]?0:1}function p(){return e[4](e[5])}return n=v(e),r=h[n]=d[n](e),{c:function(){t=ji("button"),r.c(),o=$i(),i=Ci(f),a=$i(),Ei(t,"type","button"),Ei(t,"class","jse-query-language svelte-1wg043c"),Ei(t,"title",s="Select ".concat(e[5].name," as query language")),qi(t,"selected",e[5].id===e[0])},m:function(e,r){wi(e,t,r),h[n].m(t,null),pi(t,o),pi(t,i),pi(t,a),c=!0,l||(u=Oi(t,"click",p),l=!0)},p:function(a,l){var u=n;(n=v(e=a))!==u&&(ba(),ka(h[u],1,1,(function(){h[u]=null})),wa(),(r=h[n])||(r=h[n]=d[n](e)).c(),xa(r,1),r.m(t,o)),(!c||2&l)&&f!==(f=e[5].name+"")&&Ni(i,f),(!c||2&l&&s!==(s="Select ".concat(e[5].name," as query language")))&&Ei(t,"title",s),(!c||3&l)&&qi(t,"selected",e[5].id===e[0])},i:function(e){c||(xa(r),c=!0)},o:function(e){ka(r),c=!1},d:function(e){e&&xi(t),h[n].d(),l=!1,u()}}}function vN(e){for(var t,n,r,o=Ca(e[1]),i=[],a=0;a1&&yN(e);return a=new CM({props:{data:RP}}),{c:function(){t=ji("div"),(n=ji("div")).textContent="Transform",r=$i(),u&&u.c(),o=$i(),i=ji("button"),Pa(a.$$.fragment),Ei(n,"class","jse-title svelte-1n68mbh"),Ei(i,"type","button"),Ei(i,"class","jse-close svelte-1n68mbh"),Ei(t,"class","jse-header svelte-1n68mbh")},m:function(f,d){wi(f,t,d),pi(t,n),pi(t,r),u&&u.m(t,null),pi(t,o),pi(t,i),Ta(a,i,null),s=!0,c||(l=Oi(i,"click",e[7]),c=!0)},p:function(e,n){var r=jo(n,1)[0];e[0].length>1?u?(u.p(e,r),1&r&&xa(u,1)):((u=yN(e)).c(),xa(u,1),u.m(t,o)):u&&(ba(),ka(u,1,1,(function(){u=null})),wa())},i:function(e){s||(xa(u),xa(a.$$.fragment,e),s=!0)},o:function(e){ka(u),ka(a.$$.fragment,e),s=!1},d:function(e){e&&xi(t),u&&u.d(),Ra(a),c=!1,l()}}}function wN(e,t,n){var r,o,i=t.queryLanguages,a=t.queryLanguageId,s=t.onChangeQueryLanguage,c=Zi("simple-modal").close,l=Zi("absolute-popup"),u=l.openAbsolutePopup,f=l.closeAbsolutePopup;return e.$$set=function(e){"queryLanguages"in e&&n(0,i=e.queryLanguages),"queryLanguageId"in e&&n(4,a=e.queryLanguageId),"onChangeQueryLanguage"in e&&n(5,s=e.onChangeQueryLanguage)},[i,r,c,function(){var e={queryLanguages:i,queryLanguageId:a,onChangeQueryLanguage:function(e){f(o),s(e)}};o=u(mN,e,{offsetTop:-2,offsetLeft:0,anchor:r,closeOnOuterClick:!0})},a,s,function(e){na[e?"unshift":"push"]((function(){n(1,r=e)}))},function(){return c()}]}var xN=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,wN,bN,Zo,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},gN),n}return Eo(t,Ia),Do(t)}(),kN=Da("jsoneditor:AutoScrollHandler");var jN=function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t},SN=function(){var e,t,n,r,o,i,a,s,c,l,u,f,d;function h(t){return t.getBoundingClientRect().top-(e.getBoundingClientRect?e.getBoundingClientRect().top:0)+n}function v(t){e.scrollTo?e.scrollTo(e.scrollLeft,t):e.scrollTop=t}function p(e){l||(l=e),v(i(u=e-l,n,s,c)),d=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(c=1e3,o=v.offset||0,f=v.callback,i=v.easing||jN,a=v.a11y||!1,Ho(v.container)){case"object":e=v.container;break;case"string":e=document.querySelector(v.container);break;default:e=window.document.documentElement}switch(n=e.scrollTop,Ho(u)){case"number":t=void 0,a=!1,r=n+u;break;case"object":r=h(t=u);break;case"string":t=document.querySelector(u),r=h(t)}switch(s=r-n+o,Ho(v.duration)){case"number":c=v.duration;break;case"function":c=v.duration(s)}d?l=0:requestAnimationFrame(p)}},CN=1e3,$N=Da("jsoneditor:History");function _N(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxItems||CN,n=[],r=0;function o(){return r0}function a(){return{canUndo:o(),canRedo:i(),length:n.length}}function s(){e.onChange&&e.onChange(a())}return{add:function(e){$N("add",e),n=[e].concat(n.slice(r)).slice(0,t),r=0,s()},clear:function(){$N("clear"),n=[],r=0,s()},getState:a,undo:function(){if(o()){var e=n[r];return r+=1,$N("undo",e),s(),e}},redo:function(){if(i())return $N("redo",n[r-=1]),s(),n[r]}}}function ON(e,t){var n=Date.now(),r=e();return t(Date.now()-n),r}var MN=Da("validation");function AN(e,t,n,r){if(MN("validateJSON"),!t)return[];if(n!==r){var o=n.stringify(e);return t(void 0!==o?r.parse(o):void 0)}return t(e)}function EN(e,t,n,r){if(MN("validateText"),e.length>hs)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Za.info}]};if(0===e.length)return null;try{var o=ON((function(){return n.parse(e)}),(function(e){return MN("validate: parsed json in ".concat(e," ms"))}));if(!t)return null;var i=n===r?o:ON((function(){return r.parse(e)}),(function(e){return MN("validate: parsed json with the validationParser in ".concat(e," ms"))})),a=ON((function(){return t(i)}),(function(e){return MN("validate: validated json in ".concat(e," ms"))}));return Ax(a)?null:{validationErrors:a}}catch(t){var s=ON((function(){return function(e,t){if(e.length>vs)return!1;try{return t.parse(Wl(e)),!0}catch(e){return!1}}(e,n)}),(function(e){return MN("validate: checked whether repairable in ".concat(e," ms"))}));return{parseError:U_(e,t.message||t.toString()),isRepairable:s}}}var PN=Da("jsoneditor:FocusTracker");function TN(e){var t,n=e.onMount,r=e.onDestroy,o=e.getWindow,i=e.hasFocus,a=e.onFocus,s=e.onBlur,c=!1;function l(){var e=i();e&&(clearTimeout(t),c||(PN("focus"),a(),c=e))}function u(){c&&(clearTimeout(t),t=setTimeout((function(){i()||(PN("blur"),c=!1,s())})))}n((function(){PN("mount FocusTracker");var e=o();e&&(e.addEventListener("focusin",l,!0),e.addEventListener("focusout",u,!0))})),r((function(){PN("destroy FocusTracker");var e=o();e&&(e.removeEventListener("focusin",l,!0),e.removeEventListener("focusout",u,!0))}))}function RN(e){mi(e,"svelte-p1zf9f",'.jse-message.svelte-p1zf9f.svelte-p1zf9f{font-family:var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace);font-size:var(--jse-font-size-mono, 14px);padding:var(--jse-padding, 10px);display:flex;gap:var(--jse-padding, 10px);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-p1zf9f.svelte-p1zf9f{background:var(--message-success-background, #9ac45d);color:var(--jse-message-success-color, #fff)}.jse-message.svelte-p1zf9f .jse-text.svelte-p1zf9f{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-p1zf9f .jse-text.jse-clickable.svelte-p1zf9f{cursor:pointer}.jse-message.svelte-p1zf9f .jse-text.jse-clickable.svelte-p1zf9f:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-p1zf9f.svelte-p1zf9f{background:var(--jse-message-error-background, var(--jse-error-color, #ee5341));color:var(--jse-message-error-color, #fff)}.jse-message.jse-warning.svelte-p1zf9f.svelte-p1zf9f{background:var(--jse-message-warning-background, #ffde5c);color:var(--jse-message-warning-color, #4d4d4d)}.jse-message.jse-info.svelte-p1zf9f.svelte-p1zf9f{background:var(--jse-message-info-background, #4f91ff);color:var(--jse-message-info-color, #fff)}.jse-message.svelte-p1zf9f .jse-actions.svelte-p1zf9f{display:flex;gap:var(--jse-padding, 10px)}.jse-message.svelte-p1zf9f .jse-actions button.jse-action.svelte-p1zf9f{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;background:var(--jse-message-action-background, rgba(255, 255, 255, 0.2));color:inherit;padding:calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px)}.jse-message.svelte-p1zf9f .jse-actions button.jse-action.svelte-p1zf9f:hover{background:var(--jse-message-action-background-highlight, rgba(255, 255, 255, 0.3))}')}function NN(e,t,n){var r=e.slice();return r[9]=t[n],r}function IN(e){var t,n;return t=new CM({props:{data:e[1]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};2&n&&(r.data=e[1]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function DN(e){var t,n;return t=new CM({props:{data:e[9].icon}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};8&n&&(r.data=e[9].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function zN(e){var t,n,r,o,i,a,s,c,l,u=e[9].text+"",f=e[9].icon&&DN(e);function d(){return e[7](e[9])}function h(){return e[8](e[9])}return{c:function(){t=ji("button"),f&&f.c(),n=$i(),r=Ci(u),o=$i(),Ei(t,"type","button"),Ei(t,"class","jse-button jse-action jse-primary svelte-p1zf9f"),Ei(t,"title",i=e[9].title),t.disabled=a=e[9].disabled},m:function(e,i){wi(e,t,i),f&&f.m(t,null),pi(t,n),pi(t,r),pi(t,o),s=!0,c||(l=[Oi(t,"click",d),Oi(t,"mousedown",h)],c=!0)},p:function(o,c){(e=o)[9].icon?f?(f.p(e,c),8&c&&xa(f,1)):((f=DN(e)).c(),xa(f,1),f.m(t,n)):f&&(ba(),ka(f,1,1,(function(){f=null})),wa()),(!s||8&c)&&u!==(u=e[9].text+"")&&Ni(r,u),(!s||8&c&&i!==(i=e[9].title))&&Ei(t,"title",i),(!s||8&c&&a!==(a=e[9].disabled))&&(t.disabled=a)},i:function(e){s||(xa(f),s=!0)},o:function(e){ka(f),s=!1},d:function(e){e&&xi(t),f&&f.d(),c=!1,Qo(l)}}}function qN(e){for(var t,n,r,o,i,a,s,c,l,u,f,d=e[1]&&IN(e),h=Ca(e[3]),v=[],p=0;pus&&GN(e);return{c:function(){t=ji("table"),n=ji("tbody");for(var e=0;eus?l?l.p(e,t):((l=GN(e)).c(),l.m(n,null)):l&&(l.d(1),l=null)},i:function(e){if(!o){for(var t=0;t1&&JN(e);function y(){return e[6](e[7])}return{c:function(){t=ji("tr"),n=ji("td"),Pa(r.$$.fragment),o=$i(),i=ji("td"),a=Ci(p),s=$i(),c=ji("td"),l=Ci(m),u=$i(),f=ji("td"),g&&g.c(),Ei(n,"class","jse-validation-error-icon svelte-1ifg4t0"),Ei(i,"class","jse-validation-error-path svelte-1ifg4t0"),Ei(c,"class","jse-validation-error-message svelte-1ifg4t0"),Ei(f,"class","jse-validation-error-action svelte-1ifg4t0"),Ei(t,"class","jse-validation-error svelte-1ifg4t0")},m:function(e,p){wi(e,t,p),pi(t,n),Ta(r,n,null),pi(t,o),pi(t,i),pi(i,a),pi(t,s),pi(t,c),pi(c,l),pi(t,u),pi(t,f),g&&g.m(f,null),d=!0,h||(v=Oi(t,"click",y),h=!0)},p:function(t,n){e=t,(!d||1&n)&&p!==(p=GO(e[7].path)+"")&&Ni(a,p),(!d||1&n)&&m!==(m=e[7].message+"")&&Ni(l,m),0===e[9]&&e[0].length>1?g?(g.p(e,n),1&n&&xa(g,1)):((g=JN(e)).c(),xa(g,1),g.m(f,null)):g&&(ba(),ka(g,1,1,(function(){g=null})),wa())},i:function(e){d||(xa(r.$$.fragment,e),xa(g),d=!0)},o:function(e){ka(r.$$.fragment,e),ka(g),d=!1},d:function(e){e&&xi(t),Ra(r),g&&g.d(),h=!1,v()}}}function GN(e){var t,n,r,o,i,a,s,c,l,u,f,d=e[3]-us+"";return{c:function(){t=ji("tr"),n=ji("td"),r=$i(),o=ji("td"),i=$i(),a=ji("td"),s=Ci("(and "),c=Ci(d),l=Ci(" more errors)"),u=$i(),f=ji("td"),Ei(n,"class","svelte-1ifg4t0"),Ei(o,"class","svelte-1ifg4t0"),Ei(a,"class","svelte-1ifg4t0"),Ei(f,"class","svelte-1ifg4t0"),Ei(t,"class","jse-validation-error svelte-1ifg4t0")},m:function(e,d){wi(e,t,d),pi(t,n),pi(t,r),pi(t,o),pi(t,i),pi(t,a),pi(a,s),pi(a,c),pi(a,l),pi(t,u),pi(t,f)},p:function(e,t){8&t&&d!==(d=e[3]-us+"")&&Ni(c,d)},d:function(e){e&&xi(t)}}}function QN(e){var t,n,r=!Ax(e[0]),o=r&&HN(e);return{c:function(){o&&o.c(),t=_i()},m:function(e,r){o&&o.m(e,r),wi(e,t,r),n=!0},p:function(e,n){var i=jo(n,1)[0];1&i&&(r=!Ax(e[0])),r?o?(o.p(e,i),1&i&&xa(o,1)):((o=HN(e)).c(),xa(o,1),o.m(t.parentNode,t)):o&&(ba(),ka(o,1,1,(function(){o=null})),wa())},i:function(e){n||(xa(o),n=!0)},o:function(e){ka(o),n=!1},d:function(e){e&&xi(t),o&&o.d(e)}}}function YN(e,t,n){var r,o=t.validationErrors,i=t.selectError,a=!0;return e.$$set=function(e){"validationErrors"in e&&n(0,o=e.validationErrors),"selectError"in e&&n(1,i=e.selectError)},e.$$.update=function(){1&e.$$.dirty&&n(3,r=o.length)},[o,i,a,r,function(){n(2,a=!1)},function(){n(2,a=!0)},function(e){setTimeout((function(){return i(e)}))}]}var XN=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,YN,QN,Zo,{validationErrors:0,selectError:1},FN),n}return Eo(t,Ia),Do(t)}(),ZN="undefined"!=typeof navigator&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function eI(e){mi(e,"svelte-1n68mbh",".jse-header.svelte-1n68mbh.svelte-1n68mbh{display:flex;background:var(--jse-theme-color, #3883fa);color:var(--jse-menu-color, var(--jse-text-color-inverse, #fff))}.jse-header.svelte-1n68mbh .jse-title.svelte-1n68mbh{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-1n68mbh button.svelte-1n68mbh{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-1n68mbh button.svelte-1n68mbh:hover{background:rgba(255, 255, 255, 0.1)}")}function tI(e){var t,n,r,o,i,a,s,c,l;return a=new CM({props:{data:RP}}),{c:function(){t=ji("div"),n=ji("div"),r=Ci(e[0]),o=$i(),i=ji("button"),Pa(a.$$.fragment),Ei(n,"class","jse-title svelte-1n68mbh"),Ei(i,"type","button"),Ei(i,"class","jse-close svelte-1n68mbh"),Ei(t,"class","jse-header svelte-1n68mbh")},m:function(u,f){wi(u,t,f),pi(t,n),pi(n,r),pi(t,o),pi(t,i),Ta(a,i,null),s=!0,c||(l=Oi(i,"click",e[3]),c=!0)},p:function(e,t){var n=jo(t,1)[0];(!s||1&n)&&Ni(r,e[0])},i:function(e){s||(xa(a.$$.fragment,e),s=!0)},o:function(e){ka(a.$$.fragment,e),s=!1},d:function(e){e&&xi(t),Ra(a),c=!1,l()}}}function nI(e,t,n){var r=t.title,o=void 0===r?"Modal":r,i=t.onClose,a=void 0===i?void 0:i,s=Zi("simple-modal").close;return e.$$set=function(e){"title"in e&&n(0,o=e.title),"onClose"in e&&n(1,a=e.onClose)},[o,a,s,function(){a?a():s()}]}var rI=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,nI,tI,Zo,{title:0,onClose:1},eI),n}return Eo(t,Ia),Do(t)}();function oI(e){mi(e,"svelte-18bor9q",'.jse-modal.svelte-18bor9q.svelte-18bor9q{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);line-height:normal;background:var(--jse-modal-background, #f5f5f5);color:var(--jse-text-color, #4d4d4d)}.jse-modal.svelte-18bor9q .svelte-select{--border:var(--jse-svelte-select-border, 1px solid #d8dbdf);--item-is-active-bg:var(--jse-item-is-active-bg, #3883fa);--border-radius:var(--jse-svelte-select-border-radius, 3px);--background:var(--jse-svelte-select-background, #fff);--padding:var(--jse-svelte-select-padding, 0 10px);--multi-select-padding:var(--jse-svelte-select-multi-select-padding, 0 10px);--font-size:var(--jse-svelte-select-font-size, var(--jse-font-size, 16px));--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px}.jse-modal.svelte-18bor9q .jse-modal-contents.svelte-18bor9q{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-18bor9q .jse-modal-contents .jse-actions.svelte-18bor9q{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding, 10px)}.jse-modal.svelte-18bor9q .jse-modal-contents .jse-actions button.jse-primary.svelte-18bor9q{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;background:var(--jse-button-primary-background, var(--jse-theme-color, #3883fa));color:var(--jse-button-primary-color, #fff);padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px));border-radius:3px}.jse-modal.svelte-18bor9q .jse-modal-contents .jse-actions button.jse-primary.svelte-18bor9q:hover{background:var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff))}.jse-modal.svelte-18bor9q .jse-modal-contents .jse-actions button.jse-primary.svelte-18bor9q:disabled{background:var(--jse-button-primary-background-disabled, #9d9d9d)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-overlay-background, rgba(0, 0, 0, 0.3))}.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:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-copy-paste.svelte-18bor9q .jse-shortcuts.svelte-18bor9q{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding, 10px)) 0}.jse-modal.jse-copy-paste.svelte-18bor9q .jse-shortcuts .jse-shortcut .jse-key.svelte-18bor9q{font-size:200%;color:var(--jse-theme-color, #3883fa)}')}function iI(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S;return n=new rI({props:{title:"Copying and pasting"}}),{c:function(){t=ji("div"),Pa(n.$$.fragment),r=$i(),o=ji("div"),(i=ji("div")).textContent="These actions are unavailable via the menu. Please use:",a=$i(),s=ji("div"),c=ji("div"),(l=ji("div")).textContent="".concat(e[1],"+C"),u=Ci("\n for copy"),f=$i(),d=ji("div"),(h=ji("div")).textContent="".concat(e[1],"+X"),v=Ci("\n for cut"),p=$i(),m=ji("div"),(g=ji("div")).textContent="".concat(e[1],"+V"),y=Ci("\n for paste"),b=$i(),w=ji("div"),(x=ji("button")).textContent="Close",Ei(l,"class","jse-key svelte-18bor9q"),Ei(c,"class","jse-shortcut"),Ei(h,"class","jse-key svelte-18bor9q"),Ei(d,"class","jse-shortcut"),Ei(g,"class","jse-key svelte-18bor9q"),Ei(m,"class","jse-shortcut"),Ei(s,"class","jse-shortcuts svelte-18bor9q"),Ei(x,"type","button"),Ei(x,"class","jse-primary svelte-18bor9q"),Ei(w,"class","jse-actions svelte-18bor9q"),Ei(o,"class","jse-modal-contents svelte-18bor9q"),Ei(t,"class","jse-modal jse-copy-paste svelte-18bor9q")},m:function(C,$){wi(C,t,$),Ta(n,t,null),pi(t,r),pi(t,o),pi(o,i),pi(o,a),pi(o,s),pi(s,c),pi(c,l),pi(c,u),pi(s,f),pi(s,d),pi(d,h),pi(d,v),pi(s,p),pi(s,m),pi(m,g),pi(m,y),pi(o,b),pi(o,w),pi(w,x),k=!0,j||(S=Oi(x,"click",e[2]),j=!0)},p:Wo,i:function(e){k||(xa(n.$$.fragment,e),k=!0)},o:function(e){ka(n.$$.fragment,e),k=!1},d:function(e){e&&xi(t),Ra(n),j=!1,S()}}}function aI(e){var t=Zi("simple-modal").close;return[t,ZN?"⌘":"Ctrl",function(){return t()}]}var sI=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,aI,iI,Zo,{},oI),n}return Eo(t,Ia),Do(t)}();function cI(e){return!!e&&("space"===e.type||!0===e.space)}function lI(e){return!!e&&("separator"===e.type||!0===e.separator)}function uI(e){return!!e&&("label"===e.type&&"string"==typeof e.text)}function fI(e){return!!e&&"function"==typeof e.onClick}function dI(e){return!!e&&("dropdown-button"===e.type&&fI(e.main)&&Array.isArray(e.items))}function hI(e){return!!e&&("row"===e.type&&Array.isArray(e.items))}function vI(e){return!!e&&("column"===e.type&&Array.isArray(e.items))}function pI(e){return Ql(e)&&Ql(e.parseError)}function mI(e){return Ql(e)&&Array.isArray(e.validationErrors)}function gI(e){return Ql(e)&&Array.isArray(e.path)&&"string"==typeof e.message&&"severity"in e}function yI(e){return Ql(e)&&gI(e)&&"boolean"==typeof e.isChildError}function bI(e){return Ql(e)&&"component"in e&&Ql(e.props)}function wI(e){return Ql(e)&&"function"==typeof e.action&&Ql(e.props)}function xI(e){mi(e,"svelte-7deygj",'.jse-menu.svelte-7deygj.svelte-7deygj{background:var(--jse-theme-color, #3883fa);font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size-main-menu, 14px);color:var(--jse-menu-color, var(--jse-text-color-inverse, #fff));display:flex;flex-wrap:wrap;align-items:stretch;position:relative}.jse-menu.svelte-7deygj .jse-button.svelte-7deygj{font-family:inherit;font-size:inherit;line-height:1.5em;border:none;background:transparent;color:inherit;cursor:pointer;width:var(--jse-menu-button-size, 32px);height:var(--jse-menu-button-size, 32px);padding:calc(0.5 * var(--jse-padding, 10px));margin:0;border-radius:0;display:inline-flex;align-items:center;text-align:center;justify-content:center}.jse-menu.svelte-7deygj .jse-button.svelte-7deygj:hover,.jse-menu.svelte-7deygj .jse-button.svelte-7deygj:focus{background:var(--jse-theme-color-highlight, #5f9dff)}.jse-menu.svelte-7deygj .jse-button.svelte-7deygj:disabled{color:var(--jse-menu-color, var(--jse-text-color-inverse, #fff));opacity:0.5;background:transparent}.jse-menu.svelte-7deygj .jse-button.jse-group-button.svelte-7deygj{width:auto;height:calc(var(--jse-menu-button-size, 32px) - var(--jse-padding, 10px));margin:calc(0.5 * var(--jse-padding, 10px)) 0;padding:0 calc(0.5 * var(--jse-padding, 10px)) 1px;border:1px solid var(--jse-menu-color, var(--jse-text-color-inverse, #fff))}.jse-menu.svelte-7deygj .jse-button.jse-group-button.svelte-7deygj:not(.jse-last){border-right:none}.jse-menu.svelte-7deygj .jse-button.jse-group-button.jse-first.svelte-7deygj{margin-left:calc(0.5 * var(--jse-padding, 10px))}.jse-menu.svelte-7deygj .jse-button.jse-group-button.jse-last.svelte-7deygj{margin-right:calc(0.5 * var(--jse-padding, 10px))}.jse-menu.svelte-7deygj .jse-button.jse-group-button.svelte-7deygj:hover,.jse-menu.svelte-7deygj .jse-button.jse-group-button.svelte-7deygj:focus{background:var(--jse-theme-color-highlight, #5f9dff)}.jse-menu.svelte-7deygj .jse-button.jse-group-button.jse-selected.svelte-7deygj{background:var(--jse-menu-color, var(--jse-text-color-inverse, #fff));color:var(--jse-theme-color, #3883fa)}.jse-menu.svelte-7deygj .jse-space.svelte-7deygj{flex:1}.jse-menu.svelte-7deygj .jse-separator.svelte-7deygj{background:var(--jse-menu-color, var(--jse-text-color-inverse, #fff));opacity:0.3;width:1px;margin:3px}')}var kI=function(e){return{}},jI=function(e){return{}};function SI(e,t,n){var r=e.slice();return r[3]=t[n],r}var CI=function(e){return{}},$I=function(e){return{}};function _I(e){var t,n=NI(e[3])+"";return{c:function(){t=Ci(n)},m:function(e,n){wi(e,t,n)},p:function(e,r){1&r&&n!==(n=NI(e[3])+"")&&Ni(t,n)},i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function OI(e){var t,n,r,o,i,a,s,c,l=e[3].icon&&EI(e),u=e[3].text&&PI(e);return{c:function(){t=ji("button"),l&&l.c(),n=$i(),u&&u.c(),Ei(t,"type","button"),Ei(t,"class",r="jse-button "+e[3].className+" svelte-7deygj"),Ei(t,"title",o=e[3].title),t.disabled=i=e[3].disabled||!1},m:function(r,o){wi(r,t,o),l&&l.m(t,null),pi(t,n),u&&u.m(t,null),a=!0,s||(c=Oi(t,"click",(function(){Yo(e[3].onClick)&&e[3].onClick.apply(this,arguments)})),s=!0)},p:function(s,c){(e=s)[3].icon?l?(l.p(e,c),1&c&&xa(l,1)):((l=EI(e)).c(),xa(l,1),l.m(t,n)):l&&(ba(),ka(l,1,1,(function(){l=null})),wa()),e[3].text?u?u.p(e,c):((u=PI(e)).c(),u.m(t,null)):u&&(u.d(1),u=null),(!a||1&c&&r!==(r="jse-button "+e[3].className+" svelte-7deygj"))&&Ei(t,"class",r),(!a||1&c&&o!==(o=e[3].title))&&Ei(t,"title",o),(!a||1&c&&i!==(i=e[3].disabled||!1))&&(t.disabled=i)},i:function(e){a||(xa(l),a=!0)},o:function(e){ka(l),a=!1},d:function(e){e&&xi(t),l&&l.d(),u&&u.d(),s=!1,c()}}}function MI(e){var t;return{c:function(){Ei(t=ji("div"),"class","jse-space svelte-7deygj")},m:function(e,n){wi(e,t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function AI(e){var t;return{c:function(){Ei(t=ji("div"),"class","jse-separator svelte-7deygj")},m:function(e,n){wi(e,t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function EI(e){var t,n;return t=new CM({props:{data:e[3].icon}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[3].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function PI(e){var t,n=e[3].text+"";return{c:function(){t=Ci(n)},m:function(e,n){wi(e,t,n)},p:function(e,r){1&r&&n!==(n=e[3].text+"")&&Ni(t,n)},d:function(e){e&&xi(t)}}}function TI(e){var t,n,r,o,i,a,s,c=[AI,MI,OI,_I],l=[];function u(e,o){return 1&o&&(t=null),1&o&&(n=null),1&o&&(r=null),null==t&&(t=!!lI(e[3])),t?0:(null==n&&(n=!!cI(e[3])),n?1:(null==r&&(r=!!fI(e[3])),r?2:3))}return o=u(e,-1),i=l[o]=c[o](e),{c:function(){i.c(),a=_i()},m:function(e,t){l[o].m(e,t),wi(e,a,t),s=!0},p:function(e,t){var n=o;(o=u(e,t))===n?l[o].p(e,t):(ba(),ka(l[n],1,1,(function(){l[n]=null})),wa(),(i=l[o])?i.p(e,t):(i=l[o]=c[o](e)).c(),xa(i,1),i.m(a.parentNode,a))},i:function(e){s||(xa(i),s=!0)},o:function(e){ka(i),s=!1},d:function(e){e&&xi(a),l[o].d(e)}}}function RI(e){for(var t,n,r,o,i=e[2].left,a=ei(i,e,e[1],$I),s=Ca(e[0]),c=[],l=0;l=n.end&&o.end<=s.start;return l&&c.push(o),s.start>=(l?o.end:n.end)&&c.push(s),c}(o,i))},[f,h,i,o,s,a,c,l,u,d,v,r,function(e){return h(f,e)}]}var oD=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,rD,tD,Zo,{visibleSections:6,sectionIndex:7,total:8,path:0,selection:9,onExpandSection:1,context:10},XI),n}return Eo(t,Ia),Do(t)}();function iD(e){mi(e,"svelte-6k6355",".jse-context-menu-pointer.svelte-6k6355{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size, calc(1em + 4px)));right:calc(-0.5 * var(--jse-context-menu-pointer-size, calc(1em + 4px)));width:var(--jse-context-menu-pointer-size, calc(1em + 4px));height:var(--jse-context-menu-pointer-size, calc(1em + 4px));padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background, var(--jse-context-menu-background, #656565));color:var(--jse-context-menu-pointer-color, var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff)));border:none;box-shadow:var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24))}.jse-context-menu-pointer.svelte-6k6355:hover{background:var(--jse-context-menu-pointer-background-highlight, var(--jse-context-menu-background-highlight, #7a7a7a))}")}function aD(e){var t,n,r,o,i;return n=new CM({props:{data:kP}}),{c:function(){t=ji("button"),Pa(n.$$.fragment),Ei(t,"type","button"),Ei(t,"class","jse-context-menu-pointer svelte-6k6355"),Ei(t,"title",ks),qi(t,"jse-selected",e[0])},m:function(a,s){wi(a,t,s),Ta(n,t,null),r=!0,o||(i=Oi(t,"click",e[1]),o=!0)},p:function(e,n){var o=jo(n,1)[0];(!r||1&o)&&qi(t,"jse-selected",e[0])},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ka(n.$$.fragment,e),r=!1},d:function(e){e&&xi(t),Ra(n),o=!1,i()}}}function sD(e,t,n){var r=t.selected,o=t.onContextMenu;return e.$$set=function(e){"selected"in e&&n(0,r=e.selected),"onContextMenu"in e&&n(2,o=e.onContextMenu)},[r,function(e){for(var t=e.target;t&&"BUTTON"!==t.nodeName;)t=t.parentNode;t&&o({anchor:t,left:0,top:0,width:Ms,height:Os,offsetTop:2,offsetLeft:0,showTip:!0})},o]}var cD=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,sD,aD,Zo,{selected:0,onContextMenu:2},iD),n}return Eo(t,Ia),Do(t)}();function lD(e){mi(e,"svelte-10xe8tv",'.jse-key.svelte-10xe8tv{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color, #1a1a1a);cursor:var(--jse-contents-cursor, pointer);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-10xe8tv:hover{background:var(--jse-hover-background-color, rgba(0, 0, 0, 0.06))}.jse-key.svelte-10xe8tv:hover{background:var(--jse-hover-background-color, rgba(0, 0, 0, 0.06))}.jse-key.jse-empty.svelte-10xe8tv{min-width:3em;outline:1px dotted var(--jse-tag-background, rgba(0, 0, 0, 0.2));-moz-outline-radius:2px}.jse-key.jse-empty.svelte-10xe8tv::after{pointer-events:none;color:var(--jse-tag-background, rgba(0, 0, 0, 0.2));content:"key"}')}function uD(e){var t,n,r,o,i,a,s,c=[hD,dD],l=[];function u(e,t){return e[1]?0:1}return n=u(e),r=l[n]=c[n](e),{c:function(){t=ji("div"),r.c(),Ei(t,"role","none"),Ei(t,"data-type","selectable-key"),Ei(t,"class",o=si(e[6](e[0]))+" svelte-10xe8tv")},m:function(r,o){wi(r,t,o),l[n].m(t,null),i=!0,a||(s=Oi(t,"dblclick",e[5]),a=!0)},p:function(e,a){var s=n;(n=u(e))===s?l[n].p(e,a):(ba(),ka(l[s],1,1,(function(){l[s]=null})),wa(),(r=l[n])?r.p(e,a):(r=l[n]=c[n](e)).c(),xa(r,1),r.m(t,null)),(!i||1&a&&o!==(o=si(e[6](e[0]))+" svelte-10xe8tv"))&&Ei(t,"class",o)},i:function(e){i||(xa(r),i=!0)},o:function(e){ka(r),i=!1},d:function(e){e&&xi(t),l[n].d(),a=!1,s()}}}function fD(e){var t,n;return t=new nE({props:{value:e[2].normalization.escapeValue(e[0]),shortText:!0,onChange:e[7],onCancel:e[8],onFind:e[2].onFind}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};5&n&&(r.value=e[2].normalization.escapeValue(e[0])),4&n&&(r.onFind=e[2].onFind),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function dD(e){var t,n=bO(e[2].normalization.escapeValue(e[0]))+"";return{c:function(){t=Ci(n)},m:function(e,n){wi(e,t,n)},p:function(e,r){5&r&&n!==(n=bO(e[2].normalization.escapeValue(e[0]))+"")&&Ni(t,n)},i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function hD(e){var t,n;return t=new IE({props:{text:e[2].normalization.escapeValue(e[0]),searchResultItems:e[1]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};5&n&&(r.text=e[2].normalization.escapeValue(e[0])),2&n&&(r.searchResultItems=e[1]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function vD(e){var t,n;return t=new cD({props:{selected:!0,onContextMenu:e[2].onContextMenu}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};4&n&&(r.onContextMenu=e[2].onContextMenu),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function pD(e){var t,n,r,o,i,a=[fD,uD],s=[];function c(e,t){return!e[2].readOnly&&e[4]?0:1}t=c(e),n=s[t]=a[t](e);var l=!e[2].readOnly&&e[3]&&!e[4]&&vD(e);return{c:function(){n.c(),r=$i(),l&&l.c(),o=_i()},m:function(e,n){s[t].m(e,n),wi(e,r,n),l&&l.m(e,n),wi(e,o,n),i=!0},p:function(e,i){var u=jo(i,1)[0],f=t;(t=c(e))===f?s[t].p(e,u):(ba(),ka(s[f],1,1,(function(){s[f]=null})),wa(),(n=s[t])?n.p(e,u):(n=s[t]=a[t](e)).c(),xa(n,1),n.m(r.parentNode,r)),e[2].readOnly||!e[3]||e[4]?l&&(ba(),ka(l,1,1,(function(){l=null})),wa()):l?(l.p(e,u),28&u&&xa(l,1)):((l=vD(e)).c(),xa(l,1),l.m(o.parentNode,o))},i:function(e){i||(xa(n),xa(l),i=!0)},o:function(e){ka(n),ka(l),i=!1},d:function(e){e&&(xi(r),xi(o)),s[t].d(e),l&&l.d(e)}}}function mD(e,t,n){var r,o,i=t.path,a=t.key,s=t.selection,c=t.searchResultItems,l=t.onUpdateKey,u=t.context;return e.$$set=function(e){"path"in e&&n(9,i=e.path),"key"in e&&n(0,a=e.key),"selection"in e&&n(10,s=e.selection),"searchResultItems"in e&&n(1,c=e.searchResultItems),"onUpdateKey"in e&&n(11,l=e.onUpdateKey),"context"in e&&n(2,u=e.context)},e.$$.update=function(){1536&e.$$.dirty&&n(3,r=!!s&&(mA(s)&&Ex(s.path,i))),1032&e.$$.dirty&&n(4,o=r&&LA(s))},[a,c,u,r,o,function(e){o||u.readOnly||(e.preventDefault(),u.onSelect(NA(i,!0)))},function(e){return YA("jse-key",{"jse-empty":""===e})},function(e,t){var n=l(a,u.normalization.unescapeValue(e)),r=Zw(i).concat(n);u.onSelect(t===ns.nextInside?IA(r,!1):NA(r,!1)),t!==ns.self&&u.focus()},function(){u.onSelect(NA(i,!1)),u.focus()},i,s,l]}var gD=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,mD,pD,Zo,{path:9,key:0,selection:10,searchResultItems:1,onUpdateKey:11,context:2},lD),n}return Eo(t,Ia),Do(t)}();function yD(e,t,n){var r=e.slice();return r[8]=t[n],r}function bD(e){var t,n,r=e[8].component,o=xD(e);return{c:function(){o.c(),t=_i()},m:function(e,r){o.m(e,r),wi(e,t,r),n=!0},p:function(e,n){1&n&&Zo(r,r=e[8].component)?(ba(),ka(o,1,1,Wo),wa(),(o=xD(e)).c(),xa(o,1),o.m(t.parentNode,t)):o.p(e,n)},i:function(e){n||(xa(o),n=!0)},o:function(e){ka(o),n=!1},d:function(e){e&&xi(t),o.d(e)}}}function wD(e){var t,n=e[8].action,r=kD(e);return{c:function(){r.c(),t=_i()},m:function(e,n){r.m(e,n),wi(e,t,n)},p:function(e,o){1&o&&Zo(n,n=e[8].action)?(r.d(1),(r=kD(e)).c(),r.m(t.parentNode,t)):r.p(e,o)},i:Wo,o:Wo,d:function(e){e&&xi(t),r.d(e)}}}function xD(e){var t,n,r,o=[e[8].props],i=e[8].component;function a(e,t){for(var n={},r=0;rl+s()/2;)l+=s(),c-=1;var u=n[c].path,f=c-a;return c!==a&&void 0!==n[c]?{beforePath:u,offset:f}:void 0}({json:t,selection:i,deltaY:r,items:o}):function(e){var t,n=e.json,r=e.items,o=e.selection,i=e.deltaY,a=CA(n,o),s=r.findIndex((function(e){return Ex(e.path,a)})),c=0,l=s,u=function(){var e;return null===(e=r[l+1])||void 0===e?void 0:e.height};for(;void 0!==u()&&Math.abs(i)>c+u()/2;)c+=u(),l+=1;var f=Zw(a),d=Us(n,f),h=Array.isArray(d),v=h?l:l+1,p=null===(t=r[v])||void 0===t?void 0:t.path,m=l-s;return p?{beforePath:p,offset:m}:{append:!0,offset:m}}({json:t,selection:i,deltaY:r,items:o});if(!a||0===a.offset)return{operations:void 0,updatedSelection:null,offset:0};var s=function(e,t,n){if(!t)return[];var r="beforePath"in n?n.beforePath:void 0,o="append"in n?n.append:void 0,i=Zw(GA(t)),a=Us(e,i);if(!(o||r&&TA(r,i)&&r.length>i.length))return[];var s=SA(e,t),c=CA(e,t),l=gb(s),u=gb(c),f=r?r[i.length]:void 0;if(!Ns(a)){if(Rs(a)){var d=Jl(l),h=Jl(u),v=void 0!==f?Jl(f):a.length;return ZC(h-d+1,vm?[].concat(Bo(p.slice(m,g+1)),Bo(p.slice(y,p.length))).map((function(e){return dE(i,e)})):[].concat(Bo(p.slice(y,m)),Bo(p.slice(g+1,p.length))).map((function(e){return dE(i,e)})):[]}(t,i,a),c=Us(t,Zw(SA(t,i)));if(Array.isArray(c)){var l=function(e){var t,n,r=e.items,o=e.json,i=e.selection,a=e.offset,s=SA(o,i),c=CA(o,i),l=r.findIndex((function(e){return Ex(e.path,s)})),u=r.findIndex((function(e){return Ex(e.path,c)})),f=null===(t=r[l+a])||void 0===t?void 0:t.path,d=null===(n=r[u+a])||void 0===n?void 0:n.path;return qA(f,d)}({items:o,json:t,selection:i,offset:a.offset});return{operations:s,updatedSelection:l,offset:a.offset}}return{operations:s,updatedSelection:null,offset:a.offset}}function AD(e,t){return function(e,t){if(e){for(var n={},r=0,o=Object.keys(e);r0?n:void 0}}(e,(function(e){return rc(e,t)}))}function ED(e){mi(e,"svelte-g0bfge",'button.jse-validation-error.svelte-g0bfge{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color, #fdc539)}')}function PD(e){var t,n,r,o,i,a;return n=new CM({props:{data:zP}}),{c:function(){t=ji("button"),Pa(n.$$.fragment),Ei(t,"type","button"),Ei(t,"class","jse-validation-error svelte-g0bfge")},m:function(s,c){wi(s,t,c),Ta(n,t,null),o=!0,i||(a=[Oi(t,"click",(function(){Yo(e[0])&&e[0].apply(this,arguments)})),ci(r=JE.call(null,t,Ro({text:e[1]},e[2])))],i=!0)},p:function(t,n){var o=jo(n,1)[0];e=t,r&&Yo(r.update)&&2&o&&r.update.call(null,Ro({text:e[1]},e[2]))},i:function(e){o||(xa(n.$$.fragment,e),o=!0)},o:function(e){ka(n.$$.fragment,e),o=!1},d:function(e){e&&xi(t),Ra(n),i=!1,Qo(a)}}}function TD(e,t,n){var r,o=Zi("absolute-popup"),i=t.validationError,a=t.onExpand;return e.$$set=function(e){"validationError"in e&&n(3,i=e.validationError),"onExpand"in e&&n(0,a=e.onExpand)},e.$$.update=function(){8&e.$$.dirty&&n(1,r=yI(i)&&i.isChildError?"Contains invalid data":i.message)},[a,r,o,i]}var RD=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,TD,PD,Xo,{validationError:3,onExpand:0},ED),n}return Eo(t,Ia),Do(t)}();function ND(e){mi(e,"svelte-6mjnsm",'.jse-json-node.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{position:relative;color:var(--jse-text-color, #4d4d4d)}.jse-json-node.jse-root.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-6mjnsm>.jse-contents-outer.svelte-6mjnsm>.jse-contents.svelte-6mjnsm .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size, calc(1em + 4px)))}.jse-json-node.jse-root.svelte-6mjnsm>.jse-contents-outer.svelte-6mjnsm>.jse-contents.svelte-6mjnsm.svelte-6mjnsm{padding-left:0}.jse-json-node.svelte-6mjnsm .jse-props.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.svelte-6mjnsm .jse-items.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{position:relative}.jse-json-node.svelte-6mjnsm .jse-header-outer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.svelte-6mjnsm .jse-footer-outer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:flex;margin-left:calc(var(--level) * var(--jse-indent-size, calc(1em + 4px)))}.jse-json-node.svelte-6mjnsm .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{position:relative}.jse-json-node.svelte-6mjnsm .jse-header .jse-meta.svelte-6mjnsm>.jse-meta-inner.svelte-6mjnsm.svelte-6mjnsm{display:flex;justify-content:center}.jse-json-node.svelte-6mjnsm .jse-contents-outer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:flex;margin-left:calc(var(--level) * var(--jse-indent-size, calc(1em + 4px)))}.jse-json-node.svelte-6mjnsm .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.svelte-6mjnsm .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:flex;flex-direction:row;align-items:flex-start}.jse-json-node.svelte-6mjnsm .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{padding-left:var(--jse-indent-size, calc(1em + 4px))}.jse-json-node.svelte-6mjnsm .jse-footer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:inline-flex;padding-left:calc(var(--jse-indent-size, calc(1em + 4px)) + 5px)}.jse-json-node.svelte-6mjnsm .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.svelte-6mjnsm .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.svelte-6mjnsm .jse-footer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{background:var(--jse-contents-background-color, transparent)}.jse-json-node.svelte-6mjnsm .jse-insert-selection-area.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding, 10px));flex:1}.jse-json-node.svelte-6mjnsm .jse-insert-selection-area.jse-inside.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:inline-flex;align-items:center}.jse-json-node.svelte-6mjnsm .jse-insert-selection-area.jse-after.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:flex;align-items:flex-end}.jse-json-node.svelte-6mjnsm .jse-context-menu-pointer-anchor.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{position:relative}.jse-json-node.svelte-6mjnsm .jse-insert-area.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{display:flex;position:relative;z-index:1;margin-left:calc(var(--level) * var(--jse-indent-size, calc(1em + 4px)));max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding, 10px));outline:1px solid}.jse-json-node.svelte-6mjnsm .jse-insert-area.svelte-6mjnsm .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background, #b2b2b2)}.jse-json-node.svelte-6mjnsm .jse-insert-area.jse-hovered.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{outline-color:var(--jse-context-menu-pointer-hover-background, #b2b2b2)}.jse-json-node.svelte-6mjnsm:hover>.jse-contents-outer .jse-insert-selection-area.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm:not(.jse-selected),.jse-json-node.svelte-6mjnsm .jse-header-outer.svelte-6mjnsm:hover>.jse-insert-selection-area.svelte-6mjnsm.svelte-6mjnsm:not(.jse-selected),.jse-json-node.svelte-6mjnsm .jse-footer-outer:hover .jse-insert-selection-area.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm>.jse-header.svelte-6mjnsm>.jse-meta.svelte-6mjnsm,.jse-json-node.jse-hovered.svelte-6mjnsm .jse-props .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-hovered.svelte-6mjnsm .jse-items .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-hovered.svelte-6mjnsm .jse-props .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-hovered.svelte-6mjnsm .jse-items .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-hovered.svelte-6mjnsm .jse-footer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{background:var(--jse-hover-background-color, rgba(0, 0, 0, 0.06))}.jse-json-node.jse-selected.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm>.jse-header.svelte-6mjnsm>.jse-meta.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-props .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-items .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-props .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-items .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-footer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected.svelte-6mjnsm .jse-value{background:var(--jse-selection-background-color, #d3d3d3);cursor:var(--jse-contents-selected-cursor, grab)}.jse-json-node.jse-selected.svelte-6mjnsm .jse-expand.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{background:var(--jse-selection-background-color, #d3d3d3)}.jse-json-node.jse-selected-key.svelte-6mjnsm>.jse-contents-outer.svelte-6mjnsm>.jse-contents.svelte-6mjnsm>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm>.jse-header.svelte-6mjnsm>.jse-identifier>.jse-key{background:var(--jse-selection-background-color, #d3d3d3);cursor:var(--jse-contents-selected-cursor, grab)}.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-contents-outer.svelte-6mjnsm>.jse-contents.svelte-6mjnsm>.jse-value{background:var(--jse-selection-background-color, #d3d3d3);cursor:var(--jse-contents-selected-cursor, grab)}.jse-json-node.svelte-6mjnsm .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-6mjnsm .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-collapsed-items{background-color:var(--jse-selection-background-color, #d3d3d3);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color, #c2c2c2)}.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-meta.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm>.jse-header.svelte-6mjnsm>.jse-meta.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-footer-outer.svelte-6mjnsm>.jse-footer.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-footer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-expand.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-contents.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-header.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-footer.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-expand.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{background:var(--jse-selection-background-color, #d3d3d3)}.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-meta.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-meta.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm>.jse-header.svelte-6mjnsm>.jse-meta.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-header-outer.svelte-6mjnsm>.jse-header.svelte-6mjnsm>.jse-meta.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-footer-outer.svelte-6mjnsm>.jse-footer.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm>.jse-footer-outer.svelte-6mjnsm>.jse-footer.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-contents.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-contents.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-header.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-header.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-footer.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-footer.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-expand.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-props .jse-expand.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-contents.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-contents.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-header.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-header.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-footer.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-footer.svelte-6mjnsm .jse-value,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-expand.svelte-6mjnsm .jse-key,.jse-json-node.jse-selected-value.svelte-6mjnsm .jse-items .jse-expand.svelte-6mjnsm .jse-value{background:var(--jse-selection-background-color, #d3d3d3);cursor:var(--jse-contents-selected-cursor, grab)}.jse-json-node.jse-readonly.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-6mjnsm .jse-insert-area.jse-selected.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{outline-color:var(--jse-context-menu-pointer-background, var(--jse-context-menu-background, #656565))}.jse-json-node.svelte-6mjnsm .jse-insert-area.jse-selected.svelte-6mjnsm .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background, var(--jse-context-menu-background, #656565))}.jse-json-node.svelte-6mjnsm .jse-insert-area.jse-selected.svelte-6mjnsm .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight, var(--jse-context-menu-background-highlight, #7a7a7a))}.jse-main:not(.jse-focus) .jse-json-node.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{--jse-selection-background-color:var(--jse-selection-background-inactive-color, #e8e8e8);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background, #b2b2b2)}.jse-expand.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{width:var(--jse-indent-size, calc(1em + 4px));padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color, rgba(0, 0, 0, 0.38));font-size:var(--jse-font-size-mono, 14px);height:var(--jse-line-height, calc(1em + 4px))}.jse-expand.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm:hover{opacity:0.8}.jse-meta.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-separator.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-index.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm,.jse-bracket.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{vertical-align:top;color:var(--jse-delimiter-color, rgba(0, 0, 0, 0.38))}.jse-index.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{padding:0 calc(0.5 * var(--jse-padding, 10px))}.jse-bracket.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{padding:0 2px}.jse-bracket.jse-expanded.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{padding-right:var(--jse-padding, 10px)}.jse-tag.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{border:none;font-size:80%;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);color:var(--jse-tag-color, var(--jse-text-color-inverse, #fff));background:var(--jse-tag-background, rgba(0, 0, 0, 0.2));border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{opacity:0.7;cursor:inherit}.jse-identifier.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm.svelte-6mjnsm{vertical-align:top;position:relative}')}var ID=function(e){return{}},DD=function(e){return{}};function zD(e,t,n){var r=e.slice();return r[52]=t[n],r}var qD=function(e){return{}},BD=function(e){return{}};function LD(e,t,n){var r=e.slice();return r[46]=t[n],r[48]=n,r}function FD(e,t,n){var r=e.slice();return r[49]=t[n],r}var VD=function(e){return{}},HD=function(e){return{}};function WD(e){var t,n,r,o,i,a,s,c,l,u=!e[8].readOnly&&e[16]&&e[7]&&(gA(e[7])||yA(e[7]))&&!LA(e[7])&&Ex(GA(e[7]),e[1]),f=e[33].identifier,d=ei(f,e,e[34],DD),h=!e[17]&&KD();i=new _D({props:{path:e[1],value:e[0],enforceString:e[13]||!1,selection:e[16]?e[7]:null,searchResultItems:OE(e[6],e[9]),context:e[8]}});var v=u&&GD(e),p=e[15]&&QD(e),m=!e[17]&&YD(e);return{c:function(){t=ji("div"),n=ji("div"),d&&d.c(),r=$i(),h&&h.c(),o=$i(),Pa(i.$$.fragment),a=$i(),v&&v.c(),s=$i(),p&&p.c(),c=$i(),m&&m.c(),Ei(n,"class","jse-contents svelte-6mjnsm"),Ei(t,"class","jse-contents-outer svelte-6mjnsm")},m:function(e,u){wi(e,t,u),pi(t,n),d&&d.m(n,null),pi(n,r),h&&h.m(n,null),pi(n,o),Ta(i,n,null),pi(n,a),v&&v.m(n,null),pi(t,s),p&&p.m(t,null),pi(t,c),m&&m.m(t,null),l=!0},p:function(e,r){d&&d.p&&(!l||8&r[1])&&ri(d,f,e,e[34],l?ni(f,e[34],r,ID):oi(e[34]),DD),e[17]?h&&(h.d(1),h=null):h||((h=KD()).c(),h.m(n,o));var a={};2&r[0]&&(a.path=e[1]),1&r[0]&&(a.value=e[0]),8192&r[0]&&(a.enforceString=e[13]||!1),65664&r[0]&&(a.selection=e[16]?e[7]:null),576&r[0]&&(a.searchResultItems=OE(e[6],e[9])),256&r[0]&&(a.context=e[8]),i.$set(a),65922&r[0]&&(u=!e[8].readOnly&&e[16]&&e[7]&&(gA(e[7])||yA(e[7]))&&!LA(e[7])&&Ex(GA(e[7]),e[1])),u?v?(v.p(e,r),65922&r[0]&&xa(v,1)):((v=GD(e)).c(),xa(v,1),v.m(n,null)):v&&(ba(),ka(v,1,1,(function(){v=null})),wa()),e[15]?p?(p.p(e,r),32768&r[0]&&xa(p,1)):((p=QD(e)).c(),xa(p,1),p.m(t,c)):p&&(ba(),ka(p,1,1,(function(){p=null})),wa()),e[17]?m&&(m.d(1),m=null):m?m.p(e,r):((m=YD(e)).c(),m.m(t,null))},i:function(e){l||(xa(d,e),xa(i.$$.fragment,e),xa(v),xa(p),l=!0)},o:function(e){ka(d,e),ka(i.$$.fragment,e),ka(v),ka(p),l=!1},d:function(e){e&&xi(t),d&&d.d(e),h&&h.d(),Ra(i),v&&v.d(),p&&p.d(),m&&m.d()}}}function UD(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b=!e[8].readOnly&&e[16]&&e[7]&&(gA(e[7])||yA(e[7]))&&!LA(e[7])&&Ex(GA(e[7]),e[1]),w=[ZD,XD],x=[];function k(e,t){return e[12]?0:1}o=k(e),i=x[o]=w[o](e);var j=e[33].identifier,S=ei(j,e,e[34],BD),C=!e[17]&&ez();function $(e,t){return e[12]?nz:tz}var _=$(e),O=_(e),M=b&&rz(e),A=e[15]&&(!e[12]||!e[15].isChildError)&&oz(e);function E(e,t){return e[12]?az:e[17]?void 0:iz}var P=E(e),T=P&&P(e),R=e[12]&&sz(e);return{c:function(){t=ji("div"),n=ji("div"),r=ji("button"),i.c(),a=$i(),S&&S.c(),s=$i(),C&&C.c(),c=$i(),l=ji("div"),u=ji("div"),O.c(),f=$i(),M&&M.c(),d=$i(),A&&A.c(),h=$i(),T&&T.c(),v=$i(),R&&R.c(),p=_i(),Ei(r,"type","button"),Ei(r,"class","jse-expand svelte-6mjnsm"),Ei(r,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),Ei(u,"class","jse-meta-inner svelte-6mjnsm"),Ei(l,"class","jse-meta svelte-6mjnsm"),Ei(l,"data-type","selectable-value"),Ei(n,"class","jse-header svelte-6mjnsm"),Ei(t,"class","jse-header-outer svelte-6mjnsm")},m:function(i,b){wi(i,t,b),pi(t,n),pi(n,r),x[o].m(r,null),pi(n,a),S&&S.m(n,null),pi(n,s),C&&C.m(n,null),pi(n,c),pi(n,l),pi(l,u),O.m(u,null),pi(n,f),M&&M.m(n,null),pi(t,d),A&&A.m(t,null),pi(t,h),T&&T.m(t,null),wi(i,v,b),R&&R.m(i,b),wi(i,p,b),m=!0,g||(y=Oi(r,"click",e[20]),g=!0)},p:function(e,a){var s=o;(o=k(e))!==s&&(ba(),ka(x[s],1,1,(function(){x[s]=null})),wa(),(i=x[o])||(i=x[o]=w[o](e)).c(),xa(i,1),i.m(r,null)),S&&S.p&&(!m||8&a[1])&&ri(S,j,e,e[34],m?ni(j,e[34],a,qD):oi(e[34]),BD),e[17]?C&&(C.d(1),C=null):C||((C=ez()).c(),C.m(n,c)),_===(_=$(e))&&O?O.p(e,a):(O.d(1),(O=_(e))&&(O.c(),O.m(u,null))),65922&a[0]&&(b=!e[8].readOnly&&e[16]&&e[7]&&(gA(e[7])||yA(e[7]))&&!LA(e[7])&&Ex(GA(e[7]),e[1])),b?M?(M.p(e,a),65922&a[0]&&xa(M,1)):((M=rz(e)).c(),xa(M,1),M.m(n,null)):M&&(ba(),ka(M,1,1,(function(){M=null})),wa()),!e[15]||e[12]&&e[15].isChildError?A&&(ba(),ka(A,1,1,(function(){A=null})),wa()):A?(A.p(e,a),36864&a[0]&&xa(A,1)):((A=oz(e)).c(),xa(A,1),A.m(t,h)),P===(P=E(e))&&T?T.p(e,a):(T&&T.d(1),(T=P&&P(e))&&(T.c(),T.m(t,null))),e[12]?R?(R.p(e,a),4096&a[0]&&xa(R,1)):((R=sz(e)).c(),xa(R,1),R.m(p.parentNode,p)):R&&(ba(),ka(R,1,1,(function(){R=null})),wa())},i:function(e){m||(xa(i),xa(S,e),xa(M),xa(A),xa(R),m=!0)},o:function(e){ka(i),ka(S,e),ka(M),ka(A),ka(R),m=!1},d:function(e){e&&(xi(t),xi(v),xi(p)),x[o].d(),S&&S.d(e),C&&C.d(),O.d(),M&&M.d(),A&&A.d(),T&&T.d(),R&&R.d(e),g=!1,y()}}}function JD(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b=!e[8].readOnly&&e[16]&&e[7]&&(gA(e[7])||yA(e[7]))&&!LA(e[7])&&Ex(GA(e[7]),e[1]),w=[hz,dz],x=[];function k(e,t){return e[12]?0:1}o=k(e),i=x[o]=w[o](e);var j=e[33].identifier,S=ei(j,e,e[34],HD),C=!e[17]&&vz();function $(e,t){return e[12]?mz:pz}var _=$(e),O=_(e),M=b&&gz(e),A=e[15]&&(!e[12]||!e[15].isChildError)&&yz(e);function E(e,t){return e[12]?wz:bz}var P=E(e),T=P(e),R=e[12]&&xz(e);return{c:function(){t=ji("div"),n=ji("div"),r=ji("button"),i.c(),a=$i(),S&&S.c(),s=$i(),C&&C.c(),c=$i(),l=ji("div"),u=ji("div"),O.c(),f=$i(),M&&M.c(),d=$i(),A&&A.c(),h=$i(),T.c(),v=$i(),R&&R.c(),p=_i(),Ei(r,"type","button"),Ei(r,"class","jse-expand svelte-6mjnsm"),Ei(r,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),Ei(u,"class","jse-meta-inner svelte-6mjnsm"),Ei(u,"data-type","selectable-value"),Ei(l,"class","jse-meta svelte-6mjnsm"),Ei(n,"class","jse-header svelte-6mjnsm"),Ei(t,"class","jse-header-outer svelte-6mjnsm")},m:function(i,b){wi(i,t,b),pi(t,n),pi(n,r),x[o].m(r,null),pi(n,a),S&&S.m(n,null),pi(n,s),C&&C.m(n,null),pi(n,c),pi(n,l),pi(l,u),O.m(u,null),pi(n,f),M&&M.m(n,null),pi(t,d),A&&A.m(t,null),pi(t,h),T.m(t,null),wi(i,v,b),R&&R.m(i,b),wi(i,p,b),m=!0,g||(y=Oi(r,"click",e[20]),g=!0)},p:function(e,a){var s=o;(o=k(e))!==s&&(ba(),ka(x[s],1,1,(function(){x[s]=null})),wa(),(i=x[o])||(i=x[o]=w[o](e)).c(),xa(i,1),i.m(r,null)),S&&S.p&&(!m||8&a[1])&&ri(S,j,e,e[34],m?ni(j,e[34],a,VD):oi(e[34]),HD),e[17]?C&&(C.d(1),C=null):C||((C=vz()).c(),C.m(n,c)),_===(_=$(e))&&O?O.p(e,a):(O.d(1),(O=_(e))&&(O.c(),O.m(u,null))),65922&a[0]&&(b=!e[8].readOnly&&e[16]&&e[7]&&(gA(e[7])||yA(e[7]))&&!LA(e[7])&&Ex(GA(e[7]),e[1])),b?M?(M.p(e,a),65922&a[0]&&xa(M,1)):((M=gz(e)).c(),xa(M,1),M.m(n,null)):M&&(ba(),ka(M,1,1,(function(){M=null})),wa()),!e[15]||e[12]&&e[15].isChildError?A&&(ba(),ka(A,1,1,(function(){A=null})),wa()):A?(A.p(e,a),36864&a[0]&&xa(A,1)):((A=yz(e)).c(),xa(A,1),A.m(t,h)),P===(P=E(e))&&T?T.p(e,a):(T.d(1),(T=P(e))&&(T.c(),T.m(t,null))),e[12]?R?(R.p(e,a),4096&a[0]&&xa(R,1)):((R=xz(e)).c(),xa(R,1),R.m(p.parentNode,p)):R&&(ba(),ka(R,1,1,(function(){R=null})),wa())},i:function(e){m||(xa(i),xa(S,e),xa(M),xa(A),xa(R),m=!0)},o:function(e){ka(i),ka(S,e),ka(M),ka(A),ka(R),m=!1},d:function(e){e&&(xi(t),xi(v),xi(p)),x[o].d(),S&&S.d(e),C&&C.d(),O.d(),M&&M.d(),A&&A.d(),T.d(),R&&R.d(e),g=!1,y()}}}function KD(e){var t;return{c:function(){(t=ji("div")).textContent=":",Ei(t,"class","jse-separator svelte-6mjnsm")},m:function(e,n){wi(e,t,n)},d:function(e){e&&xi(t)}}}function GD(e){var t,n,r;return n=new cD({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=ji("div"),Pa(n.$$.fragment),Ei(t,"class","jse-context-menu-pointer-anchor svelte-6mjnsm")},m:function(e,o){wi(e,t,o),Ta(n,t,null),r=!0},p:function(e,t){var r={};256&t[0]&&(r.onContextMenu=e[8].onContextMenu),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ka(n.$$.fragment,e),r=!1},d:function(e){e&&xi(t),Ra(n)}}}function QD(e){var t,n;return t=new RD({props:{validationError:e[15],onExpand:e[21]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.validationError=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function YD(e){var t,n,r;return{c:function(){Ei(t=ji("div"),"role","none"),Ei(t,"class","jse-insert-selection-area jse-after svelte-6mjnsm"),Ei(t,"data-type","insert-selection-area-after")},m:function(o,i){wi(o,t,i),n||(r=Oi(t,"click",e[29]),n=!0)},p:Wo,d:function(e){e&&xi(t),n=!1,r()}}}function XD(e){var t,n;return t=new CM({props:{data:eP}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function ZD(e){var t,n;return t=new CM({props:{data:kP}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function ez(e){var t;return{c:function(){(t=ji("div")).textContent=":",Ei(t,"class","jse-separator svelte-6mjnsm")},m:function(e,n){wi(e,t,n)},d:function(e){e&&xi(t)}}}function tz(e){var t,n,r,o,i,a,s,c,l,u,f=Object.keys(e[0]).length+"",d=1===Object.keys(e[0]).length?"prop":"props";return{c:function(){(t=ji("div")).textContent="{",n=$i(),r=ji("button"),o=Ci(f),i=$i(),a=Ci(d),s=$i(),(c=ji("div")).textContent="}",Ei(t,"class","jse-bracket svelte-6mjnsm"),Ei(r,"type","button"),Ei(r,"class","jse-tag svelte-6mjnsm"),Ei(c,"class","jse-bracket svelte-6mjnsm")},m:function(f,d){wi(f,t,d),wi(f,n,d),wi(f,r,d),pi(r,o),pi(r,i),pi(r,a),wi(f,s,d),wi(f,c,d),l||(u=Oi(r,"click",e[21]),l=!0)},p:function(e,t){1&t[0]&&f!==(f=Object.keys(e[0]).length+"")&&Ni(o,f),1&t[0]&&d!==(d=1===Object.keys(e[0]).length?"prop":"props")&&Ni(a,d)},d:function(e){e&&(xi(t),xi(n),xi(r),xi(s),xi(c)),l=!1,u()}}}function nz(e){var t;return{c:function(){(t=ji("div")).textContent="{",Ei(t,"class","jse-bracket jse-expanded svelte-6mjnsm")},m:function(e,n){wi(e,t,n)},p:Wo,d:function(e){e&&xi(t)}}}function rz(e){var t,n,r;return n=new cD({props:{selected:!0,onContextMenu:e[8].onContextMenu}}),{c:function(){t=ji("div"),Pa(n.$$.fragment),Ei(t,"class","jse-context-menu-pointer-anchor svelte-6mjnsm")},m:function(e,o){wi(e,t,o),Ta(n,t,null),r=!0},p:function(e,t){var r={};256&t[0]&&(r.onContextMenu=e[8].onContextMenu),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ka(n.$$.fragment,e),r=!1},d:function(e){e&&xi(t),Ra(n)}}}function oz(e){var t,n;return t=new RD({props:{validationError:e[15],onExpand:e[21]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.validationError=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function iz(e){var t,n,r;return{c:function(){Ei(t=ji("div"),"role","none"),Ei(t,"class","jse-insert-selection-area jse-after svelte-6mjnsm"),Ei(t,"data-type","insert-selection-area-after")},m:function(o,i){wi(o,t,i),n||(r=Oi(t,"click",e[29]),n=!0)},p:Wo,d:function(e){e&&xi(t),n=!1,r()}}}function az(e){var t,n,r;return{c:function(){Ei(t=ji("div"),"role","none"),Ei(t,"class","jse-insert-selection-area jse-inside svelte-6mjnsm"),Ei(t,"data-type","insert-selection-area-inside")},m:function(o,i){wi(o,t,i),n||(r=Oi(t,"click",e[28]),n=!0)},p:Wo,d:function(e){e&&xi(t),n=!1,r()}}}function sz(e){for(var t,n,r,o,i,a,s,c=!e[8].readOnly&&(e[10]===js||e[16]&&pA(e[7])),l=c&&cz(e),u=Ca(e[18](e[1],e[0],e[2],e[3],e[4],e[5],e[6],e[7],e[11])),f=[],d=0;d}',a=$i(),v&&v.c(),Ei(t,"class","jse-props svelte-6mjnsm"),Ei(i,"data-type","selectable-value"),Ei(i,"class","jse-footer svelte-6mjnsm"),Ei(o,"class","jse-footer-outer svelte-6mjnsm")},m:function(e,c){wi(e,t,c),l&&l.m(t,null),pi(t,n);for(var u=0;u]',a=$i(),g&&g.c(),Ei(t,"class","jse-items svelte-6mjnsm"),Ei(i,"data-type","selectable-value"),Ei(i,"class","jse-footer svelte-6mjnsm"),Ei(o,"class","jse-footer-outer svelte-6mjnsm")},m:function(e,c){wi(e,t,c),f&&f.m(t,null),pi(t,n);for(var u=0;u=e.start&&c<=e.end}));if(!l)return null;var u=l.start,f=l.end;I_(u,Math.min(h.length,f),(function(e){return r(String(e))}))}else Object.keys(h).forEach(r);return n}(w,s||ds);if(j("dragSelectionStart",{selection:w,items:r}),r){var o=x.getJson();if(void 0!==o){var i=SA(o,w),a=r.findIndex((function(e){return Ex(e.path,i)})),c=MD({json:o,documentState:x.getDocumentState(),deltaY:0,items:r}).offset;n(11,$={initialTarget:e.target,initialClientY:e.clientY,initialContentTop:A(),selectionStartIndex:a,selectionItemsCount:kA(o,w).length,items:r,offset:c,didMoveItems:!1}),OD.dragging=!0,document.addEventListener("mousemove",P,!0),document.addEventListener("mouseup",T)}}else j("Cannot drag the current selection (probably spread over multiple sections)")}else k(e)}},function(e){OD.selecting||OD.dragging||(e.stopPropagation(),xO(e.target,"data-type","selectable-value")?n(10,S=Cs):xO(e.target,"data-type","insert-selection-area-inside")?n(10,S=js):xO(e.target,"data-type","insert-selection-area-after")&&n(10,S=Ss),clearTimeout(C))},function(e){e.stopPropagation(),C=window.setTimeout((function(){return n(10,S=void 0)}))},function(e){e.shiftKey||(e.stopPropagation(),e.preventDefault(),x.onSelect(DA(v)))},function(e){e.shiftKey||(e.stopPropagation(),e.preventDefault(),x.onSelect(zA(v)))},function(e){x.onSelect(DA(v)),x.onContextMenu(e)},function(e){x.onSelect(zA(v)),x.onContextMenu(e)},k,f,d]}var Ez=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,Az,Mz,Zo,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:32},ND,[-1,-1]),n}return Eo(t,Ia),Do(t)}(),Pz=Ez,Tz={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"]},Rz={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"]},Nz={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"]},Iz={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 Dz(e){var t,n;return t=new DI({props:{items:e[0]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&jo(n,1)[0]&&(r.items=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function zz(e,t,n){var r,o,i,a,s,c,l,u=t.json,f=t.selection,d=t.readOnly,h=t.showSearch,v=void 0!==h&&h,p=t.historyState,m=t.onExpandAll,g=t.onCollapseAll,y=t.onUndo,b=t.onRedo,w=t.onSort,x=t.onTransform,k=t.onContextMenu,j=t.onCopy,S=t.onRenderMenu;function C(){n(1,v=!v)}return e.$$set=function(e){"json"in e&&n(2,u=e.json),"selection"in e&&n(3,f=e.selection),"readOnly"in e&&n(4,d=e.readOnly),"showSearch"in e&&n(1,v=e.showSearch),"historyState"in e&&n(5,p=e.historyState),"onExpandAll"in e&&n(6,m=e.onExpandAll),"onCollapseAll"in e&&n(7,g=e.onCollapseAll),"onUndo"in e&&n(8,y=e.onUndo),"onRedo"in e&&n(9,b=e.onRedo),"onSort"in e&&n(10,w=e.onSort),"onTransform"in e&&n(11,x=e.onTransform),"onContextMenu"in e&&n(12,k=e.onContextMenu),"onCopy"in e&&n(13,j=e.onCopy),"onRenderMenu"in e&&n(14,S=e.onRenderMenu)},e.$$.update=function(){4&e.$$.dirty&&n(20,r=void 0!==u),1048584&e.$$.dirty&&n(19,o=r&&(yA(f)||mA(f)||gA(f))),68&e.$$.dirty&&n(15,a={type:"button",icon:Tz,title:"Expand all",className:"jse-expand-all",onClick:m,disabled:!Yl(u)}),132&e.$$.dirty&&n(16,s={type:"button",icon:Rz,title:"Collapse all",className:"jse-collapse-all",onClick:g,disabled:!Yl(u)}),4&e.$$.dirty&&n(17,c={type:"button",icon:OP,title:"Search (Ctrl+F)",className:"jse-search",onClick:C,disabled:void 0===u}),769844&e.$$.dirty&&n(18,l=d?[a,s,{type:"separator"},{type:"button",icon:AP,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:j,disabled:!o},{type:"separator"},c,{type:"space"}]:[a,s,{type:"separator"},{type:"button",icon:CP,title:"Sort",className:"jse-sort",onClick:w,disabled:d||void 0===u},{type:"button",icon:hP,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:x,disabled:d||void 0===u},c,{type:"button",icon:jP,title:ks,className:"jse-contextmenu",onClick:k},{type:"separator"},{type:"button",icon:bP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!p.canUndo},{type:"button",icon:yP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!p.canRedo},{type:"space"}]),278528&e.$$.dirty&&n(0,i=S(l))},[i,v,u,f,d,p,m,g,y,b,w,x,k,j,S,a,s,c,l,o,r]}var qz=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,zz,Dz,Zo,{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}),n}return Eo(t,Ia),Do(t)}();function Bz(e){mi(e,"svelte-s2toti",'.jse-welcome.svelte-s2toti.svelte-s2toti{flex:1;overflow:auto;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border, 1px solid #d7d7d7);border-right:var(--jse-main-border, 1px solid #d7d7d7)}.jse-welcome.svelte-s2toti.svelte-s2toti:last-child{border-bottom:var(--jse-main-border, 1px solid #d7d7d7)}.jse-welcome.svelte-s2toti .jse-space.jse-before.svelte-s2toti{flex:1}.jse-welcome.svelte-s2toti .jse-space.jse-after.svelte-s2toti{flex:2}.jse-welcome.svelte-s2toti .jse-contents.svelte-s2toti{display:flex;flex-direction:column;max-width:300px;margin:2em var(--jse-padding, 10px);gap:var(--jse-padding, 10px)}.jse-welcome.svelte-s2toti .jse-contents .jse-welcome-info.svelte-s2toti{color:var(--jse-panel-color-readonly, #b2b2b2)}.jse-welcome.svelte-s2toti .jse-contents button.svelte-s2toti{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;background:var(--jse-button-primary-background, var(--jse-theme-color, #3883fa));color:var(--jse-button-primary-color, #fff);padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px));border-radius:3px}.jse-welcome.svelte-s2toti .jse-contents button.svelte-s2toti:hover{background:var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff))}.jse-welcome.svelte-s2toti .jse-contents button.svelte-s2toti:disabled{background:var(--jse-button-primary-background-disabled, #9d9d9d)}')}function Lz(e){var t,n,r,o,i,a,s;return{c:function(){(t=ji("div")).innerHTML="You can paste clipboard data using Ctrl+V, or use the following options:",n=$i(),(r=ji("button")).textContent="Create object",o=$i(),(i=ji("button")).textContent="Create array",Ei(t,"class","jse-welcome-info svelte-s2toti"),Ei(r,"title","Create an empty JSON object (press '{')"),Ei(r,"class","svelte-s2toti"),Ei(i,"title","Create an empty JSON array (press '[')"),Ei(i,"class","svelte-s2toti")},m:function(c,l){wi(c,t,l),wi(c,n,l),wi(c,r,l),wi(c,o,l),wi(c,i,l),a||(s=[Oi(r,"click",Ai(e[4])),Oi(i,"click",Ai(e[5]))],a=!0)},p:Wo,d:function(e){e&&(xi(t),xi(n),xi(r),xi(o),xi(i)),a=!1,Qo(s)}}}function Fz(e){var t,n,r,o,i,a,s,c,l,u,f=!e[0]&&Lz(e);return{c:function(){t=ji("div"),n=ji("div"),r=$i(),o=ji("div"),(i=ji("div")).textContent="Empty document",a=$i(),f&&f.c(),s=$i(),c=ji("div"),Ei(n,"class","jse-space jse-before svelte-s2toti"),Ei(i,"class","jse-welcome-title"),Ei(o,"class","jse-contents svelte-s2toti"),Ei(c,"class","jse-space jse-after svelte-s2toti"),Ei(t,"class","jse-welcome svelte-s2toti"),Ei(t,"role","none")},m:function(d,h){wi(d,t,h),pi(t,n),pi(t,r),pi(t,o),pi(o,i),pi(o,a),f&&f.m(o,null),pi(t,s),pi(t,c),l||(u=Oi(t,"click",e[6]),l=!0)},p:function(e,t){var n=jo(t,1)[0];e[0]?f&&(f.d(1),f=null):f?f.p(e,n):((f=Lz(e)).c(),f.m(o,null))},i:Wo,o:Wo,d:function(e){e&&xi(t),f&&f.d(),l=!1,u()}}}function Vz(e,t,n){var r=t.readOnly,o=t.onCreateArray,i=t.onCreateObject,a=t.onClick;return e.$$set=function(e){"readOnly"in e&&n(0,r=e.readOnly),"onCreateArray"in e&&n(1,o=e.onCreateArray),"onCreateObject"in e&&n(2,i=e.onCreateObject),"onClick"in e&&n(3,a=e.onClick)},[r,o,i,a,function(){return i()},function(){return o()},function(){return a()}]}var Hz=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,Vz,Fz,Zo,{readOnly:0,onCreateArray:1,onCreateObject:2,onClick:3},Bz),n}return Eo(t,Ia),Do(t)}(),Wz={exports:{}},Uz=function(e,t){var n,r,o=1,i=0,a=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;(r=c(e,n))<76&&r>65;)++n;return+e.slice(t-1,n)}return(r=s&&s.indexOf(e.charAt(t)))>-1?r+76:(r=e.charCodeAt(t)||0)<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63}if((e+="")!=(t+=""))for(;o;)if(r=c(e,i++),o=c(t,a++),r<76&&o<76&&r>66&&o>66&&(r=c(e,i,i),o=c(t,a,i=n),a=n),r!=o)return r1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(Rs(Us(e,t))){if(void 0===n)throw new Error("Cannot sort: no property selected by which to sort the array");return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=function(e,t){return function(n,r){var o=Us(n,e),i=Us(r,e);return void 0===o?t:void 0===i?-t:"string"!=typeof o&&"string"!=typeof i?o>i?t:o1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=Us(e,t),o=Object.keys(r),i=o.slice();i.sort((function(e,t){return n*Kz(e,t)}));for(var a=[],s=0;stq&&Zz();return{c:function(){t=ji("div");for(var e=0;etq?u?u.p(e,c):((u=Zz()).c(),u.m(t,null)):u&&(u.d(1),u=null)},i:Wo,o:Wo,d:function(e){e&&xi(t);for(var n=0;n0&&(a("scrollTo ",e),i.scrollTo({left:e,behavior:"smooth"}))}}))},[s,u,f,r,i,d,o,function(e){a("get items for path",e);var t=Us(s,e);if(Array.isArray(t))return mS(0,t.length).map(String);if(Ql(t)){var n=Object.keys(t).slice(0);return n.sort(Kz),n}return[]},function(e){return Xs(s,e)},h,function(){n(5,d=!d)},v,function(e){v(),h(e)},c,l,function(e){na[e?"unshift":"push"]((function(){n(4,i=e)}))}]}var Cq=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,Sq,jq,Zo,{json:0,selection:13,onSelect:14,onError:1,pathParser:2},gq),n}return Eo(t,Ia),Do(t)}();function $q(e){mi(e,"svelte-wnmp4a",'.jse-search-box.svelte-wnmp4a.svelte-wnmp4a{border:var(--jse-panel-border, var(--jse-main-border, 1px solid #d7d7d7));border-radius:3px;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);background:var(--jse-panel-background, #ebebeb);color:var(--jse-panel-color-readonly, #b2b2b2);box-shadow:var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24));display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-wnmp4a .jse-search-form.svelte-wnmp4a{display:flex;align-items:stretch}.jse-search-box.svelte-wnmp4a .jse-search-form button.svelte-wnmp4a,.jse-search-box.svelte-wnmp4a .jse-search-form input.svelte-wnmp4a{font-family:inherit;font-size:inherit}.jse-search-box.svelte-wnmp4a .jse-search-form button.svelte-wnmp4a{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color, inherit);background:var(--jse-panel-button-background, transparent)}.jse-search-box.svelte-wnmp4a .jse-search-form button.svelte-wnmp4a:hover{color:var(--panel-button-color-highlight, var(--jse-text-color, #4d4d4d));background:var(--jse-panel-button-background-highlight, #e0e0e0)}.jse-search-box.svelte-wnmp4a .jse-search-form input.svelte-wnmp4a{color:var(--jse-panel-color, var(--jse-text-color, #4d4d4d));border:var(--jse-input-border, 1px solid #d8dbdf);border-radius:3px;background:var(--jse-input-background, var(--jse-background-color, #fff));height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-replace-toggle.svelte-wnmp4a{padding:var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px));min-width:20px;background:var(--jse-panel-button-background-highlight, #e0e0e0)}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents.svelte-wnmp4a{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding, 10px));gap:calc(0.5 * var(--jse-padding, 10px))}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-search-section.svelte-wnmp4a{flex:1;display:flex;align-items:center;position:relative}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-wnmp4a{color:inherit;cursor:inherit;background:inherit;width:32px;text-align:center}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-wnmp4a{flex:1;display:flex}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-wnmp4a{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-wnmp4a{visibility:visible}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-replace-section.svelte-wnmp4a{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-wnmp4a .jse-search-form .jse-search-contents .jse-replace-section button.svelte-wnmp4a{width:auto}')}function _q(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M=(-1!==e[7]&&e[7]=cs?"".concat(999,"+"):String(r)),71303168&e.$$.dirty[0]&&p(a),2&e.$$.dirty[0]&&function(e){I.apply(this,arguments)}(f),8&e.$$.dirty[0]&&j(b),262144&e.$$.dirty[0]&&S(c)},[d,f,h,b,r,x,k,o,i,C,function(e){e.stopPropagation();var t=RO(e);"Enter"===t&&(e.preventDefault(),b!==w?(j.flush(),w=b):A()),"Shift+Enter"===t&&(e.preventDefault(),P()),"Ctrl+Enter"===t&&(e.preventDefault(),d?_():A()),"Ctrl+H"===t&&(e.preventDefault(),C()),"Escape"===t&&(e.preventDefault(),L())},function(e){"Enter"===RO(e)&&(e.preventDefault(),e.stopPropagation(),_())},function(){return $.apply(this,arguments)},_,function(){return M.apply(this,arguments)},A,P,L,c,l,u,v,p,m,g,y,a,function(){b=this.value,n(3,b)},function(){x=this.value,n(5,x)}]}var Nq=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,Rq,Pq,Zo,{json:18,documentState:19,parser:20,showSearch:1,showReplace:0,readOnly:2,columns:21,onSearch:22,onFocus:23,onPatch:24,onClose:25},$q,[-1,-1]),n}return Eo(t,Ia),Do(t)}(),Iq=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Dq(e,t){if(e.length!==t.length)return!1;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1/0,r={};Array.isArray(e)&&function(e,t,n){if(e.length1?(e.length-1)/(t-1):e.length,o=0;o6&&void 0!==arguments[6]?arguments[6]:80,s=Rs(n)?n.length:0,c=function(e,t){var n=Object.values(e);if(Ax(n))return t;var r=function(e,t){return e+t},o=n.reduce(r);return o/n.length}(r,o),l=e-a,u=t+2*a,f=function(e){return r[e]||o},d=0,h=i;h0&&(h-=f(--d));for(var v=d,p=0;p0?s-1:void 0,o=void 0!==n?IA(Uq({rowIndex:n,columnIndex:c},r),!1):null;return Yq("remove row new selection",{rowIndex:s,newRowIndex:n,newSelection:o}),{state:Ro(Ro({},t),{},{selection:o})}}))}}function cB(e){var t=e.insertType,n=e.selectInside,r=e.refJsonEditor,o=e.json,i=e.selection,a=e.readOnly,s=e.parser,c=e.onPatch,l=e.onReplaceJson;if(!a){var u=function(e,t,n){if("object"===n)return{};if("array"===n)return[];if("structure"===n&&void 0!==e){var r=Us(e,t?jA(t):[]);if(Array.isArray(r)&&!Ax(r)){var o=fw(r);return Yl(o)?Cg(o,(function(e){return Array.isArray(e)?[]:Ql(e)?void 0:""})):""}}return""}(o,i,t);if(void 0!==o){var f=s.stringify(u),d=uE(o,i,f,s);Yq("onInsert",{insertType:t,operations:d,newValue:u,data:f});var h=gb(d.filter((function(e){return"add"===e.op||"replace"===e.op})));c(d,(function(e,t){if(h){var r=hc(e,h.path);if(Yl(u))return{state:Ro(Ro({},UM(e,t,r,hA)),{},{selection:n?DA(r):t.selection})};if(""===u){var o=Ax(r)?null:Us(e,Zw(r));return{state:WM(e,Ro(Ro({},t),{},{selection:Ql(o)?NA(r,!0):IA(r,!0)}),r)}}}else;})),Yq("after patch"),h&&""===u&&hB((function(){return CO(r,"",!0,vB)}))}else{Yq("onInsert",{insertType:t,newValue:u});var v=[];l(u,(function(e,t){return{state:Ro(Ro({},fA(e,t,v)),{},{selection:Yl(u)?DA(v):IA(v,!0)})}}))}}}function lB(e){return uB.apply(this,arguments)}function uB(){return uB=ko(wo().mark((function e(t){var n,r,o,i,a,s,c,l,u,f,d,h;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.char,r=t.selectInside,o=t.refJsonEditor,i=t.json,a=t.selection,s=t.readOnly,c=t.parser,l=t.onPatch,u=t.onReplaceJson,f=t.onSelect,!s){e.next=3;break}return e.abrupt("return");case 3:if(!mA(a)){e.next=8;break}return d=!a.edit,f(Ro(Ro({},a),{},{edit:!0})),hB((function(){return CO(o,n,d,vB)})),e.abrupt("return");case 8:if("{"!==n){e.next=12;break}cB({insertType:"object",selectInside:r,refJsonEditor:o,json:i,selection:a,readOnly:s,parser:c,onPatch:l,onReplaceJson:u}),e.next=23;break;case 12:if("["!==n){e.next=16;break}cB({insertType:"array",selectInside:r,refJsonEditor:o,json:i,selection:a,readOnly:s,parser:c,onPatch:l,onReplaceJson:u}),e.next=23;break;case 16:if(!gA(a)||void 0===i){e.next=20;break}Yl(Us(i,a.path))||(h=!a.edit,f(Ro(Ro({},a),{},{edit:!0})),hB((function(){return CO(o,n,h,vB)}))),e.next=23;break;case 20:return Yq("onInsertValueWithCharacter",{char:n}),e.next=23,fB({char:n,refJsonEditor:o,json:i,selection:a,readOnly:s,parser:c,onPatch:l,onReplaceJson:u});case 23:case"end":return e.stop()}}),e)}))),uB.apply(this,arguments)}function fB(e){return dB.apply(this,arguments)}function dB(){return dB=ko(wo().mark((function e(t){var n,r,o,i,a,s,c,l,u;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.char,r=t.refJsonEditor,o=t.json,i=t.selection,a=t.readOnly,s=t.parser,c=t.onPatch,l=t.onReplaceJson,!a){e.next=3;break}return e.abrupt("return");case 3:cB({insertType:"value",selectInside:!1,refJsonEditor:r,json:o,selection:i,readOnly:a,parser:s,onPatch:c,onReplaceJson:l}),u=!LA(i),hB((function(){return CO(r,n,u,vB)}));case 6:case"end":return e.stop()}}),e)}))),dB.apply(this,arguments)}function hB(e){setTimeout((function(){return setTimeout(e)}))}function vB(e){null==e||e.refresh()}function pB(e){mi(e,"svelte-l2z0i3",'.jse-json-preview.svelte-l2z0i3{flex:1;font-family:var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace);font-size:var(--jse-font-size-mono, 14px);color:var(--jse-panel-color-readonly, #b2b2b2);overflow:auto;white-space:pre-wrap;padding:2px;border-left:var(--jse-main-border, 1px solid #d7d7d7);border-right:var(--jse-main-border, 1px solid #d7d7d7);border-bottom:var(--jse-main-border, 1px solid #d7d7d7)}')}function mB(e){var t,n;return{c:function(){t=ji("div"),n=Ci(e[0]),Ei(t,"class","jse-json-preview svelte-l2z0i3")},m:function(e,r){wi(e,t,r),pi(t,n)},p:function(e,t){1&jo(t,1)[0]&&Ni(n,e[0])},i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function gB(e,t,n){var r,o,i=t.text,a=t.json,s=t.indentation,c=t.parser;return e.$$set=function(e){"text"in e&&n(1,i=e.text),"json"in e&&n(2,a=e.json),"indentation"in e&&n(3,s=e.indentation),"parser"in e&&n(4,c=e.parser)},e.$$.update=function(){6&e.$$.dirty&&n(5,r=void 0!==a?{json:a}:{text:i||""}),56&e.$$.dirty&&n(0,o=rM(Z_(r,s,c),fs))},[o,i,a,s,c,r]}var yB=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,gB,mB,Xo,{text:1,json:2,indentation:3,parser:4},pB),n}return Eo(t,Ia),Do(t)}();function bB(e){mi(e,"svelte-szeu2l",'button.jse-context-menu-button.svelte-szeu2l{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;flex:1;white-space:nowrap;padding:var(--jse-padding, 10px);color:inherit}button.jse-context-menu-button.svelte-szeu2l:hover{background:var(--jse-context-menu-background-highlight, #7a7a7a)}button.jse-context-menu-button.svelte-szeu2l:focus{background:var(--jse-context-menu-background-highlight, #7a7a7a);z-index:1}button.jse-context-menu-button.svelte-szeu2l:disabled{color:var(--jse-context-menu-color-disabled, #9d9d9d);background:unset}button.jse-context-menu-button.left.svelte-szeu2l{text-align:left}button.jse-context-menu-button.svelte-szeu2l svg{width:16px}')}function wB(e){var t,n;return t=new CM({props:{data:e[0].icon}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[0].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function xB(e){var t,n=e[0].text+"";return{c:function(){t=Ci(n)},m:function(e,n){wi(e,t,n)},p:function(e,r){1&r&&n!==(n=e[0].text+"")&&Ni(t,n)},d:function(e){e&&xi(t)}}}function kB(e){var t,n,r,o,i,a,s,c,l=e[0].icon&&wB(e),u=e[0].text&&xB(e);return{c:function(){t=ji("button"),l&&l.c(),n=$i(),u&&u.c(),Ei(t,"type","button"),Ei(t,"class",r=si(YA("jse-context-menu-button",e[1],e[0].className))+" svelte-szeu2l"),Ei(t,"title",o=e[0].title),t.disabled=i=e[0].disabled||!1},m:function(r,o){wi(r,t,o),l&&l.m(t,null),pi(t,n),u&&u.m(t,null),a=!0,s||(c=Oi(t,"click",e[3]),s=!0)},p:function(e,s){var c=jo(s,1)[0];e[0].icon?l?(l.p(e,c),1&c&&xa(l,1)):((l=wB(e)).c(),xa(l,1),l.m(t,n)):l&&(ba(),ka(l,1,1,(function(){l=null})),wa()),e[0].text?u?u.p(e,c):((u=xB(e)).c(),u.m(t,null)):u&&(u.d(1),u=null),(!a||3&c&&r!==(r=si(YA("jse-context-menu-button",e[1],e[0].className))+" svelte-szeu2l"))&&Ei(t,"class",r),(!a||1&c&&o!==(o=e[0].title))&&Ei(t,"title",o),(!a||1&c&&i!==(i=e[0].disabled||!1))&&(t.disabled=i)},i:function(e){a||(xa(l),a=!0)},o:function(e){ka(l),a=!1},d:function(e){e&&xi(t),l&&l.d(),u&&u.d(),s=!1,c()}}}function jB(e,t,n){var r=t.item,o=t.className,i=void 0===o?void 0:o,a=t.onRequestClose;return e.$$set=function(e){"item"in e&&n(0,r=e.item),"className"in e&&n(1,i=e.className),"onRequestClose"in e&&n(2,a=e.onRequestClose)},[r,i,a,function(e){a(),r.onClick(e)}]}var SB=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,jB,kB,Xo,{item:0,className:1,onRequestClose:2},bB),n}return Eo(t,Ia),Do(t)}();function CB(e){mi(e,"svelte-9i012w",'.jse-dropdown-button.svelte-9i012w.svelte-9i012w{flex:1;line-height:normal;border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;position:relative;padding:0;display:flex}.jse-dropdown-button.svelte-9i012w ul.svelte-9i012w{margin:0;padding:0}.jse-dropdown-button.svelte-9i012w ul li.svelte-9i012w{margin:0;padding:0;list-style-type:none}.jse-dropdown-button.svelte-9i012w button.jse-open-dropdown.svelte-9i012w{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;width:2em;background:var(--jse-context-menu-background, #656565);color:var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff));border-radius:0}.jse-dropdown-button.svelte-9i012w button.jse-open-dropdown.jse-visible.svelte-9i012w{background:var(--jse-context-menu-background, #656565)}.jse-dropdown-button.svelte-9i012w button.jse-open-dropdown.svelte-9i012w:hover{background:var(--jse-context-menu-background-highlight, #7a7a7a)}.jse-dropdown-button.svelte-9i012w button.jse-open-dropdown.svelte-9i012w:focus{z-index:1}.jse-dropdown-button.svelte-9i012w button.jse-open-dropdown.svelte-9i012w:disabled{color:var(--jse-context-menu-color-disabled, #9d9d9d);background:unset}.jse-dropdown-button.svelte-9i012w .jse-dropdown-items.svelte-9i012w{display:none;position:absolute;top:100%;left:0;z-index:1;background:var(--jse-context-menu-background, #656565);color:var(--jse-context-menu-color, var(--jse-text-color-inverse, #fff));box-shadow:var(--jse-controls-box-shadow, 0 2px 6px 0 rgba(0, 0, 0, 0.24))}.jse-dropdown-button.svelte-9i012w .jse-dropdown-items.jse-visible.svelte-9i012w{display:block}.jse-dropdown-button.svelte-9i012w .jse-dropdown-items button.svelte-9i012w{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;width:100%;text-align:left;padding:var(--jse-padding, 10px);margin:0}.jse-dropdown-button.svelte-9i012w .jse-dropdown-items button.svelte-9i012w:hover{background:var(--jse-context-menu-background-highlight, #7a7a7a)}.jse-dropdown-button.svelte-9i012w .jse-dropdown-items button.svelte-9i012w:disabled{color:var(--jse-context-menu-color-disabled, #9d9d9d);background:unset}')}function $B(e,t,n){var r=e.slice();return r[11]=t[n],r}var _B=function(e){return{}},OB=function(e){return{}};function MB(e){var t,n;return t=new CM({props:{data:e[11].icon}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n&&(r.data=e[11].icon),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function AB(e){var t,n,r,o,i,a,s,c,l,u,f,d=e[11].text+"",h=e[11].icon&&MB(e);function v(){for(var t,n=arguments.length,r=new Array(n),o=0;o
loading...
',Ei(t,"class","jse-contents svelte-1ig7ktu")},m:function(e,n){wi(e,t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function yL(e){var t,n,r,o,i,a,s,c,l,u=[wL,bL],f=[];function d(e,t){return void 0===e[11]?0:1}return o=d(e),i=f[o]=u[o](e),{c:function(){t=ji("label"),n=ji("input"),r=$i(),i.c(),a=_i(),Ei(n,"type","text"),n.readOnly=!0,Ei(n,"tabindex","-1"),Ei(n,"class","jse-hidden-input svelte-1ig7ktu"),Ei(t,"class","jse-hidden-input-label")},m:function(i,u){wi(i,t,u),pi(t,n),e[76](n),wi(i,r,u),f[o].m(i,u),wi(i,a,u),s=!0,c||(l=Oi(n,"paste",e[31]),c=!0)},p:function(e,t){var n=o;(o=d(e))===n?f[o].p(e,t):(ba(),ka(f[n],1,1,(function(){f[n]=null})),wa(),(i=f[o])?i.p(e,t):(i=f[o]=u[o](e)).c(),xa(i,1),i.m(a.parentNode,a))},i:function(e){s||(xa(i),s=!0)},o:function(e){ka(i),s=!1},d:function(n){n&&(xi(t),xi(r),xi(a)),e[76](null),f[o].d(n),c=!1,l()}}}function bL(e){var t,n,r,o,i,a,s,c,l,u,f;r=new Nq({props:{json:e[11],documentState:e[12],parser:e[3],showSearch:e[13],showReplace:e[21],readOnly:e[0],columns:void 0,onSearch:e[26],onFocus:e[27],onPatch:e[37],onClose:e[28]}}),a=new Pz({props:{value:e[11],path:[],expandedMap:e[12].expandedMap,enforceStringMap:e[12].enforceStringMap,visibleSectionsMap:e[12].visibleSectionsMap,validationErrorsMap:e[24],searchResultItemsMap:null===(t=e[20])||void 0===t?void 0:t.itemsMap,selection:e[12].selection,context:e[15],onDragSelectionStart:Af}});var d=e[19]&&xL(e),h=e[23]&&kL(e);return u=new XN({props:{validationErrors:e[14],selectError:e[29]}}),{c:function(){n=ji("div"),Pa(r.$$.fragment),o=$i(),i=ji("div"),Pa(a.$$.fragment),s=$i(),d&&d.c(),c=$i(),h&&h.c(),l=$i(),Pa(u.$$.fragment),Ei(n,"class","jse-search-box-container svelte-1ig7ktu"),Ei(i,"class","jse-contents svelte-1ig7ktu"),Ei(i,"data-jsoneditor-scrollable-contents",!0)},m:function(t,v){wi(t,n,v),Ta(r,n,null),wi(t,o,v),wi(t,i,v),Ta(a,i,null),e[80](i),wi(t,s,v),d&&d.m(t,v),wi(t,c,v),h&&h.m(t,v),wi(t,l,v),Ta(u,t,v),f=!0},p:function(e,t){var n,o={};2048&t[0]&&(o.json=e[11]),4096&t[0]&&(o.documentState=e[12]),8&t[0]&&(o.parser=e[3]),8192&t[0]&&(o.showSearch=e[13]),2097152&t[0]&&(o.showReplace=e[21]),1&t[0]&&(o.readOnly=e[0]),r.$set(o);var i={};2048&t[0]&&(i.value=e[11]),4096&t[0]&&(i.expandedMap=e[12].expandedMap),4096&t[0]&&(i.enforceStringMap=e[12].enforceStringMap),4096&t[0]&&(i.visibleSectionsMap=e[12].visibleSectionsMap),16777216&t[0]&&(i.validationErrorsMap=e[24]),1048576&t[0]&&(i.searchResultItemsMap=null===(n=e[20])||void 0===n?void 0:n.itemsMap),4096&t[0]&&(i.selection=e[12].selection),32768&t[0]&&(i.context=e[15]),a.$set(i),e[19]?d?(d.p(e,t),524288&t[0]&&xa(d,1)):((d=xL(e)).c(),xa(d,1),d.m(c.parentNode,c)):d&&(ba(),ka(d,1,1,(function(){d=null})),wa()),e[23]?h?(h.p(e,t),8388608&t[0]&&xa(h,1)):((h=kL(e)).c(),xa(h,1),h.m(l.parentNode,l)):h&&(ba(),ka(h,1,1,(function(){h=null})),wa());var s={};16384&t[0]&&(s.validationErrors=e[14]),u.$set(s)},i:function(e){f||(xa(r.$$.fragment,e),xa(a.$$.fragment,e),xa(d),xa(h),xa(u.$$.fragment,e),f=!0)},o:function(e){ka(r.$$.fragment,e),ka(a.$$.fragment,e),ka(d),ka(h),ka(u.$$.fragment,e),f=!1},d:function(t){t&&(xi(n),xi(o),xi(i),xi(s),xi(c),xi(l)),Ra(r),Ra(a),e[80](null),d&&d.d(t),h&&h.d(t),Ra(u,t)}}}function wL(e){var t,n,r,o,i=[SL,jL],a=[];function s(e,t){return""===e[18]||void 0===e[18]?0:1}return t=s(e),n=a[t]=i[t](e),{c:function(){n.c(),r=_i()},m:function(e,n){a[t].m(e,n),wi(e,r,n),o=!0},p:function(e,o){var c=t;(t=s(e))===c?a[t].p(e,o):(ba(),ka(a[c],1,1,(function(){a[c]=null})),wa(),(n=a[t])?n.p(e,o):(n=a[t]=i[t](e)).c(),xa(n,1),n.m(r.parentNode,r))},i:function(e){o||(xa(n),o=!0)},o:function(e){ka(n),o=!1},d:function(e){e&&xi(r),a[t].d(e)}}}function xL(e){var t,n;return t=new LN({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(e[19].contents)?"array":"object"," as text"),actions:[{icon:pP,text:"Paste as JSON instead",title:"Replace the value with the pasted JSON",onMouseDown:e[44]},{text:"Leave as is",title:"Keep the JSON embedded in the value",onClick:e[45]}]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};524288&n[0]&&(r.message="You pasted a JSON ".concat(Array.isArray(e[19].contents)?"array":"object"," as text")),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function kL(e){var t,n;return t=new LN({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:e[0]?[]:[{icon:DP,text:"Ok",title:"Accept the repaired document",onClick:e[8]},{icon:vP,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:e[46]}],onClose:e[9]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.actions=e[0]?[]:[{icon:DP,text:"Ok",title:"Accept the repaired document",onClick:e[8]},{icon:vP,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:e[46]}]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function jL(e){var t,n,r,o;return t=new LN({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:e[0]?[]:[{icon:vP,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[46]}]}}),r=new yB({props:{text:e[18],json:e[11],indentation:e[5],parser:e[3]}}),{c:function(){Pa(t.$$.fragment),n=$i(),Pa(r.$$.fragment)},m:function(e,i){Ta(t,e,i),wi(e,n,i),Ta(r,e,i),o=!0},p:function(e,n){var o={};1&n[0]&&(o.actions=e[0]?[]:[{icon:vP,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[46]}]),t.$set(o);var i={};262144&n[0]&&(i.text=e[18]),2048&n[0]&&(i.json=e[11]),32&n[0]&&(i.indentation=e[5]),8&n[0]&&(i.parser=e[3]),r.$set(i)},i:function(e){o||(xa(t.$$.fragment,e),xa(r.$$.fragment,e),o=!0)},o:function(e){ka(t.$$.fragment,e),ka(r.$$.fragment,e),o=!1},d:function(e){e&&xi(n),Ra(t,e),Ra(r,e)}}}function SL(e){var t,n;return t=new Hz({props:{readOnly:e[0],onCreateObject:e[77],onCreateArray:e[78],onClick:e[79]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.readOnly=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function CL(e){var t,n,r,o,i,a,s,c,l=e[1]&&pL(e),u=e[2]&&mL(e),f=[yL,gL],d=[];return o=function(e,t){return e[25]?1:0}(e),i=d[o]=f[o](e),{c:function(){t=ji("div"),l&&l.c(),n=$i(),u&&u.c(),r=$i(),i.c(),Ei(t,"role","tree"),Ei(t,"tabindex","-1"),Ei(t,"class","jse-tree-mode svelte-1ig7ktu"),qi(t,"no-main-menu",!e[1])},m:function(i,f){wi(i,t,f),l&&l.m(t,null),pi(t,n),u&&u.m(t,null),pi(t,r),d[o].m(t,null),e[81](t),a=!0,s||(c=[Oi(hL,"mousedown",e[48]),Oi(t,"keydown",e[40]),Oi(t,"mousedown",e[41]),Oi(t,"contextmenu",e[42])],s=!0)},p:function(e,o){e[1]?l?(l.p(e,o),2&o[0]&&xa(l,1)):((l=pL(e)).c(),xa(l,1),l.m(t,n)):l&&(ba(),ka(l,1,1,(function(){l=null})),wa()),e[2]?u?(u.p(e,o),4&o[0]&&xa(u,1)):((u=mL(e)).c(),xa(u,1),u.m(t,r)):u&&(ba(),ka(u,1,1,(function(){u=null})),wa()),i.p(e,o),(!a||2&o[0])&&qi(t,"no-main-menu",!e[1])},i:function(e){a||(xa(l),xa(u),xa(i),a=!0)},o:function(e){ka(l),ka(u),ka(i),a=!1},d:function(n){n&&xi(t),l&&l.d(),u&&u.d(),d[o].d(),e[81](null),s=!1,Qo(c)}}}function $L(e,t,n){var r,o=Da("jsoneditor:TreeMode"),i="undefined"==typeof window;o("isSSR:",i);var a,s,c,l,u,f=Zi("simple-modal").open,d=T$(),h=T$(),v=Zi("absolute-popup"),p=v.openAbsolutePopup,m=v.closeAbsolutePopup,g=!1,y=SN(),b=t.readOnly,w=t.externalContent,x=t.externalSelection,k=t.mainMenuBar,j=t.navigationBar,S=t.escapeControlCharacters,C=t.escapeUnicodeCharacters,$=t.parser,_=t.parseMemoizeOne,O=t.validator,M=t.validationParser,A=t.pathParser,E=t.indentation,P=t.onError,T=t.onChange,R=t.onChangeMode,N=t.onSelect,I=t.onRenderValue,D=t.onRenderMenu,z=t.onRenderContextMenu,q=t.onClassName,B=t.onFocus,L=t.onBlur,F=t.onSortModal,V=t.onTransformModal,H=t.onJSONEditorModal,W=!1;TN({onMount:Gi,onDestroy:Qi,getWindow:function(){return $O(c)},hasFocus:function(){return W&&document.hasFocus()||_O(c)},onFocus:function(){g=!0,B&&B()},onBlur:function(){g=!1,L&&L()}});var U=void 0;function J(e){o("updateSelection",e);var t="function"==typeof e?e(X.selection)||null:e;Ex(t,X.selection)||(n(12,X=Ro(Ro({},X),{},{selection:t})),N(t))}var K,G,Q,Y=!1,X=FM(),Z=!1,ee=!1;function te(){return(te=ko(wo().mark((function e(t){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(12,X=Ro(Ro({},WM(l,X,t)),{},{selection:null})),e.next=3,Ve(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ne=_N({onChange:function(e){n(22,re=e)}}),re=ne.getState();var oe,ie,ae=!1,se=[],ce=zq(AN);function le(e,t,r,i){ON((function(){var a;try{a=ce(e,t,r,i)}catch(e){a=[{path:[],message:"Failed to validate: "+e.message,severity:Za.warning}]}Ex(a,se)||(o("validationErrors changed:",a),n(14,se=a))}),(function(e){return o("validationErrors updated in ".concat(e," ms"))}))}function ue(){return o("validate"),U?{parseError:U,isRepairable:!1}:(le(l,O,$,M),Ax(se)?null:{validationErrors:se})}function fe(){return l}function de(){return X}function he(e){Q_(e)?function(e){if(void 0===e)return;var t=!Ex(l,e);if(o("update external json",{isChanged:t,currentlyText:void 0===l}),!t)return;var r=X,i=l,a=u,s=ae;n(11,l=e),ve(l),n(18,u=void 0),n(23,ae=!1),U=void 0,pe(l),me({previousJson:i,previousState:r,previousText:a,previousTextIsRepaired:s})}(e.json):G_(e)&&function(e){if(void 0===e||Q_(w))return;var t=e!==u;if(o("update external text",{isChanged:t}),!t)return;var r=l,i=X,a=u,s=ae;try{n(11,l=_(e)),ve(l),n(18,u=e),n(23,ae=!1),U=void 0}catch(t){try{n(11,l=_(Wl(e))),ve(l),n(18,u=e),n(23,ae=!0),U=void 0,pe(l)}catch(e){n(11,l=void 0),n(18,u=w.text),n(23,ae=!1),U=void 0!==u&&""!==u?U_(u,t.message||String(t)):void 0}}pe(l),me({previousJson:r,previousState:i,previousText:a,previousTextIsRepaired:s})}(e.text)}function ve(e){Y||(Y=!0,n(12,X=UM(e,X,[],function(e){return eO({json:e},ms)?dA:hA}(e))))}function pe(e){X.selection&&(Xs(e,QA(X.selection))&&Xs(e,GA(X.selection))||(o("clearing selection: path does not exist anymore",X.selection),n(12,X=Ro(Ro({},X),{},{selection:OA(e,X)}))))}function me(e){var t=e.previousJson,n=e.previousState,r=e.previousText,o=e.previousTextIsRepaired;void 0===t&&void 0===r||(void 0!==l?void 0!==t?ne.add({undo:{patch:[{op:"replace",path:"",value:t}],state:RA(n),json:void 0,text:r,textIsRepaired:o},redo:{patch:[{op:"replace",path:"",value:l}],state:RA(X),json:void 0,text:u,textIsRepaired:ae}}):ne.add({undo:{patch:void 0,json:void 0,text:r,state:RA(n),textIsRepaired:o},redo:{patch:void 0,json:l,state:RA(X),text:u,textIsRepaired:ae}}):void 0!==t&&ne.add({undo:{patch:void 0,json:t,state:RA(n),text:r,textIsRepaired:o},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:ae,state:RA(X)}}))}function ge(e,t){if(o("patch",e,t),void 0===l)throw new Error("Cannot apply patch: no JSON");var r=l,i=X,a=u,s=ae,c=pE(l,e),f=GM(l,X,e),d=MA(l,e),h=function(e,t){return t||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ro(Ro({},e),{},{selection:t}):e}(f.documentState,d,!1);o("patch updatedSelection",d);var v="function"==typeof t?t(f.json,h):void 0;n(11,l=v&&void 0!==v.json?v.json:f.json);var p=v&&void 0!==v.state?v.state:h;return n(12,X=p),n(18,u=void 0),n(23,ae=!1),n(19,G=void 0),U=void 0,pe(l),ne.add({undo:{patch:c,json:void 0,text:a,state:RA(i),textIsRepaired:s},redo:{patch:e,json:void 0,state:RA(p),text:u,textIsRepaired:ae}}),{json:l,previousJson:r,undo:c,redo:e}}function ye(){!b&&X.selection&&J(NA(GA(X.selection),!0))}function be(){if(!b&&X.selection){var e=GA(X.selection),t=Us(l,e);Yl(t)?function(e,t){o("openJSONEditorModal",{path:e,value:t}),W=!0,H({content:{json:t},path:e,onPatch:ie.onPatch,onClose:function(){W=!1,ot()}})}(e,t):J(IA(e,!0))}}function we(){if(!b&&gA(X.selection)){var e=GA(X.selection),t=ec(e),n=Us(l,e),r=!aA(n,X.enforceStringMap,t,$),i=r?String(n):ou(String(n),$);o("handleToggleEnforceString",{enforceString:r,value:n,updatedValue:i}),Ke([{op:"replace",path:t,value:i}],(function(e,n){return{state:KM(n,t,r)}}))}}function xe(){return ke.apply(this,arguments)}function ke(){return ke=ko(wo().mark((function e(){var t,n=arguments;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(n.length>0&&void 0!==n[0])||n[0],e.next=3,Xq({json:l,documentState:X,indentation:t?E:void 0,readOnly:b,parser:$,onPatch:Ke});case 3:case"end":return e.stop()}}),e)}))),ke.apply(this,arguments)}function je(){return Se.apply(this,arguments)}function Se(){return Se=ko(wo().mark((function e(){var t,n=arguments;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(n.length>0&&void 0!==n[0])||n[0],void 0!==l){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,eB({json:l,documentState:X,indentation:t?E:void 0,parser:$});case 5:case"end":return e.stop()}}),e)}))),Se.apply(this,arguments)}function Ce(){f(sI,{},Ro(Ro({},gs),{},{styleWindow:{width:"450px"}}),{onClose:function(){return ot()}})}function $e(e,t){f(YI,{text:e,onParse:function(e){return V_(e,(function(e){return L_(e,$)}))},onRepair:H_,onApply:t},Ro(Ro({},gs),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ot()}})}function _e(){rB({json:l,text:u,documentState:X,keepSelection:!1,readOnly:b,onChange:T,onPatch:Ke})}function Oe(){!b&&void 0!==l&&X.selection&&FA&&!Ax(GA(X.selection))&&(o("duplicate",{selection:X.selection}),Ke(lE(l,kA(l,X.selection))))}function Me(){if(!b&&X.selection&&(yA(X.selection)||gA(X.selection))&&!Ax(GA(X.selection))){o("extract",{selection:X.selection});var e=function(e,t){if(gA(t))return[{op:"move",from:ec(t.path),path:""}];if(!yA(t))throw new Error("Cannot create extract operations: parent must be an Object or Array");var n=Us(e,Zw(t.focusPath));if(Rs(n))return[{op:"replace",path:"",value:kA(e,t).map((function(e){var t=Jl(gb(e));return n[t]}))}];if(Ns(n)){var r={};return kA(e,t).forEach((function(e){var t=String(gb(e));r[t]=n[t]})),[{op:"replace",path:"",value:r}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(t))}(l,X.selection);Ke(e,(function(e,t){if(Yl(e)){return{state:fA(e,t,[])}}}))}}function Ae(e){cB({insertType:e,selectInside:!0,refJsonEditor:c,json:l,selection:X.selection,readOnly:b,parser:$,onPatch:Ke,onReplaceJson:Ge})}function Ee(e){mA(X.selection)&&J(IA(X.selection.path,!1)),X.selection||J(OA(l,X)),Ae(e)}function Pe(e){if(!b&&X.selection)if(VA(X.selection))try{var t=QA(X.selection),n=Us(l,t),r=function(e,t,n){if("array"===t){if(Array.isArray(e))return e;if(Ql(e))return q_(e);if("string"==typeof e)try{var r=n.parse(e);if(Array.isArray(r))return r;if(Ql(r))return q_(r)}catch(t){return[e]}return[e]}if("object"===t){if(Array.isArray(e))return z_(e);if(Ql(e))return e;if("string"==typeof e)try{var o=n.parse(e);if(Ql(o))return o;if(Array.isArray(o))return z_(o)}catch(t){return{value:e}}return{value:e}}if("value"===t)return Yl(e)?n.stringify(e):e;throw new Error("Cannot convert ".concat(tu(e,n)," to ").concat(t))}(n,e,$);if(r===n)return;var i=[{op:"replace",path:ec(t),value:r}];o("handleConvert",{selection:X.selection,path:t,type:e,operations:i}),Ke(i,(function(e,t){return{state:X.selection?fA(e,t,GA(X.selection)):X}}))}catch(e){P(e)}else P(new Error("Cannot convert current selection to ".concat(e)))}function Te(){if(X.selection){var e=$A(l,X,!1),t=Zw(GA(X.selection));e&&!Ax(GA(e))&&Ex(t,Zw(GA(e)))?J(zA(GA(e))):J(DA(t)),o("insert before",{selection:X.selection,selectionBefore:e,parentPath:t}),ca().then((function(){return nt()}))}}function Re(){if(X.selection){var e=CA(l,X.selection);o("insert after",e),J(zA(e)),ca().then((function(){return nt()}))}}function Ne(e){return Ie.apply(this,arguments)}function Ie(){return(Ie=ko(wo().mark((function e(t){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lB({char:t,selectInside:!0,refJsonEditor:c,json:l,selection:X.selection,readOnly:b,parser:$,onPatch:Ke,onReplaceJson:Ge,onSelect:J});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function De(){if(!b&&ne.getState().canUndo){var e=ne.undo();if(e){var t={json:l,text:u};n(11,l=e.undo.patch?oc(l,e.undo.patch):e.undo.json),n(12,X=e.undo.state),n(18,u=e.undo.text),n(23,ae=e.undo.textIsRepaired),U=void 0,o("undo",{item:e,json:l,documentState:X}),Je(t,e.undo.patch&&e.redo.patch?{json:l,previousJson:t.json,redo:e.undo.patch,undo:e.redo.patch}:null),ot(),X.selection&&Ve(GA(X.selection),!1)}}}function ze(){if(!b&&ne.getState().canRedo){var e=ne.redo();if(e){var t={json:l,text:u};n(11,l=e.redo.patch?oc(l,e.redo.patch):e.redo.json),n(12,X=e.redo.state),n(18,u=e.redo.text),n(23,ae=e.redo.textIsRepaired),U=void 0,o("redo",{item:e,json:l,documentState:X}),Je(t,e.undo.patch&&e.redo.patch?{json:l,previousJson:t.json,redo:e.redo.patch,undo:e.undo.patch}:null),ot(),X.selection&&Ve(GA(X.selection),!1)}}}function qe(e){var t;b||void 0===l||(W=!0,F({id:d,json:l,rootPath:e,onSort:(t=ko(wo().mark((function t(n){var r;return wo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.operations,o("onSort",e,r),Ke(r,(function(t,n){return{state:Ro(Ro({},fA(t,n,e)),{},{selection:IA(e,!1)})}}));case 3:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)}),onClose:function(){W=!1,ot()}}))}function Be(){X.selection&&qe(PA(l,X.selection))}function Le(e){if(void 0!==l){var t=e.id,n=e.onTransform,r=e.onClose,i=e.rootPath||[];W=!0,V({id:t||h,json:l,rootPath:i,onTransform:function(e){n?n({operations:e,json:l,transformedJson:oc(l,e)}):(o("onTransform",i,e),Ke(e,(function(e,t){return{state:Ro(Ro({},fA(e,t,i)),{},{selection:IA(i,!1)})}})))},onClose:function(){W=!1,ot(),r&&r()}})}}function Fe(){X.selection&&Le({rootPath:PA(l,X.selection)})}function Ve(e){return He.apply(this,arguments)}function He(){return He=ko(wo().mark((function e(t){var r,i,s,c,u,f=arguments;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!(f.length>1&&void 0!==f[1])||f[1],n(12,X=WM(l,X,t)),e.next=4,ca();case 4:if(i=We(t),o("scrollTo",{path:t,elem:i,refContents:a}),i&&a){e.next=8;break}return e.abrupt("return",Promise.resolve());case 8:if(s=a.getBoundingClientRect(),c=i.getBoundingClientRect(),r){e.next=13;break}if(!(c.bottom>s.top&&c.topn.bottom-20&&y(t,{container:a,offset:-(n.height-o-20),duration:0})}}function Je(e,t){var n;if(void 0!==e.json||void 0!==(null==e?void 0:e.text))if(void 0!==u)null===(n=T)||void 0===n||n({text:u,json:void 0},e,{contentErrors:ue(),patchResult:t});else if(void 0!==l){var r;null===(r=T)||void 0===r||r({text:void 0,json:l},e,{contentErrors:ue(),patchResult:t})}}function Ke(e,t){o("handlePatch",e,t);var n={json:l,text:u},r=ge(e,t);return Je(n,r),r}function Ge(e,t){var r=X,o=l,i=u,a={json:l,text:u},s=ae,c=UM(l,X,[],dA),f="function"==typeof t?t(e,c):void 0;n(11,l=f&&void 0!==f.json?f.json:e),n(12,X=f&&void 0!==f.state?f.state:c),n(18,u=void 0),n(23,ae=!1),U=void 0,pe(l),me({previousJson:o,previousState:r,previousText:i,previousTextIsRepaired:s});Je(a,null)}function Qe(e,t){o("handleChangeText");var r=X,i=l,a=u,s={json:l,text:u},c=ae;try{n(11,l=_(e)),n(12,X=UM(l,X,[],dA)),n(18,u=void 0),n(23,ae=!1),U=void 0}catch(t){try{n(11,l=_(Wl(e))),n(12,X=UM(l,X,[],dA)),n(18,u=e),n(23,ae=!0),U=void 0}catch(r){n(11,l=void 0),n(12,X=FM({json:l,expand:dA})),n(18,u=e),n(23,ae=!1),U=""!==u?U_(u,t.message||String(t)):void 0}}if("function"==typeof t){var f=t(l,X);n(11,l=f&&f.json?f.json:l),n(12,X=f&&f.state?f.state:X)}pe(l),me({previousJson:i,previousState:r,previousText:a,previousTextIsRepaired:c});Je(s,null)}function Ye(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o("expand",{path:e,expanded:t,recursive:r}),n(12,X=t?r?UM(l,X,e,hA):function(e,t){return Ro(Ro({},e),{},{expandedMap:Ro(Ro({},e.expandedMap),{},zo({},ec(t),!0))})}(X,e):JM(X,e)),X.selection&&!t&&function(e,t){return TA(GA(e),t)&&(GA(e).length>t.length||pA(e))}(X.selection,e)&&J(null),ot()}function Xe(e){o("openFind",{findAndReplace:e}),n(13,Z=!1),n(21,ee=!1),ca().then((function(){n(13,Z=!0),n(21,ee=e)}))}function Ze(e,t){o("handleExpandSection",e,t);var r=ec(e);n(12,X=function(e,t,n,r){return Ro(Ro({},t),{},{visibleSectionsMap:Ro(Ro({},t.visibleSectionsMap),{},zo({},n,zM(VM(t,n).concat(r))))})}(0,X,r,t))}function et(e){o("pasted json as text",e),n(19,G=e)}function tt(e){var t=e.anchor,n=e.left,r=e.top,o=e.width,i=e.height,a=e.offsetTop,s=e.offsetLeft,c=e.showTip,u=function(e){var t=e.json,n=e.documentState,r=e.readOnly,o=e.parser,i=e.onEditKey,a=e.onEditValue,s=e.onToggleEnforceString,c=e.onCut,l=e.onCopy,u=e.onPaste,f=e.onRemove,d=e.onDuplicate,h=e.onExtract,v=e.onInsertBefore,p=e.onInsert,m=e.onConvert,g=e.onInsertAfter,y=e.onSort,b=e.onTransform,w=n.selection,x=void 0!==t,k=!!w,j=!!w&&Ax(GA(w)),S=w?Us(t,GA(w)):void 0,C=Array.isArray(S)?"Edit array":Ql(S)?"Edit object":"Edit value",$=x&&(yA(w)||mA(w)||gA(w)),_=!r&&x&&null!=w&&EA(w)&&!j&&!Array.isArray(Us(t,Zw(GA(w)))),O=!r&&x&&null!=w&&EA(w),M=O&&!Yl(S),A=!r&&$,E=$,P=!r&&k,T=!r&&x&&$&&!j,R=!r&&x&&null!=w&&(yA(w)||gA(w))&&!j,N=$,I=N?"Convert to:":"Insert:",D=!r&&!N&&k,z=!r&&(N?VA(w)&&!Ql(S):k),q=!r&&(N?VA(w)&&!Array.isArray(S):k),B=!r&&(N?VA(w)&&Yl(S):k),L=!(null==w||!S)&&aA(S,n.enforceStringMap,ec(GA(w)),o);function F(e){$?"structure"!==e&&m(e):p(e)}return[{type:"row",items:[{type:"button",onClick:function(){return i()},icon:gP,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!_},{type:"dropdown-button",main:{type:"button",onClick:function(){return a()},icon:gP,text:C,title:"Edit the value (Double-click on the value)",disabled:!O},width:"11em",items:[{type:"button",icon:gP,text:C,title:"Edit the value (Double-click on the value)",onClick:function(){return a()},disabled:!O},{type:"button",icon:L?aP:dP,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:function(){return s()},disabled:!M}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:function(){return c(!0)},icon:rP,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!A},width:"10em",items:[{type:"button",icon:rP,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:function(){return c(!0)},disabled:!A},{type:"button",icon:rP,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:function(){return c(!1)},disabled:!A}]},{type:"dropdown-button",main:{type:"button",onClick:function(){return l(!0)},icon:AP,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!E},width:"12em",items:[{type:"button",icon:AP,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:function(){return l(!0)},disabled:!E},{type:"button",icon:AP,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:function(){return l(!1)},disabled:!E}]},{type:"button",onClick:function(){return u()},icon:tP,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!P}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:function(){return d()},icon:IP,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!T},{type:"button",onClick:function(){return h()},icon:wP,text:"Extract",title:"Extract selected contents",disabled:!R},{type:"button",onClick:function(){return y()},icon:CP,text:"Sort",title:"Sort array or object contents",disabled:r||!$},{type:"button",onClick:function(){return b()},icon:hP,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:r||!$},{type:"button",onClick:function(){return f()},icon:ZE,text:"Remove",title:"Remove selected contents (Delete)",disabled:r||!$}]},{type:"column",items:[{type:"label",text:I},{type:"button",onClick:function(){return F("structure")},icon:N?SP:EP,text:"Structure",title:I+" structure",disabled:!D},{type:"button",onClick:function(){return F("object")},icon:N?SP:EP,text:"Object",title:I+" structure",disabled:!z},{type:"button",onClick:function(){return F("array")},icon:N?SP:EP,text:"Array",title:I+" array",disabled:!q},{type:"button",onClick:function(){return F("value")},icon:N?SP:EP,text:"Value",title:I+" value",disabled:!B}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:function(){return v()},icon:uP,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:r||!$||j},{type:"button",onClick:function(){return g()},icon:oP,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:r||!$||j}]}]}({json:l,documentState:X,readOnly:b,parser:$,onEditKey:ye,onEditValue:be,onToggleEnforceString:we,onCut:xe,onCopy:je,onPaste:Ce,onRemove:_e,onDuplicate:Oe,onExtract:Me,onInsertBefore:Te,onInsert:Ee,onInsertAfter:Re,onConvert:Pe,onSort:Be,onTransform:Fe}),f=z(u);if(!1!==f){var d={left:n,top:r,offsetTop:a,offsetLeft:s,width:o,height:i,anchor:t,closeOnOuterClick:!0,onClose:function(){W=!1,ot()}};W=!0;var h=p(dL,{tip:c?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0,items:f,onRequestClose:function(){return m(h)}},d)}}function nt(e){if(!LA(X.selection)){if(e&&(e.stopPropagation(),e.preventDefault()),e&&"contextmenu"===e.type&&e.target!==s)tt({left:e.clientX,top:e.clientY,width:Ms,height:Os,showTip:!1});else{var t,n=null===(t=a)||void 0===t?void 0:t.querySelector(".jse-context-menu-pointer.jse-selected");if(n)tt({anchor:n,offsetTop:2,width:Ms,height:Os,showTip:!1});else{var r,o=null===(r=a)||void 0===r?void 0:r.getBoundingClientRect();o&&tt({top:o.top+2,left:o.left+2,width:Ms,height:Os,showTip:!1})}}return!1}}function rt(){return(rt=ko(wo().mark((function e(){var t,r,i,s,c;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o("apply pasted json",G),G){e.next=3;break}return e.abrupt("return");case 3:i=(r=G).path,s=r.contents,n(19,G=void 0),TO(c=(null===(t=a)||void 0===t?void 0:t.querySelector(".jse-editable-div"))||null)&&c.cancel(),Ke([{op:"replace",path:ec(i),value:s}],(function(e,t){return{state:fA(e,t,i)}})),setTimeout(ot);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ot(){o("focus"),s&&(s.focus(),s.select())}function it(e){return function(e,t,n){var r=Zw(n),o=[gb(n)],i=Us(e,r),a=i?uA(i,t,o):void 0;return a?IA(r.concat(a),!1):zA(n)}(l,X,e)}function at(e){r&&r.onDrag(e)}function st(){r&&r.onDragEnd()}return e.$$set=function(e){"readOnly"in e&&n(0,b=e.readOnly),"externalContent"in e&&n(49,w=e.externalContent),"externalSelection"in e&&n(50,x=e.externalSelection),"mainMenuBar"in e&&n(1,k=e.mainMenuBar),"navigationBar"in e&&n(2,j=e.navigationBar),"escapeControlCharacters"in e&&n(51,S=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(52,C=e.escapeUnicodeCharacters),"parser"in e&&n(3,$=e.parser),"parseMemoizeOne"in e&&n(53,_=e.parseMemoizeOne),"validator"in e&&n(54,O=e.validator),"validationParser"in e&&n(55,M=e.validationParser),"pathParser"in e&&n(4,A=e.pathParser),"indentation"in e&&n(5,E=e.indentation),"onError"in e&&n(6,P=e.onError),"onChange"in e&&n(56,T=e.onChange),"onChangeMode"in e&&n(57,R=e.onChangeMode),"onSelect"in e&&n(58,N=e.onSelect),"onRenderValue"in e&&n(59,I=e.onRenderValue),"onRenderMenu"in e&&n(7,D=e.onRenderMenu),"onRenderContextMenu"in e&&n(60,z=e.onRenderContextMenu),"onClassName"in e&&n(61,q=e.onClassName),"onFocus"in e&&n(62,B=e.onFocus),"onBlur"in e&&n(63,L=e.onBlur),"onSortModal"in e&&n(64,F=e.onSortModal),"onTransformModal"in e&&n(65,V=e.onTransformModal),"onJSONEditorModal"in e&&n(66,H=e.onJSONEditorModal)},e.$$.update=function(){3145728&e.$$.dirty[1]&&n(74,K=cO({escapeControlCharacters:S,escapeUnicodeCharacters:C})),4096&e.$$.dirty[0]&&o("selection",X.selection),8192&e.$$.dirty[0]&&function(e){if(a)if(e){var t,r=null!==(t=parseInt(getComputedStyle(a).padding))&&void 0!==t?t:0;n(10,a.style.overflowAnchor="none",a),n(10,a.style.paddingTop=r+As+"px",a),n(10,a.scrollTop+=As,a),n(10,a.style.overflowAnchor="",a)}else n(10,a.style.overflowAnchor="none",a),n(10,a.style.paddingTop="",a),n(10,a.scrollTop-=As,a),n(10,a.style.overflowAnchor="",a)}(Z),262144&e.$$.dirty[1]&&he(w),524288&e.$$.dirty[1]&&function(e){Ex(X.selection,e)||(o("applyExternalSelection",e),(wA(e)||null===e)&&J(e))}(x),2056&e.$$.dirty[0]|25165824&e.$$.dirty[1]&&le(l,O,$,M),16384&e.$$.dirty[0]&&n(24,oe=function(e){var t={};return e.forEach((function(e){t[ec(e.path)]=e})),e.forEach((function(e){for(var n=e.path;n.length>0;){var r=ec(n=Zw(n));r in t||(t[r]={isChildError:!0,path:n,message:"Contains invalid data",severity:Za.warning})}})),t}(se)),1024&e.$$.dirty[0]&&(r=a?function(e){var t,n;function r(e){return e<20?is:e<50?as:ss}function o(){if(e){var n=(t||0)*(os/1e3);e.scrollTop+=n}}function i(e){n&&e===t||(a(),kN("startAutoScroll",e),t=e,n=setInterval(o,os))}function a(){n&&(kN("stopAutoScroll"),clearInterval(n),n=void 0,t=void 0)}return kN("createAutoScrollHandler",e),{onDrag:function(t){if(e){var n=t.clientY,o=e.getBoundingClientRect(),s=o.top,c=o.bottom;nc?i(r(n-c)):a()}},onDragEnd:function(){a()}}}(a):void 0),9&e.$$.dirty[0]|1342177280&e.$$.dirty[1]|4096&e.$$.dirty[2]&&n(15,ie={readOnly:b,parser:$,normalization:K,getJson:fe,getDocumentState:de,findElement:We,findNextInside:it,focus:ot,onPatch:Ke,onInsert:Ae,onExpand:Ye,onSelect:J,onFind:Xe,onExpandSection:Ze,onPasteJson:et,onRenderValue:I,onContextMenu:tt,onClassName:q||function(){},onDrag:at,onDragEnd:st}),32768&e.$$.dirty[0]&&o("context changed",ie)},[b,k,j,$,A,E,P,D,function(){return ae&&void 0!==l&&Ge(l),void 0!==l?{json:l}:{text:u||""}},ot,a,l,X,Z,se,ie,s,c,u,G,Q,ee,re,ae,oe,i,function(e){n(20,Q=e)},function(e){return te.apply(this,arguments)},function(){n(13,Z=!1),n(21,ee=!1),ot()},function(e){o("select validation error",e),J(IA(e.path,!1)),Ve(e.path)},je,function(e){var t;e.preventDefault();var n=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");void 0!==n&&nB({clipboardText:n,json:l,selection:X.selection,readOnly:b,parser:$,onPatch:Ke,onChangeText:Qe,openRepairModal:$e})},Ne,De,ze,function(){qe([])},function(){Le({rootPath:[]})},Ke,function(){Ye([],!0,!0)},function(){Ye([],!1,!0)},function(e){var t=RO(e),n=e.shiftKey;if(o("keydown",{combo:t,key:e.key}),"Ctrl+X"===t&&(e.preventDefault(),xe(!0)),"Ctrl+Shift+X"===t&&(e.preventDefault(),xe(!1)),"Ctrl+C"===t&&(e.preventDefault(),je(!0)),"Ctrl+Shift+C"===t&&(e.preventDefault(),je(!1)),"Ctrl+D"===t&&(e.preventDefault(),Oe()),"Delete"!==t&&"Backspace"!==t||(e.preventDefault(),_e()),"Insert"===t&&(e.preventDefault(),Ae("structure")),"Ctrl+A"===t&&(e.preventDefault(),J(IA([],!1))),"Ctrl+Q"===t&&nt(e),"ArrowUp"===t||"Shift+ArrowUp"===t){e.preventDefault();var r=X.selection?$A(l,X,n)||X.selection:OA(l,X);J(r),Ue(GA(r))}if("ArrowDown"===t||"Shift+ArrowDown"===t){e.preventDefault();var i=X.selection?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.selection;if(!r)return null;var o=n?GA(r):CA(e,r),i=Yl(Us(e,o))?JM(t,o):t,a=uA(e,t,o),s=uA(e,i,o);if(n)return pA(r)?null!==a?qA(a,a):null:vA(r)?null!==s?qA(s,s):null:null!==s?qA(QA(r),s):null;if(vA(r))return null!==s?IA(s,!1):null;if(pA(r))return null!==a?IA(a,!1):null;if(gA(r))return null!==a?IA(a,!1):null;if(mA(r)){if(null===a||0===a.length)return null;var c=Us(e,Zw(a));return Array.isArray(c)?IA(a,!1):NA(a,!1)}return yA(r)?null!==s?IA(s,!1):null!==a?IA(a,!1):null:null}(l,X,n)||X.selection:OA(l,X);J(i),Ue(GA(i))}if("ArrowLeft"===t||"Shift+ArrowLeft"===t){e.preventDefault();var a=X.selection?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=t.selection;if(!o)return null;var i=_A(e,t,r),a=i.caret,s=i.previous;if(n)return yA(o)?null:qA(o.path,o.path);if(a&&s)return HA(s);var c=Us(e,Zw(GA(o)));return gA(o)&&Array.isArray(c)?qA(o.path,o.path):yA(o)&&!Array.isArray(c)?NA(o.focusPath,!1):null}(l,X,n,!b)||X.selection:OA(l,X);J(a),Ue(GA(a))}if("ArrowRight"===t||"Shift+ArrowRight"===t){e.preventDefault();var s=X.selection&&void 0!==l?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=t.selection;if(!o)return null;var i=_A(e,t,r),a=i.caret,s=i.next;return n?yA(o)?null:qA(o.path,o.path):a&&s?HA(s):yA(o)?IA(o.focusPath,!1):null}(l,X,n,!b)||X.selection:OA(l,X);J(s),Ue(GA(s))}if("Enter"===t&&X.selection){if(bA(X.selection)){var c=X.selection.focusPath,u=Us(l,Zw(c));Array.isArray(u)&&J(IA(c,!1))}if(mA(X.selection)&&(e.preventDefault(),J(Ro(Ro({},X.selection),{},{edit:!0}))),gA(X.selection))e.preventDefault(),Yl(Us(l,X.selection.path))?Ye(X.selection.path,!0):J(Ro(Ro({},X.selection),{},{edit:!0}))}if(1===t.replace(/^Shift\+/,"").length&&X.selection)return e.preventDefault(),void Ne(e.key);if("Enter"===t&&(vA(X.selection)||pA(X.selection)))return e.preventDefault(),void Ne("");if("Ctrl+Enter"===t&&gA(X.selection)){var f=Us(l,X.selection.path);ru(f)&&window.open(String(f),"_blank")}"Escape"===t&&X.selection&&(e.preventDefault(),J(null)),"Ctrl+F"===t&&(e.preventDefault(),Xe(!1)),"Ctrl+H"===t&&(e.preventDefault(),Xe(!0)),"Ctrl+Z"===t&&(e.preventDefault(),De()),"Ctrl+Shift+Z"===t&&(e.preventDefault(),ze())},function(e){o("handleMouseDown",e);var t=e.target;wO(t,"BUTTON")||t.isContentEditable||(ot(),X.selection||void 0!==l||""!==u&&void 0!==u||(o("createDefaultSelection"),n(12,X=Ro(Ro({},X),{},{selection:IA([],!1)}))))},nt,function(e){tt({anchor:OO(e.target,"BUTTON"),offsetTop:0,width:Ms,height:Os,showTip:!0})},function(){return rt.apply(this,arguments)},function(){o("clear pasted json"),n(19,G=void 0),ot()},function(){R(Qa.text)},function(e){J(e),ot(),Ve(GA(e))},function(e){var t=!kO(e.target,(function(e){return e===c}));t&&LA(X.selection)&&(o("click outside the editor, stop edit mode"),J((function(e){return mA(e)||gA(e)?Ro(Ro({},e),{},{edit:!1}):e})),g&&s&&(s.focus(),s.blur()),o("blur (outside editor)"),s&&s.blur())},w,x,S,C,_,O,M,T,R,N,I,z,q,B,L,F,V,H,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hA;o("expand");var t=Ro(Ro({},X),{},{expandedMap:{},visibleSectionsMap:{}});n(12,X=UM(l,t,[],e))},ue,fe,ge,Le,Ve,We,K,function(e){n(13,Z=e)},function(e){na[e?"unshift":"push"]((function(){n(16,s=e)}))},function(){ot(),Ne("{")},function(){ot(),Ne("[")},function(){ot()},function(e){na[e?"unshift":"push"]((function(){n(10,a=e)}))},function(e){na[e?"unshift":"push"]((function(){n(17,c=e)}))}]}var _L=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,$L,CL,Zo,{readOnly:0,externalContent:49,externalSelection:50,mainMenuBar:1,navigationBar:2,escapeControlCharacters:51,escapeUnicodeCharacters:52,parser:3,parseMemoizeOne:53,validator:54,validationParser:55,pathParser:4,indentation:5,onError:6,onChange:56,onChangeMode:57,onSelect:58,onRenderValue:59,onRenderMenu:7,onRenderContextMenu:60,onClassName:61,onFocus:62,onBlur:63,onSortModal:64,onTransformModal:65,onJSONEditorModal:66,expand:67,validate:68,getJson:69,patch:70,acceptAutoRepair:8,openTransformModal:71,scrollTo:72,findElement:73,focus:9},vL,[-1,-1,-1,-1,-1]),n}return Eo(t,Ia),Do(t,[{key:"expand",get:function(){return this.$$.ctx[67]}},{key:"validate",get:function(){return this.$$.ctx[68]}},{key:"getJson",get:function(){return this.$$.ctx[69]}},{key:"patch",get:function(){return this.$$.ctx[70]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[71]}},{key:"scrollTo",get:function(){return this.$$.ctx[72]}},{key:"findElement",get:function(){return this.$$.ctx[73]}},{key:"focus",get:function(){return this.$$.ctx[9]}}]),t}();function OL(e){return"object"!==Ho(t=e)||null===t?e:new Proxy(e,{get:function(e,t,n){return OL(Reflect.get(e,t,n))},set:function(){return!1},deleteProperty:function(){return!1}});var t}function ML(e){mi(e,"svelte-l4qqoi",'.jse-modal.svelte-l4qqoi.svelte-l4qqoi{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);line-height:normal;background:var(--jse-modal-background, #f5f5f5);color:var(--jse-text-color, #4d4d4d)}.jse-modal.svelte-l4qqoi .svelte-select{--border:var(--jse-svelte-select-border, 1px solid #d8dbdf);--item-is-active-bg:var(--jse-item-is-active-bg, #3883fa);--border-radius:var(--jse-svelte-select-border-radius, 3px);--background:var(--jse-svelte-select-background, #fff);--padding:var(--jse-svelte-select-padding, 0 10px);--multi-select-padding:var(--jse-svelte-select-multi-select-padding, 0 10px);--font-size:var(--jse-svelte-select-font-size, var(--jse-font-size, 16px));--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px}.jse-modal.svelte-l4qqoi .jse-modal-contents.svelte-l4qqoi{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-l4qqoi .jse-modal-contents .jse-actions.svelte-l4qqoi{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding, 10px)}.jse-modal.svelte-l4qqoi .jse-modal-contents .jse-actions button.jse-primary.svelte-l4qqoi{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;background:var(--jse-button-primary-background, var(--jse-theme-color, #3883fa));color:var(--jse-button-primary-color, #fff);padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px));border-radius:3px}.jse-modal.svelte-l4qqoi .jse-modal-contents .jse-actions button.jse-primary.svelte-l4qqoi:hover{background:var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff))}.jse-modal.svelte-l4qqoi .jse-modal-contents .jse-actions button.jse-primary.svelte-l4qqoi:disabled{background:var(--jse-button-primary-background-disabled, #9d9d9d)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-overlay-background, rgba(0, 0, 0, 0.3))}.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:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents.svelte-l4qqoi{color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents.svelte-l4qqoi{flex:1;display:flex;gap:calc(2 * var(--jse-padding, 10px));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding, 10px)) var(--jse-padding, 10px)}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-l4qqoi{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-l4qqoi p{margin:var(--jse-padding, 10px) 0}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-l4qqoi p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-l4qqoi p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-l4qqoi code{background:var(--jse-modal-code-background, rgba(0, 0, 0, 0.05));font-family:var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace);font-size:var(--jse-font-size-mono, 14px)}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-l4qqoi{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-l4qqoi{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding, 10px))}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-l4qqoi{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-l4qqoi{flex:none}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-l4qqoi{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-l4qqoi{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-actions.svelte-l4qqoi{padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px)) calc(2 * var(--jse-padding, 10px))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents.svelte-l4qqoi{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-l4qqoi{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-l4qqoi .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-l4qqoi .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-l4qqoi .jse-label.svelte-l4qqoi{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-l4qqoi .jse-label .jse-label-inner.svelte-l4qqoi{margin-top:calc(2 * var(--jse-padding, 10px));margin-bottom:calc(0.5 * var(--jse-padding, 10px));box-sizing:border-box}.jse-modal.jse-transform.svelte-l4qqoi .jse-label .jse-label-inner button.svelte-l4qqoi{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-l4qqoi .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly, transparent);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border, 1px solid #d8dbdf)}.jse-modal.jse-transform.svelte-l4qqoi input.svelte-l4qqoi,.jse-modal.jse-transform.svelte-l4qqoi textarea.svelte-l4qqoi{border:var(--jse-input-border, 1px solid #d8dbdf);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding, 10px));font-family:var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace);font-size:var(--jse-font-size-mono, 14px);color:inherit;background:var(--jse-input-background, var(--jse-background-color, #fff))}.jse-modal.jse-transform.svelte-l4qqoi input.svelte-l4qqoi:focus,.jse-modal.jse-transform.svelte-l4qqoi textarea.svelte-l4qqoi:focus{border:var(--jse-input-border-focus, 1px solid var(--jse-input-border-focus, var(--jse-theme-color, #3883fa)))}.jse-modal.jse-transform.svelte-l4qqoi input.svelte-l4qqoi:read-only,.jse-modal.jse-transform.svelte-l4qqoi textarea.svelte-l4qqoi:read-only{background:var(--jse-input-background-readonly, transparent)}.jse-modal.jse-transform.svelte-l4qqoi .jse-preview.jse-error.svelte-l4qqoi{flex:1;background:var(--jse-input-background-readonly, transparent);border:var(--jse-input-border, 1px solid #d8dbdf);color:var(--jse-error-color, #ee5341);padding:calc(0.5 * var(--jse-padding, 10px))}.jse-modal.jse-transform.svelte-l4qqoi a{color:var(--jse-a-color, #156fc5)}.jse-modal.jse-transform.svelte-l4qqoi a:hover{color:var(--jse-a-color-highlight, #0f508d)}')}function AL(e){var t,n,r,o,i,a=[PL,EL],s=[];function c(e,n){return 16384&n[0]&&(t=null),null==t&&(t=!!Array.isArray(e[14])),t?0:1}return n=c(e,[-1,-1]),r=s[n]=a[n](e),{c:function(){r.c(),o=_i()},m:function(e,t){s[n].m(e,t),wi(e,o,t),i=!0},p:function(e,t){var i=n;(n=c(e,t))===i?s[n].p(e,t):(ba(),ka(s[i],1,1,(function(){s[i]=null})),wa(),(r=s[n])?r.p(e,t):(r=s[n]=a[n](e)).c(),xa(r,1),r.m(o.parentNode,o))},i:function(e){i||(xa(r),i=!0)},o:function(e){ka(r),i=!1},d:function(e){e&&xi(o),s[n].d(e)}}}function EL(e){var t;return{c:function(){t=Ci("(Only available for arrays, not for objects)")},m:function(e,n){wi(e,t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function PL(e){var t,n;return t=new cN({props:{queryOptions:e[15],json:e[14],onChange:e[24]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};32768&n[0]&&(r.queryOptions=e[15]),16384&n[0]&&(r.json=e[14]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function TL(e){var t,n;return t=new _L({props:{externalContent:e[17],externalSelection:null,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:e[11],onRenderContextMenu:e[12],onError:console.error,onChange:Af,onChangeMode:Af,onSelect:Af,onFocus:Af,onBlur:Af,onSortModal:Af,onTransformModal:Af,onJSONEditorModal:Af,onClassName:e[13],validator:null,validationParser:e[7],pathParser:e[8]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};131072&n[0]&&(r.externalContent=e[17]),4&n[0]&&(r.indentation=e[2]),8&n[0]&&(r.escapeControlCharacters=e[3]),16&n[0]&&(r.escapeUnicodeCharacters=e[4]),32&n[0]&&(r.parser=e[5]),64&n[0]&&(r.parseMemoizeOne=e[6]),1024&n[0]&&(r.onRenderValue=e[10]),2048&n[0]&&(r.onRenderMenu=e[11]),4096&n[0]&&(r.onRenderContextMenu=e[12]),8192&n[0]&&(r.onClassName=e[13]),128&n[0]&&(r.validationParser=e[7]),256&n[0]&&(r.pathParser=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function RL(e){var t,n;return{c:function(){t=ji("div"),n=Ci(e[20]),Ei(t,"class","jse-preview jse-error svelte-l4qqoi")},m:function(e,r){wi(e,t,r),pi(t,n)},p:function(e,t){1048576&t[0]&&Ni(n,e[20])},i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function NL(e){var t,n;return t=new _L({props:{externalContent:e[21],externalSelection:null,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:e[11],onRenderContextMenu:e[12],onError:console.error,onChange:Af,onChangeMode:Af,onSelect:Af,onFocus:Af,onBlur:Af,onSortModal:Af,onTransformModal:Af,onJSONEditorModal:Af,onClassName:e[13],validator:null,validationParser:e[7],pathParser:e[8]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};2097152&n[0]&&(r.externalContent=e[21]),4&n[0]&&(r.indentation=e[2]),8&n[0]&&(r.escapeControlCharacters=e[3]),16&n[0]&&(r.escapeUnicodeCharacters=e[4]),32&n[0]&&(r.parser=e[5]),64&n[0]&&(r.parseMemoizeOne=e[6]),1024&n[0]&&(r.onRenderValue=e[10]),2048&n[0]&&(r.onRenderMenu=e[11]),4096&n[0]&&(r.onRenderContextMenu=e[12]),8192&n[0]&&(r.onClassName=e[13]),128&n[0]&&(r.validationParser=e[7]),256&n[0]&&(r.pathParser=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function IL(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M,A,E,P,T,R,N,I,D,z,q,B,L,F,V,H,W,U,J,K=e[23](e[0]).description+"";t=new xN({props:{queryLanguages:e[9],queryLanguageId:e[0],onChangeQueryLanguage:e[29]}}),y=new CM({props:{data:e[18]?kP:eP}});var G=e[18]&&AL(e);E=new CM({props:{data:e[19]?kP:eP}});var Q=e[19]&&TL(e),Y=[NL,RL],X=[];function Z(e,t){return e[20]?1:0}return z=Z(e),q=X[z]=Y[z](e),{c:function(){Pa(t.$$.fragment),n=$i(),r=ji("div"),o=ji("div"),i=ji("div"),(a=ji("div")).innerHTML='
Language
',s=$i(),c=ji("div"),l=$i(),(u=ji("div")).innerHTML='
Path
',f=$i(),d=ji("input"),v=$i(),p=ji("div"),m=ji("div"),g=ji("button"),Pa(y.$$.fragment),b=Ci("\n Wizard"),w=$i(),G&&G.c(),x=$i(),(k=ji("div")).innerHTML='
Query
',j=$i(),S=ji("textarea"),C=$i(),$=ji("div"),_=ji("div"),O=ji("div"),M=ji("div"),A=ji("button"),Pa(E.$$.fragment),P=Ci("\n Original"),T=$i(),Q&&Q.c(),R=$i(),N=ji("div"),(I=ji("div")).innerHTML='
Preview
',D=$i(),q.c(),B=$i(),L=ji("div"),F=ji("button"),V=Ci("Transform"),Ei(a,"class","jse-label svelte-l4qqoi"),Ei(c,"class","jse-description svelte-l4qqoi"),Ei(u,"class","jse-label svelte-l4qqoi"),Ei(d,"class","jse-path svelte-l4qqoi"),Ei(d,"type","text"),d.readOnly=!0,Ei(d,"title","Selected path"),d.value=h=Ax(e[1])?"(document root)":GO(e[1]),Ei(g,"type","button"),Ei(g,"class","svelte-l4qqoi"),Ei(m,"class","jse-label-inner svelte-l4qqoi"),Ei(p,"class","jse-label svelte-l4qqoi"),Ei(k,"class","jse-label svelte-l4qqoi"),Ei(S,"class","jse-query svelte-l4qqoi"),Ei(S,"spellcheck","false"),S.value=e[16],Ei(i,"class","jse-query-contents svelte-l4qqoi"),Ei(A,"type","button"),Ei(A,"class","svelte-l4qqoi"),Ei(M,"class","jse-label-inner svelte-l4qqoi"),Ei(O,"class","jse-label svelte-l4qqoi"),Ei(_,"class","jse-original-data svelte-l4qqoi"),qi(_,"jse-hide",!e[19]),Ei(I,"class","jse-label svelte-l4qqoi"),Ei(N,"class","jse-preview-data svelte-l4qqoi"),Ei($,"class","jse-data-contents svelte-l4qqoi"),qi($,"jse-hide-original-data",!e[19]),Ei(o,"class","jse-main-contents svelte-l4qqoi"),Ei(F,"type","button"),Ei(F,"class","jse-primary svelte-l4qqoi"),F.disabled=H=!!e[20],Ei(L,"class","jse-actions svelte-l4qqoi"),Ei(r,"class","jse-modal-contents svelte-l4qqoi")},m:function(h,q){Ta(t,h,q),wi(h,n,q),wi(h,r,q),pi(r,o),pi(o,i),pi(i,a),pi(i,s),pi(i,c),c.innerHTML=K,pi(i,l),pi(i,u),pi(i,f),pi(i,d),pi(i,v),pi(i,p),pi(p,m),pi(m,g),Ta(y,g,null),pi(g,b),pi(i,w),G&&G.m(i,null),pi(i,x),pi(i,k),pi(i,j),pi(i,S),pi(o,C),pi(o,$),pi($,_),pi(_,O),pi(O,M),pi(M,A),Ta(E,A,null),pi(A,P),pi(_,T),Q&&Q.m(_,null),pi($,R),pi($,N),pi(N,I),pi(N,D),X[z].m(N,null),pi(r,B),pi(r,L),pi(L,F),pi(F,V),W=!0,U||(J=[Oi(g,"click",e[27]),Oi(S,"input",e[25]),Oi(A,"click",e[28]),Oi(F,"click",e[26]),ci(zL.call(null,F))],U=!0)},p:function(e,n){var r={};512&n[0]&&(r.queryLanguages=e[9]),1&n[0]&&(r.queryLanguageId=e[0]),t.$set(r),(!W||1&n[0])&&K!==(K=e[23](e[0]).description+"")&&(c.innerHTML=K),(!W||2&n[0]&&h!==(h=Ax(e[1])?"(document root)":GO(e[1]))&&d.value!==h)&&(d.value=h);var o={};262144&n[0]&&(o.data=e[18]?kP:eP),y.$set(o),e[18]?G?(G.p(e,n),262144&n[0]&&xa(G,1)):((G=AL(e)).c(),xa(G,1),G.m(i,x)):G&&(ba(),ka(G,1,1,(function(){G=null})),wa()),(!W||65536&n[0])&&(S.value=e[16]);var a={};524288&n[0]&&(a.data=e[19]?kP:eP),E.$set(a),e[19]?Q?(Q.p(e,n),524288&n[0]&&xa(Q,1)):((Q=TL(e)).c(),xa(Q,1),Q.m(_,null)):Q&&(ba(),ka(Q,1,1,(function(){Q=null})),wa()),(!W||524288&n[0])&&qi(_,"jse-hide",!e[19]);var s=z;(z=Z(e))===s?X[z].p(e,n):(ba(),ka(X[s],1,1,(function(){X[s]=null})),wa(),(q=X[z])?q.p(e,n):(q=X[z]=Y[z](e)).c(),xa(q,1),q.m(N,null)),(!W||524288&n[0])&&qi($,"jse-hide-original-data",!e[19]),(!W||1048576&n[0]&&H!==(H=!!e[20]))&&(F.disabled=H)},i:function(e){W||(xa(t.$$.fragment,e),xa(y.$$.fragment,e),xa(G),xa(E.$$.fragment,e),xa(Q),xa(q),W=!0)},o:function(e){ka(t.$$.fragment,e),ka(y.$$.fragment,e),ka(G),ka(E.$$.fragment,e),ka(Q),ka(q),W=!1},d:function(e){e&&(xi(n),xi(r)),Ra(t,e),Ra(y),G&&G.d(),Ra(E),Q&&Q.d(),X[z].d(),U=!1,Qo(J)}}}function DL(e){var t,n,r,o,i;return n=new KO({props:{$$slots:{default:[IL]},$$scope:{ctx:e}}}),{c:function(){t=ji("div"),Pa(n.$$.fragment),Ei(t,"class","jse-modal jse-transform svelte-l4qqoi")},m:function(a,s){wi(a,t,s),Ta(n,t,null),r=!0,o||(i=ci(JI.call(null,t,e[22])),o=!0)},p:function(e,t){var r={};4194303&t[0]|2048&t[1]&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i:function(e){r||(xa(n.$$.fragment,e),r=!0)},o:function(e){ka(n.$$.fragment,e),r=!1},d:function(e){e&&xi(t),Ra(n),o=!1,i()}}}function zL(e){e.focus()}function qL(e,t,n){var r,o,i=Da("jsoneditor:TransformModal"),a=t.id,s=void 0===a?"transform-modal-"+Ts():a,c=t.json,l=t.rootPath,u=void 0===l?[]:l,f=t.indentation,d=t.escapeControlCharacters,h=t.escapeUnicodeCharacters,v=t.parser,p=t.parseMemoizeOne,m=t.validationParser,g=t.pathParser,y=t.queryLanguages,b=t.queryLanguageId,w=t.onChangeQueryLanguage,x=t.onRenderValue,k=t.onRenderMenu,j=t.onRenderContextMenu,S=t.onClassName,C=t.onTransform,$=Zi("simple-modal").close,_="".concat(s,":").concat(ec(u)),O=qP[_]||{},M=!1!==BP.showWizard,A=!1!==BP.showOriginal,E=O.queryOptions||{},P=b===O.queryLanguageId&&O.query?O.query:I(b).createQuery(r,O.queryOptions||{}),T=O.isManual||!1,R=void 0,N={text:""};function I(e){return y.find((function(t){return t.id===e}))||y[0]}var D=Uy((function(e,t){if(void 0===e)return n(21,N={text:""}),void n(20,R="Error: No JSON");try{i("previewTransform",{query:t});var r=I(b).executeQuery(e,t,v);n(21,N={json:r}),n(20,R=void 0)}catch(e){n(21,N={text:""}),n(20,R=String(e))}}),300);return e.$$set=function(e){"id"in e&&n(30,s=e.id),"json"in e&&n(31,c=e.json),"rootPath"in e&&n(1,u=e.rootPath),"indentation"in e&&n(2,f=e.indentation),"escapeControlCharacters"in e&&n(3,d=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(4,h=e.escapeUnicodeCharacters),"parser"in e&&n(5,v=e.parser),"parseMemoizeOne"in e&&n(6,p=e.parseMemoizeOne),"validationParser"in e&&n(7,m=e.validationParser),"pathParser"in e&&n(8,g=e.pathParser),"queryLanguages"in e&&n(9,y=e.queryLanguages),"queryLanguageId"in e&&n(0,b=e.queryLanguageId),"onChangeQueryLanguage"in e&&n(32,w=e.onChangeQueryLanguage),"onRenderValue"in e&&n(10,x=e.onRenderValue),"onRenderMenu"in e&&n(11,k=e.onRenderMenu),"onRenderContextMenu"in e&&n(12,j=e.onRenderContextMenu),"onClassName"in e&&n(13,S=e.onClassName),"onTransform"in e&&n(33,C=e.onTransform)},e.$$.update=function(){2&e.$$.dirty[0]|1&e.$$.dirty[1]&&n(14,r=OL(Us(c,u))),16384&e.$$.dirty[0]&&n(17,o=r?{json:r}:{text:""}),81920&e.$$.dirty[0]&&D(r,P),98305&e.$$.dirty[0]|24&e.$$.dirty[1]&&(n(34,qP[_]={queryOptions:E,query:P,queryLanguageId:b,isManual:T},qP),i("store state in memory",_,qP[_]))},[b,u,f,d,h,v,p,m,g,y,x,k,j,S,r,E,P,o,M,A,R,N,$,I,function(e){n(15,E=e),n(16,P=I(b).createQuery(r,e)),n(35,T=!1),i("updateQueryByWizard",{queryOptions:E,query:P,isManual:T})},function(e){n(16,P=e.target.value),n(35,T=!0),i("handleChangeQuery",{query:P,isManual:T})},function(){if(void 0===r)return n(21,N={text:""}),void n(20,R="Error: No JSON");try{i("handleTransform",{query:P});var e=I(b).executeQuery(r,P,v);C([{op:"replace",path:ec(u),value:e}]),$()}catch(e){console.error(e),n(21,N={text:""}),n(20,R=String(e))}},function(){n(18,M=!M),BP.showWizard=M},function(){n(19,A=!A),BP.showOriginal=A},function(e){i("handleChangeQueryLanguage",e),n(0,b=e),w(e);var t=I(b);n(16,P=t.createQuery(r,E)),n(35,T=!1)},s,c,w,C,qP,T]}var BL=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,qL,DL,Zo,{id:30,json:31,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:32,onRenderValue:10,onRenderMenu:11,onRenderContextMenu:12,onClassName:13,onTransform:33},ML,[-1,-1]),n}return Eo(t,Ia),Do(t)}(),LL={};function FL(e){mi(e,"svelte-qjdk97",'.jse-modal.svelte-qjdk97.svelte-qjdk97{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);line-height:normal;background:var(--jse-modal-background, #f5f5f5);color:var(--jse-text-color, #4d4d4d)}.jse-modal.svelte-qjdk97 .svelte-select{--border:var(--jse-svelte-select-border, 1px solid #d8dbdf);--item-is-active-bg:var(--jse-item-is-active-bg, #3883fa);--border-radius:var(--jse-svelte-select-border-radius, 3px);--background:var(--jse-svelte-select-background, #fff);--padding:var(--jse-svelte-select-padding, 0 10px);--multi-select-padding:var(--jse-svelte-select-multi-select-padding, 0 10px);--font-size:var(--jse-svelte-select-font-size, var(--jse-font-size, 16px));--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px}.jse-modal.svelte-qjdk97 .jse-modal-contents.svelte-qjdk97{flex:1;display:flex;flex-direction:column;padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-qjdk97 .jse-modal-contents .jse-actions.svelte-qjdk97{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding, 10px)}.jse-modal.svelte-qjdk97 .jse-modal-contents .jse-actions button.jse-primary.svelte-qjdk97{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;background:var(--jse-button-primary-background, var(--jse-theme-color, #3883fa));color:var(--jse-button-primary-color, #fff);padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px));border-radius:3px}.jse-modal.svelte-qjdk97 .jse-modal-contents .jse-actions button.jse-primary.svelte-qjdk97:hover{background:var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff))}.jse-modal.svelte-qjdk97 .jse-modal-contents .jse-actions button.jse-primary.svelte-qjdk97:disabled{background:var(--jse-button-primary-background-disabled, #9d9d9d)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-overlay-background, rgba(0, 0, 0, 0.3))}.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:calc(100vh - 6rem);display:flex}.bg.jse-modal-bg .jse-modal-container{flex:1;display:flex;flex-direction:column;padding:0}.jse-modal.jse-sort.svelte-qjdk97 table.svelte-qjdk97{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-qjdk97 table th.svelte-qjdk97,.jse-modal.jse-sort.svelte-qjdk97 table td.svelte-qjdk97{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding, 10px)}.jse-modal.jse-sort.svelte-qjdk97 table th input.jse-path.svelte-qjdk97,.jse-modal.jse-sort.svelte-qjdk97 table td input.jse-path.svelte-qjdk97{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border, 1px solid #d8dbdf);border-radius:var(--jse-input-radius, 3px);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-qjdk97 table th input.jse-path.svelte-qjdk97:read-only,.jse-modal.jse-sort.svelte-qjdk97 table td input.jse-path.svelte-qjdk97:read-only{background:var(--jse-input-background-readonly, transparent)}.jse-modal.jse-sort.svelte-qjdk97 table th.svelte-qjdk97 .svelte-select input,.jse-modal.jse-sort.svelte-qjdk97 table td.svelte-qjdk97 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-qjdk97 .jse-space.svelte-qjdk97{height:200px}.jse-modal.jse-sort.svelte-qjdk97 .jse-space .jse-error.svelte-qjdk97{color:var(--jse-error-color, #ee5341)}')}function VL(e){var t,n,r,o,i,a,s;function c(t){e[14](t)}var l={showChevron:!0,items:e[5]};return void 0!==e[1]&&(l.value=e[1]),i=new oN({props:l}),na.push((function(){return Ea(i,"value",c)})),{c:function(){t=ji("tr"),(n=ji("th")).textContent="Property",r=$i(),o=ji("td"),Pa(i.$$.fragment),Ei(n,"class","svelte-qjdk97"),Ei(o,"class","svelte-qjdk97")},m:function(e,a){wi(e,t,a),pi(t,n),pi(t,r),pi(t,o),Ta(i,o,null),s=!0},p:function(e,t){var n={};32&t&&(n.items=e[5]),!a&&2&t&&(a=!0,n.value=e[1],ua((function(){return a=!1}))),i.$set(n)},i:function(e){s||(xa(i.$$.fragment,e),s=!0)},o:function(e){ka(i.$$.fragment,e),s=!1},d:function(e){e&&xi(t),Ra(i)}}}function HL(e){var t,n;return{c:function(){t=ji("div"),n=Ci(e[4]),Ei(t,"class","jse-error svelte-qjdk97")},m:function(e,r){wi(e,t,r),pi(t,n)},p:function(e,t){16&t&&Ni(n,e[4])},d:function(e){e&&xi(t)}}}function WL(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M,A,E,P,T;r=new rI({props:{title:e[3]?"Sort array items":"Sort object keys"}});var R=e[3]&&(e[5]&&(null===(t=e[5])||void 0===t?void 0:t.length)>1||void 0===e[1])&&VL(e);function N(t){e[15](t)}var I={showChevron:!0,clearable:!1,items:e[7]};void 0!==e[2]&&(I.value=e[2]),k=new oN({props:I}),na.push((function(){return Ea(k,"value",N)}));var D=e[4]&&HL(e);return{c:function(){var t;n=ji("div"),Pa(r.$$.fragment),o=$i(),i=ji("div"),a=ji("table"),(s=ji("colgroup")).innerHTML=' ',c=$i(),l=ji("tbody"),u=ji("tr"),(f=ji("th")).textContent="Path",d=$i(),h=ji("td"),v=ji("input"),m=$i(),R&&R.c(),g=$i(),y=ji("tr"),(b=ji("th")).textContent="Direction",w=$i(),x=ji("td"),Pa(k.$$.fragment),S=$i(),C=ji("div"),D&&D.c(),$=$i(),_=ji("div"),O=ji("button"),M=Ci("Sort"),Ei(f,"class","svelte-qjdk97"),Ei(v,"class","jse-path svelte-qjdk97"),Ei(v,"type","text"),v.readOnly=!0,Ei(v,"title","Selected path"),v.value=p=Ax(e[0])?"(document root)":GO(e[0]),Ei(h,"class","svelte-qjdk97"),Ei(b,"class","svelte-qjdk97"),Ei(x,"class","svelte-qjdk97"),Ei(a,"class","svelte-qjdk97"),Ei(C,"class","jse-space svelte-qjdk97"),Ei(O,"type","button"),Ei(O,"class","jse-primary svelte-qjdk97"),O.disabled=A=!!(e[3]&&e[5]&&(null===(t=e[5])||void 0===t?void 0:t.length)>1)&&!e[1],Ei(_,"class","jse-actions svelte-qjdk97"),Ei(i,"class","jse-modal-contents svelte-qjdk97"),Ei(n,"class","jse-modal jse-sort svelte-qjdk97")},m:function(t,p){wi(t,n,p),Ta(r,n,null),pi(n,o),pi(n,i),pi(i,a),pi(a,s),pi(a,c),pi(a,l),pi(l,u),pi(u,f),pi(u,d),pi(u,h),pi(h,v),pi(l,m),R&&R.m(l,null),pi(l,g),pi(l,y),pi(y,b),pi(y,w),pi(y,x),Ta(k,x,null),pi(i,S),pi(i,C),D&&D.m(C,null),pi(i,$),pi(i,_),pi(_,O),pi(O,M),E=!0,P||(T=[Oi(O,"click",e[8]),ci(UL.call(null,O)),ci(JI.call(null,n,e[6]))],P=!0)},p:function(e,t){var n,o,i=jo(t,1)[0],a={};8&i&&(a.title=e[3]?"Sort array items":"Sort object keys"),r.$set(a),(!E||1&i&&p!==(p=Ax(e[0])?"(document root)":GO(e[0]))&&v.value!==p)&&(v.value=p),e[3]&&(e[5]&&(null===(n=e[5])||void 0===n?void 0:n.length)>1||void 0===e[1])?R?(R.p(e,i),42&i&&xa(R,1)):((R=VL(e)).c(),xa(R,1),R.m(l,g)):R&&(ba(),ka(R,1,1,(function(){R=null})),wa());var s={};!j&&4&i&&(j=!0,s.value=e[2],ua((function(){return j=!1}))),k.$set(s),e[4]?D?D.p(e,i):((D=HL(e)).c(),D.m(C,null)):D&&(D.d(1),D=null),(!E||42&i&&A!==(A=!!(e[3]&&e[5]&&(null===(o=e[5])||void 0===o?void 0:o.length)>1)&&!e[1]))&&(O.disabled=A)},i:function(e){E||(xa(r.$$.fragment,e),xa(R),xa(k.$$.fragment,e),E=!0)},o:function(e){ka(r.$$.fragment,e),ka(R),ka(k.$$.fragment,e),E=!1},d:function(e){e&&xi(n),Ra(r),R&&R.d(),Ra(k),D&&D.d(),P=!1,Qo(T)}}}function UL(e){e.focus()}function JL(e,t,n){var r,o,i,a,s,c=Da("jsoneditor:SortModal"),l=t.id,u=t.json,f=t.rootPath,d=t.onSort,h=Zi("simple-modal").close,v="".concat(l,":").concat(ec(f)),p=Us(u,f),m={value:1,label:"ascending"},g=[m,{value:-1,label:"descending"}],y=null===(r=LL[v])||void 0===r?void 0:r.selectedProperty,b=(null===(o=LL[v])||void 0===o?void 0:o.selectedDirection)||m,w=void 0;return e.$$set=function(e){"id"in e&&n(9,l=e.id),"json"in e&&n(10,u=e.json),"rootPath"in e&&n(0,f=e.rootPath),"onSort"in e&&n(11,d=e.onSort)},e.$$.update=function(){8&e.$$.dirty&&n(13,a=i&&void 0!==p?N_(p):void 0),8192&e.$$.dirty&&n(5,s=a?a.map(YO):void 0),4102&e.$$.dirty&&(n(12,LL[v]={selectedProperty:y,selectedDirection:b},LL),c("store state in memory",v,LL[v]))},n(3,i=Array.isArray(p)),[f,y,b,i,w,s,h,g,function(){try{var e,t,r;n(4,w=void 0);var o=(null===(e=y)||void 0===e?void 0:e.value)||(null===(t=s)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.value)||[],i=null===(r=b)||void 0===r?void 0:r.value,a=Gz(u,f,o,i);d({operations:a,rootPath:f,itemPath:o,direction:i}),h()}catch(e){n(4,w=String(e))}},l,u,d,LL,a,function(e){n(1,y=e)},function(e){n(2,b=e)}]}var KL=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,JL,WL,Zo,{id:9,json:10,rootPath:0,onSort:11},FL),n}return Eo(t,Ia),Do(t)}();function GL(){}function QL(e){var t=arguments.length>1&&void 0!==arguments[1]?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 o=r/t;return o<.9*t?o.toFixed(1)+" GB":(o/t).toFixed(1)+" TB"}function YL(e){var t,n;return t=new DI({props:{items:e[0]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&jo(n,1)[0]&&(r.items=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function XL(e,t,n){var r,o,i=t.readOnly,a=void 0!==i&&i,s=t.onFormat,c=t.onCompact,l=t.onSort,u=t.onTransform,f=t.onToggleSearch,d=t.onUndo,h=t.onRedo,v=t.canUndo,p=t.canRedo,m=t.canFormat,g=t.canCompact,y=t.canSort,b=t.canTransform,w=t.onRenderMenu,x={type:"button",icon:OP,title:"Search (Ctrl+F)",className:"jse-search",onClick:f};return e.$$set=function(e){"readOnly"in e&&n(1,a=e.readOnly),"onFormat"in e&&n(2,s=e.onFormat),"onCompact"in e&&n(3,c=e.onCompact),"onSort"in e&&n(4,l=e.onSort),"onTransform"in e&&n(5,u=e.onTransform),"onToggleSearch"in e&&n(6,f=e.onToggleSearch),"onUndo"in e&&n(7,d=e.onUndo),"onRedo"in e&&n(8,h=e.onRedo),"canUndo"in e&&n(9,v=e.canUndo),"canRedo"in e&&n(10,p=e.canRedo),"canFormat"in e&&n(11,m=e.canFormat),"canCompact"in e&&n(12,g=e.canCompact),"canSort"in e&&n(13,y=e.canSort),"canTransform"in e&&n(14,b=e.canTransform),"onRenderMenu"in e&&n(15,w=e.onRenderMenu)},e.$$.update=function(){32702&e.$$.dirty&&n(16,o=a?[x,{type:"space"}]:[{type:"button",icon:Nz,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:s,disabled:a||!m},{type:"button",icon:Iz,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:c,disabled:a||!g},{type:"separator"},{type:"button",icon:CP,title:"Sort",className:"jse-sort",onClick:l,disabled:a||!y},{type:"button",icon:hP,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:a||!b},x,{type:"separator"},{type:"button",icon:bP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!v},{type:"button",icon:yP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!p},{type:"space"}]),98304&e.$$.dirty&&n(0,r=w(o)||o)},[r,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,o]}var ZL=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,XL,YL,Zo,{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}),n}return Eo(t,Ia),Do(t)}(),eF=function(){function e(){No(this,e)}return Do(e,[{key:"lineAt",value:function(e){if(e<0||e>this.length)throw new RangeError("Invalid position ".concat(e," in document of length ").concat(this.length));return this.lineInner(e,!1,1,0)}},{key:"line",value:function(e){if(e<1||e>this.lines)throw new RangeError("Invalid line number ".concat(e," in ").concat(this.lines,"-line document"));return this.lineInner(e,!0,1,0)}},{key:"replace",value:function(e,t,n){var r=jo(lF(this,e,t),2);e=r[0],t=r[1];var o=[];return this.decompose(0,e,o,2),n.length&&n.decompose(0,n.length,o,3),this.decompose(t,this.length,o,1),nF.from(o,this.length-(t-e)+n.length)}},{key:"append",value:function(e){return this.replace(this.length,this.length,e)}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=jo(lF(this,e,t),2);e=n[0],t=n[1];var r=[];return this.decompose(e,t,r,0),nF.from(r,t-e)}},{key:"eq",value:function(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;for(var t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new iF(this),o=new iF(e),i=t,a=t;;){if(r.next(i),o.next(i),i=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}},{key:"iter",value:function(){return new iF(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return new aF(this,e,t)}},{key:"iterLines",value:function(e,t){var n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);var r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new sF(n)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var e=[];return this.flatten(e),e}}],[{key:"of",value:function(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new tF(t):nF.from(tF.split(t,[])):e.empty}}]),e}(),tF=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t,n=-1,r=bo(e);try{for(r.s();!(t=r.n()).done;){n+=t.value.length+1}}catch(e){r.e(e)}finally{r.f()}return n}(e);return No(this,t),(n=_o(this,t)).text=e,n.length=r,n}return Eo(t,eF),Do(t,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(e,t,n,r){for(var o=0;;o++){var i=this.text[o],a=r+i.length;if((t?n:a)>=e)return new cF(r,a,n,i);r=a+1,n++}}},{key:"decompose",value:function(e,n,r,o){var i=e<=0&&n>=this.length?this:new t(oF(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(1&o){var a=r.pop(),s=rF(i.text,a.text.slice(),0,i.length);if(s.length<=32)r.push(new t(s,a.length+i.length));else{var c=s.length>>1;r.push(new t(s.slice(0,c)),new t(s.slice(c)))}}else r.push(i)}},{key:"replace",value:function(e,n,r){if(!(r instanceof t))return go(Mo(t.prototype),"replace",this).call(this,e,n,r);var o=jo(lF(this,e,n),2);e=o[0],n=o[1];var i=rF(this.text,rF(r.text,oF(this.text,0,e)),n),a=this.length+r.length-(n-e);return i.length<=32?new t(i,a):nF.from(t.split(i,[]),a)}},{key:"sliceString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r=jo(lF(this,e,t),2);e=r[0],t=r[1];for(var o="",i=0,a=0;i<=t&&ae&&a&&(o+=n),ei&&(o+=s.slice(Math.max(0,e-i),t-i)),i=c+1}return o}},{key:"flatten",value:function(e){var t,n=bo(this.text);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(e,n){var r,o=[],i=-1,a=bo(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;o.push(s),i+=s.length+1,32==o.length&&(n.push(new t(o,i)),o=[],i=-1)}}catch(e){a.e(e)}finally{a.f()}return i>-1&&n.push(new t(o,i)),n}}]),t}(),nF=function(e){function t(e,n){var r;No(this,t),(r=_o(this,t)).children=e,r.length=n,r.lines=0;var o,i=bo(e);try{for(i.s();!(o=i.n()).done;){var a=o.value;r.lines+=a.lines}}catch(e){i.e(e)}finally{i.f()}return r}return Eo(t,eF),Do(t,[{key:"lineInner",value:function(e,t,n,r){for(var o=0;;o++){var i=this.children[o],a=r+i.length,s=n+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,n,r);r=a+1,n=s+1}}},{key:"decompose",value:function(e,t,n,r){for(var o=0,i=0;i<=t&&o=i){var c=r&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!c?n.push(a):a.decompose(e-i,t-i,n,c)}i=s+1}}},{key:"replace",value:function(e,n,r){var o=jo(lF(this,e,n),2);if(e=o[0],n=o[1],r.lines=a&&n<=c){var l=s.replace(e-a,n-a,r),u=this.lines-s.lines+l.lines;if(l.lines>4&&l.lines>u>>6){var f=this.children.slice();return f[i]=l,new t(f,this.length-(n-e)+r.length)}return go(Mo(t.prototype),"replace",this).call(this,a,c,l)}a=c+1}return go(Mo(t.prototype),"replace",this).call(this,e,n,r)}},{key:"sliceString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",r=jo(lF(this,e,t),2);e=r[0],t=r[1];for(var o="",i=0,a=0;ie&&i&&(o+=n),ea&&(o+=s.sliceString(e-a,t-a,n)),a=c+1}return o}},{key:"flatten",value:function(e){var t,n=bo(this.children);try{for(n.s();!(t=n.n()).done;){t.value.flatten(e)}}catch(e){n.e(e)}finally{n.f()}}},{key:"scanIdentical",value:function(e,n){if(!(e instanceof t))return 0;for(var r=0,o=jo(n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1],4),i=o[0],a=o[1],s=o[2],c=o[3];;i+=n,a+=n){if(i==s||a==c)return r;var l=this.children[i],u=e.children[a];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}}],[{key:"from",value:function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.reduce((function(e,t){return e+t.length+1}),-1),o=0,i=bo(e);try{for(i.s();!(n=i.n()).done;){o+=n.value.lines}}catch(e){i.e(e)}finally{i.f()}if(o<32){var a,s=[],c=bo(e);try{for(c.s();!(a=c.n()).done;){a.value.flatten(s)}}catch(e){c.e(e)}finally{c.f()}return new tF(s,r)}var l=Math.max(32,o>>5),u=l<<1,f=l>>1,d=[],h=0,v=-1,p=[];function m(e){var n;if(e.lines>u&&e instanceof t){var r,o=bo(e.children);try{for(o.s();!(r=o.n()).done;){m(r.value)}}catch(e){o.e(e)}finally{o.f()}}else e.lines>f&&(h>f||!h)?(g(),d.push(e)):e instanceof tF&&h&&(n=p[p.length-1])instanceof tF&&e.lines+n.lines<=32?(h+=e.lines,v+=e.length+1,p[p.length-1]=new tF(n.text.concat(e.text),n.length+1+e.length)):(h+e.lines>l&&g(),h+=e.lines,v+=e.length+1,p.push(e))}function g(){0!=h&&(d.push(1==p.length?p[0]:t.from(p,v)),v=-1,h=p.length=0)}var y,b=bo(e);try{for(b.s();!(y=b.n()).done;){m(y.value)}}catch(e){b.e(e)}finally{b.f()}return g(),1==d.length?d[0]:new t(d,r)}}]),t}();function rF(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,o=0,i=0,a=!0;i=n&&(c>r&&(s=s.slice(0,r-o)),o1&&void 0!==arguments[1]?arguments[1]:1;No(this,e),this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[n>0?1:(t instanceof tF?t.text.length:t.children.length)<<1]}return Do(e,[{key:"nextInner",value:function(e,t){for(this.done=this.lineBreak=!1;;){var n=this.nodes.length-1,r=this.nodes[n],o=this.offsets[n],i=o>>1,a=r instanceof tF?r.text.length:r.children.length;if(i==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof tF){var s=r.text[i+(t<0?-1:0)];if(this.offsets[n]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{var c=r.children[i+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof tF?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}]),e}(),aF=function(){function e(t,n,r){No(this,e),this.value="",this.done=!1,this.cursor=new iF(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 Do(e,[{key:"nextInner",value:function(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);var n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;var r=this.cursor.next(e).value;return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),e}(),sF=function(){function e(t){No(this,e),this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}return Do(e,[{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.inner.next(e),n=t.done,r=t.lineBreak,o=t.value;return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),e}();"undefined"!=typeof Symbol&&(eF.prototype[Symbol.iterator]=function(){return this.iter()},iF.prototype[Symbol.iterator]=aF.prototype[Symbol.iterator]=sF.prototype[Symbol.iterator]=function(){return this});var cF=function(){function e(t,n,r,o){No(this,e),this.from=t,this.to=n,this.number=r,this.text=o}return Do(e,[{key:"length",get:function(){return this.to-this.from}}]),e}();function lF(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}for(var uF="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})),fF=1;fFe)return uF[t-1]<=e;return!1}function hF(e){return e>=127462&&e<=127487}var vF=8205;function pF(e,t){return(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?mF:gF)(e,t,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function mF(e,t,n){if(t==e.length)return t;t&&yF(e.charCodeAt(t))&&bF(e.charCodeAt(t-1))&&t--;var r=wF(e,t);for(t+=kF(r);t=0&&hF(wF(e,a));)i++,a-=2;if(i%2==0)break;t+=2}}return t}function gF(e,t,n){for(;t>0;){var r=mF(e,t-2,n);if(r=56320&&e<57344}function bF(e){return e>=55296&&e<56320}function wF(e,t){var n=e.charCodeAt(t);if(!bF(n)||t+1==e.length)return n;var r=e.charCodeAt(t+1);return yF(r)?r-56320+(n-55296<<10)+65536:n}function xF(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function kF(e){return e<65536?1:2}var jF=/\r\n?|\n/,SF=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(SF||(SF={})),CF=function(){function e(t){No(this,e),this.sections=t}return Do(e,[{key:"length",get:function(){for(var e=0,t=0;t1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var t=[],n=0;n1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:AF(this,e,t)}},{key:"mapPos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SF.Simple,r=0,o=0,i=0;ie)return o+(e-r);o+=a}else{if(n!=SF.Simple&&c>=e&&(n==SF.TrackDel&&re||n==SF.TrackBefore&&re))return null;if(c>e||c==e&&t<0&&!a)return e==r||t<0?o:o+s;o+=s}r=c}if(e>r)throw new RangeError("Position ".concat(e," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=0,r=0;n=0&&r<=t&&o>=e)return!(rt)||"cover";r=o}return!1}},{key:"toString",value:function(){for(var e="",t=0;t=0?":"+r:"")}return e}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(t){if(!Array.isArray(t)||t.length%2||t.some((function(e){return"number"!=typeof e})))throw new RangeError("Invalid JSON representation of ChangeDesc");return new e(t)}},{key:"create",value:function(t){return new e(t)}}]),e}(),$F=function(e){function t(e,n){var r;return No(this,t),(r=_o(this,t,[e])).inserted=n,r}return Eo(t,CF),Do(t,[{key:"apply",value:function(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return MF(this,(function(t,n,r,o,i){return e=e.replace(r,r+(n-t),i)}),!1),e}},{key:"mapDesc",value:function(e){return AF(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(e){for(var n=this.sections.slice(),r=[],o=0,i=0;o=0){n[o]=s,n[o+1]=a;for(var c=o>>1;r.length1&&void 0!==arguments[1]&&arguments[1];return e.empty?this:AF(this,e,t,!0)}},{key:"iterChanges",value:function(e){MF(this,e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return CF.create(this.sections)}},{key:"filter",value:function(e){var n=[],r=[],o=[],i=new PF(this);e:for(var a=0,s=0;;){for(var c=a==e.length?1e9:e[a++];s0&&OF(r,n,i.text),i.forward(l),s+=l}for(var f=e[a++];s>1].toJSON()))}return e}}],[{key:"of",value:function(e,n,r){var o=[],i=[],a=0,s=null;function c(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||o.length){av||d<0||v>n)throw new RangeError("Invalid change range ".concat(d," to ").concat(v," (in doc of length ").concat(n,")"));var m=p?"string"==typeof p?eF.of(p.split(r||jF)):p:eF.empty,g=m.length;if(d==v&&0==g)return;da&&_F(o,d-a,-1),_F(o,v-d,g),OF(i,o,m),a=v}}(e),c(!s),s}},{key:"empty",value:function(e){return new t(e?[e,-1]:[],[])}},{key:"fromJSON",value:function(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");for(var n=[],r=[],o=0;o3&&void 0!==arguments[3]&&arguments[3];if(!(0==t&&n<=0)){var o=e.length-2;o>=0&&n<=0&&n==e[o+1]?e[o]+=t:0==t&&0==e[o]?e[o+1]+=n:r?(e[o]+=t,e[o+1]+=n):e.push(t,n)}}function OF(e,t,n){if(0!=n.length){var r=t.length-2>>1;if(r>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],c=e.sections[a++];t(o,l,i,u,f),o=l,i=u}}}function AF(e,t,n){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,i=new PF(e),a=new PF(t),s=-1;;)if(-1==i.ins&&-1==a.ins){var c=Math.min(i.len,a.len);_F(r,c,-1),i.forward(c),a.forward(c)}else if(a.ins>=0&&(i.ins<0||s==i.i||0==i.off&&(a.len=0&&s=0)){if(i.done&&a.done)return o?$F.createSet(r,o):CF.create(r);throw new Error("Mismatched change set lengths")}for(var f=0,d=i.len;d;)if(-1==a.ins){var h=Math.min(d,a.len);f+=h,d-=h,a.forward(h)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new PF(e),i=new PF(t),a=!1;;){if(o.done&&i.done)return r?$F.createSet(n,r):CF.create(n);if(0==o.ins)_F(n,o.len,0,a),o.next();else if(0!=i.len||i.done){if(o.done||i.done)throw new Error("Mismatched change set lengths");var s=Math.min(o.len2,i.len),c=n.length;if(-1==o.ins){var l=-1==i.ins?-1:i.off?0:i.ins;_F(n,s,l,a),r&&l&&OF(r,n,i.text)}else-1==i.ins?(_F(n,o.off?0:o.len,s,a),r&&OF(r,n,o.textBit(s))):(_F(n,o.off?0:o.len,i.off?0:i.ins,a),r&&!i.off&&OF(r,n,i.text));a=(o.ins>s||i.ins>=0&&i.len>s)&&(a||n.length>c),o.forward2(s),i.forward(s)}else _F(n,0,i.ins,a),r&&OF(r,n,i.text),i.next()}}var PF=function(){function e(t){No(this,e),this.set=t,this.i=0,this.next()}return Do(e,[{key:"next",value:function(){var e=this.set.sections;this.i>1;return t>=e.length?eF.empty:e[t]}},{key:"textBit",value:function(e){var t=this.set.inserted,n=this.i-2>>1;return n>=t.length&&!e?eF.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}},{key:"forward",value:function(e){e==this.len?this.next():(this.len-=e,this.off+=e)}},{key:"forward2",value:function(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}]),e}(),TF=function(){function e(t,n,r){No(this,e),this.from=t,this.to=n,this.flags=r}return Do(e,[{key:"anchor",get:function(){return 32&this.flags?this.to:this.from}},{key:"head",get:function(){return 32&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 8&this.flags?-1:16&this.flags?1:0}},{key:"bidiLevel",get:function(){var e=7&this.flags;return 7==e?null:e}},{key:"goalColumn",get:function(){var e=this.flags>>6;return 16777215==e?void 0:e}},{key:"map",value:function(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return this.empty?n=r=t.mapPos(this.from,o):(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(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e<=this.anchor&&t>=this.anchor)return RF.range(e,t);var n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return RF.range(this.anchor,n)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return RF.range(e.anchor,e.head)}},{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),RF=function(){function e(t,n){No(this,e),this.ranges=t,this.mainIndex=n}return Do(e,[{key:"map",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t.empty?this:e.create(this.ranges.map((function(e){return e.map(t,n)})),this.mainIndex)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}},{key:"replaceRange",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?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(e){return e.toJSON()})),main:this.mainIndex}}}],[{key:"fromJSON",value:function(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new e(t.ranges.map((function(e){return TF.fromJSON(e)})),t.main)}},{key:"single",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return new e([e.range(t,n)],0)}},{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==t.length)throw new RangeError("A selection needs at least one range");for(var r=0,o=0;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return TF.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:16777215)<<6)}},{key:"range",value:function(e,t,n,r){var o=(null!=n?n:16777215)<<6|(null==r?7:Math.min(6,r));return te?8:0)|o)}},{key:"normalized",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t[n];t.sort((function(e,t){return e.from-t.from})),n=t.indexOf(r);for(var o=1;oi.head?e.range(c,s):e.range(s,c))}}return new e(t,n)}}]),e}();function NF(e,t){var n,r=bo(e.ranges);try{for(r.s();!(n=r.n()).done;){if(n.value.to>t)throw new RangeError("Selection points outside of document")}}catch(e){r.e(e)}finally{r.f()}}var IF=0,DF=function(){function e(t,n,r,o,i){No(this,e),this.combine=t,this.compareInput=n,this.compare=r,this.isStatic=o,this.id=IF++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}return Do(e,[{key:"reader",get:function(){return this}},{key:"of",value:function(e){return new qF([],this,0,e)}},{key:"compute",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qF(e,this,1,t)}},{key:"computeN",value:function(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qF(e,this,2,t)}},{key:"from",value:function(e,t){return t||(t=function(e){return e}),this.compute([e],(function(n){return t(n.field(e))}))}}],[{key:"define",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t.combine||function(e){return e},t.compareInput||function(e,t){return e===t},t.compare||(t.combine?function(e,t){return e===t}:zF),!!t.static,t.enables)}}]),e}();function zF(e,t){return e==t||e.length==t.length&&e.every((function(e,n){return e===t[n]}))}var qF=function(){function e(t,n,r,o){No(this,e),this.dependencies=t,this.facet=n,this.type=r,this.value=o,this.id=IF++}return Do(e,[{key:"dynamicSlot",value:function(e){var t,n,r=this,o=this.value,i=this.facet.compareInput,a=this.id,s=e[a]>>1,c=2==this.type,l=!1,u=!1,f=[],d=bo(this.dependencies);try{for(d.s();!(n=d.n()).done;){var h=n.value;"doc"==h?l=!0:"selection"==h?u=!0:0==(1&(null!==(t=e[h.id])&&void 0!==t?t:1))&&f.push(e[h.id])}}catch(e){d.e(e)}finally{d.f()}return{create:function(e){return e.values[s]=o(e),1},update:function(e,t){if(l&&t.docChanged||u&&(t.docChanged||t.selection)||LF(e,f)){var n=o(e);if(c?!BF(n,e.values[s],i):!i(n,e.values[s]))return e.values[s]=n,1}return 0},reconfigure:function(e,t){var n,l=t.config.address[a];if(null!=l){var u=tV(t,l);if(r.dependencies.every((function(n){return n instanceof DF?t.facet(n)===e.facet(n):!(n instanceof VF)||t.field(n,!1)==e.field(n,!1)}))||(c?BF(n=o(e),u,i):i(n=o(e),u)))return e.values[s]=u,0}else n=o(e);return e.values[s]=n,1}}}}]),e}();function BF(e,t,n){if(e.length!=t.length)return!1;for(var r=0;r>1;return{create:function(e){return e.values[n]=t.create(e),1},update:function(e,r){var o=e.values[n],i=t.updateF(o,r);return t.compareF(o,i)?0:(e.values[n]=i,1)},reconfigure:function(e,r){return null!=r.config.address[t.id]?(e.values[n]=r.field(t),0):(e.values[n]=t.create(e),1)}}}},{key:"init",value:function(e){return[this,FF.of({field:this,create:e})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(t){var n=new e(IF++,t.create,t.update,t.compare||function(e,t){return e===t},t);return t.provide&&(n.provides=t.provide(n)),n}}]),e}(),HF=4,WF=3,UF=2,JF=1;function KF(e){return function(t){return new QF(t,e)}}var GF={highest:KF(0),high:KF(JF),default:KF(UF),low:KF(WF),lowest:KF(HF)},QF=Do((function e(t,n){No(this,e),this.inner=t,this.prec=n})),YF=function(){function e(){No(this,e)}return Do(e,[{key:"of",value:function(e){return new XF(this,e)}},{key:"reconfigure",value:function(t){return e.reconfigure.of({compartment:this,extension:t})}},{key:"get",value:function(e){return e.config.compartments.get(this)}}]),e}(),XF=Do((function e(t,n){No(this,e),this.compartment=t,this.inner=n})),ZF=function(){function e(t,n,r,o,i,a){for(No(this,e),this.base=t,this.compartments=n,this.dynamicSlots=r,this.address=o,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(t,n,r){var o,i=[],a=Object.create(null),s=new Map,c=bo(function(e,t,n){var r=[[],[],[],[],[]],o=new Map;function i(e,a){var s=o.get(e);if(null!=s){if(s<=a)return;var c=r[s].indexOf(e);c>-1&&r[s].splice(c,1),e instanceof XF&&n.delete(e.compartment)}if(o.set(e,a),Array.isArray(e)){var l,u=bo(e);try{for(u.s();!(l=u.n()).done;){i(l.value,a)}}catch(e){u.e(e)}finally{u.f()}}else if(e instanceof XF){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");var f=t.get(e.compartment)||e.inner;n.set(e.compartment,f),i(f,a)}else if(e instanceof QF)i(e.inner,e.prec);else if(e instanceof VF)r[a].push(e),e.provides&&i(e.provides,a);else if(e instanceof qF)r[a].push(e),e.facet.extensions&&i(e.facet.extensions,UF);else{var d=e.extension;if(!d)throw new Error("Unrecognized extension value in extension set (".concat(e,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));i(d,a)}}return i(e,UF),r.reduce((function(e,t){return e.concat(t)}))}(t,n,s));try{for(c.s();!(o=c.n()).done;){var l=o.value;l instanceof VF?i.push(l):(a[l.facet.id]||(a[l.facet.id]=[])).push(l)}}catch(e){c.e(e)}finally{c.f()}for(var u=Object.create(null),f=[],d=[],h=function(){var e=p[v];u[e.id]=d.length<<1,d.push((function(t){return e.slot(t)}))},v=0,p=i;v>1;function s(e){for(var n=[],i=0;i>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;var o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function tV(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}var nV=DF.define(),rV=DF.define({combine:function(e){return e.some((function(e){return e}))},static:!0}),oV=DF.define({combine:function(e){return e.length?e[0]:void 0},static:!0}),iV=DF.define(),aV=DF.define(),sV=DF.define(),cV=DF.define({combine:function(e){return!!e.length&&e[0]}}),lV=function(){function e(t,n){No(this,e),this.type=t,this.value=n}return Do(e,null,[{key:"define",value:function(){return new uV}}]),e}(),uV=function(){function e(){No(this,e)}return Do(e,[{key:"of",value:function(e){return new lV(this,e)}}]),e}(),fV=function(){function e(t){No(this,e),this.map=t}return Do(e,[{key:"of",value:function(e){return new dV(this,e)}}]),e}(),dV=function(){function e(t,n){No(this,e),this.type=t,this.value=n}return Do(e,[{key:"map",value:function(t){var n=this.type.map(this.value,t);return void 0===n?void 0:n==this.value?this:new e(this.type,n)}},{key:"is",value:function(e){return this.type==e}}],[{key:"define",value:function(){return new fV((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(e,t){if(!e.length)return e;var n,r=[],o=bo(e);try{for(o.s();!(n=o.n()).done;){var i=n.value.map(t);i&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return r}}]),e}();dV.reconfigure=dV.define(),dV.appendConfig=dV.define();var hV=function(){function e(t,n,r,o,i,a){No(this,e),this.startState=t,this.changes=n,this.selection=r,this.effects=o,this.annotations=i,this.scrollIntoView=a,this._doc=null,this._state=null,r&&NF(r,n.newLength),i.some((function(t){return t.type==e.time}))||(this.annotations=i.concat(e.time.of(Date.now())))}return Do(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(e){var t,n=bo(this.annotations);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.type==e)return r.value}}catch(e){n.e(e)}finally{n.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,o,i,a){return new e(t,n,r,o,i,a)}}]),e}();function vV(e,t){for(var n=[],r=0,o=0;;){var i=void 0,a=void 0;if(r=e[r]))i=e[r++],a=e[r++];else{if(!(o=0;o--){var i=n[o](e);i&&Object.keys(i).length&&(r=pV(r,mV(t,i,e.changes.newLength),!0))}return r==e?e:hV.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){var t,n=e.startState,r=!0,o=bo(n.facet(iV));try{for(o.s();!(t=o.n()).done;){var i=(0,t.value)(e);if(!1===i){r=!1;break}Array.isArray(i)&&(r=!0===r?i:vV(r,i))}}catch(e){o.e(e)}finally{o.f()}if(!0!==r){var a,s;if(!1===r)s=e.changes.invertedDesc,a=$F.empty(n.doc.length);else{var c=e.changes.filter(r);a=c.changes,s=c.filtered.mapDesc(c.changes).invertedDesc}e=hV.create(n,a,e.selection&&e.selection.map(s),dV.mapEffects(e.effects,s),e.annotations,e.scrollIntoView)}for(var l=n.facet(aV),u=l.length-1;u>=0;u--){var f=l[u](e);e=f instanceof hV?f:Array.isArray(f)&&1==f.length&&f[0]instanceof hV?f[0]:gV(n,bV(f),!1)}return e}(a):a)}hV.time=lV.define(),hV.userEvent=lV.define(),hV.addToHistory=lV.define(),hV.remote=lV.define();var yV=[];function bV(e){return null==e?yV:Array.isArray(e)?e:[e]}var wV,xV=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(xV||(xV={})),kV=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{wV=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(P_){}function jV(e){return function(t){if(!/\S/.test(t))return xV.Space;if(function(e){if(wV)return wV.test(e);for(var t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||kV.test(n)))return!0}return!1}(t))return xV.Word;for(var n=0;n-1)return xV.Word;return xV.Other}}var SV=function(){function e(t,n,r,o,i,a){No(this,e),this.config=t,this.doc=n,this.selection=r,this.values=o,this.status=t.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(var s=0;s1&&void 0!==arguments[1])||arguments[1],n=this.config.address[e.id];if(null!=n)return eV(this,n),tV(this,n);if(t)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof $F?t:$F.of(t,this.doc.length,this.facet(e.lineSeparator))}},{key:"toText",value:function(t){return eF.of(t.split(this.facet(e.lineSeparator)||jF))}},{key:"sliceDoc",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length;return this.doc.sliceString(e,t,this.lineBreak)}},{key:"facet",value:function(e){var t=this.config.address[e.id];return null==t?e.default:(eV(this,t),tV(this,t))}},{key:"toJSON",value:function(e){var t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(var n in e){var r=e[n];r instanceof VF&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}},{key:"tabSize",get:function(){return this.facet(e.tabSize)}},{key:"lineBreak",get:function(){return this.facet(e.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(cV)}},{key:"phrase",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;or.length?e:r[n-1]}))),t}},{key:"languageDataAt",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],i=bo(this.facet(nV));try{for(i.s();!(n=i.n()).done;){var a,s=bo((0,n.value)(this,t,r));try{for(s.s();!(a=s.n()).done;){var c=a.value;Object.prototype.hasOwnProperty.call(c,e)&&o.push(c[e])}}catch(e){s.e(e)}finally{s.f()}}}catch(e){i.e(e)}finally{i.f()}return o}},{key:"charCategorizer",value:function(e){return jV(this.languageDataAt("wordChars",e).join(""))}},{key:"wordAt",value:function(e){for(var t=this.doc.lineAt(e),n=t.text,r=t.from,o=t.length,i=this.charCategorizer(e),a=e-r,s=e-r;a>0;){var c=pF(n,a,!1);if(i(n.slice(c,a))!=xV.Word)break;a=c}for(;s1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");var o=[];if(r){var i=function(){if(Object.prototype.hasOwnProperty.call(t,a)){var e=r[a],n=t[a];o.push(e.init((function(t){return e.spec.fromJSON(n,t)})))}};for(var a in r)i()}return e.create({doc:t.doc,selection:RF.fromJSON(t.selection),extensions:n.extensions?o.concat([n.extensions]):o})}},{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=ZF.resolve(t.extensions||[],new Map),r=t.doc instanceof eF?t.doc:eF.of((t.doc||"").split(n.staticFacet(e.lineSeparator)||jF)),o=t.selection?t.selection instanceof RF?t.selection:RF.single(t.selection.anchor,t.selection.head):RF.single(0);return NF(o,r.length),n.staticFacet(rV)||(o=o.asSingle()),new e(n,r,o,n.dynamicSlots.map((function(){return null})),(function(e,t){return t.create(e)}),null)}}]),e}();function CV(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={},i=bo(e);try{for(i.s();!(n=i.n()).done;)for(var a=n.value,s=0,c=Object.keys(a);s1&&void 0!==arguments[1]?arguments[1]:e;return _V.create(e,t,this)}}]),e}();$V.prototype.startSide=$V.prototype.endSide=0,$V.prototype.point=!1,$V.prototype.mapMode=SF.TrackDel;var _V=function(){function e(t,n,r){No(this,e),this.from=t,this.to=n,this.value=r}return Do(e,null,[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}();function OV(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var MV=function(){function e(t,n,r,o){No(this,e),this.from=t,this.to=n,this.value=r,this.maxPoint=o}return Do(e,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=n?this.to:this.from,i=r,a=o.length;;){if(i==a)return i;var s=i+a>>1,c=o[s]-e||(n?this.value[s].endSide:this.value[s].startSide)-t;if(s==i)return c>=0?i:a;c>=0?a=s:i=s+1}}},{key:"between",value:function(e,t,n,r){for(var o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);o(h=n.mapPos(f,l.endSide))||d==h&&l.startSide>0&&l.endSide<=0)continue;(h-d||l.endSide-l.startSide)<0||(a<0&&(a=d),l.point&&(s=Math.max(s,h-d)),r.push(l),o.push(d-a),i.push(h-a))}return{mapped:r.length?new e(o,i,r,s):null,pos:a}}}]),e}(),AV=function(){function e(t,n,r,o){No(this,e),this.chunkPos=t,this.chunk=n,this.nextLayer=r,this.maxPoint=o}return Do(e,[{key:"length",get:function(){var e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var e,t=this.nextLayer.size,n=bo(this.chunk);try{for(n.s();!(e=n.n()).done;){t+=e.value.value.length}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"chunkEnd",value:function(e){return this.chunkPos[e]+this.chunk[e].length}},{key:"update",value:function(t){var n=t.add,r=void 0===n?[]:n,o=t.sort,i=void 0!==o&&o,a=t.filterFrom,s=void 0===a?0:a,c=t.filterTo,l=void 0===c?this.length:c,u=t.filter;if(0==r.length&&!u)return this;if(i&&(r=r.slice().sort(OV)),this.isEmpty)return r.length?e.of(r):this;for(var f=new TV(this,null,-1).goto(0),d=0,h=[],v=new EV;f.value||d=0){var p=r[d++];v.addInner(p.from,p.to,p.value)||h.push(p)}else 1==f.rangeIndex&&f.chunkIndexthis.chunkEnd(f.chunkIndex)||lf.to||l=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,n))return}this.nextLayer.between(e,t,n)}}},{key:"iter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return RV.from([this]).goto(e)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(t,n,r,o){return new e(t,n,r,o)}},{key:"iter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return RV.from(e).goto(t)}},{key:"compare",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=e.filter((function(e){return e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o})),a=t.filter((function(e){return e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o})),s=PV(i,a,n),c=new IV(i,s,o),l=new IV(a,s,o);n.iterGaps((function(e,t,n){return DV(c,e,l,t,n,r)})),n.empty&&0==n.length&&DV(c,0,l,0,0,r)}},{key:"eq",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=e.filter((function(e){return!e.isEmpty&&t.indexOf(e)<0})),i=t.filter((function(t){return!t.isEmpty&&e.indexOf(t)<0}));if(o.length!=i.length)return!1;if(!o.length)return!0;for(var a=PV(o,i),s=new IV(o,a,0).goto(n),c=new IV(i,a,0).goto(n);;){if(s.to!=c.to||!zV(s.active,c.active)||s.point&&(!c.point||!s.point.eq(c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}},{key:"spans",value:function(e,t,n,r){for(var o=new IV(e,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(t),i=t,a=o.openStart;;){var s=Math.min(o.to,n);if(o.point){var c=o.activeForPoint(o.to),l=o.pointFromi&&(r.span(i,s,o.active,a),a=o.openEnd(s));if(o.to>n)return a+(o.point&&o.to>n?1:0);i=o.to,o.next()}}},{key:"of",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new EV,o=bo(e instanceof _V?[e]:n?function(e){if(e.length>1)for(var t=e[0],n=1;n0)return e.slice().sort(OV);t=r}return e}(e):e);try{for(o.s();!(t=o.n()).done;){var i=t.value;r.add(i.from,i.to,i.value)}}catch(e){o.e(e)}finally{o.f()}return r.finish()}},{key:"join",value:function(t){if(!t.length)return e.empty;for(var n=t[t.length-1],r=t.length-2;r>=0;r--)for(var o=t[r];o!=e.empty;o=o.nextLayer)n=new e(o.chunkPos,o.chunk,n,Math.max(o.maxPoint,n.maxPoint));return n}}]),e}();AV.empty=new AV([],[],null,-1),AV.empty.nextLayer=AV.empty;var EV=function(){function e(){No(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 Do(e,[{key:"finishChunk",value:function(e){this.chunks.push(new MV(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}},{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(e,t,n){var r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}},{key:"addChunk",value:function(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);var n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}},{key:"finish",value:function(){return this.finishInner(AV.empty)}},{key:"finishInner",value:function(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;var t=AV.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}]),e}();function PV(e,t,n){var r,o=new Map,i=bo(e);try{for(i.s();!(r=i.n()).done;)for(var a=r.value,s=0;s3&&void 0!==arguments[3]?arguments[3]:0;No(this,e),this.layer=t,this.skip=n,this.minPoint=r,this.rank=o}return Do(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(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}},{key:"gotoInner",value:function(e,t,n){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=bo(this.heap);try{for(r.s();!(t=r.n()).done;){t.value.goto(e,n)}}catch(e){r.e(e)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)NV(this.heap,o);return this.next(),this}},{key:"forward",value:function(e,t){var n,r=bo(this.heap);try{for(r.s();!(n=r.n()).done;){n.value.forward(e,t)}}catch(e){r.e(e)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)NV(this.heap,o);(this.to-e||this.value.endSide-t)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),NV(this.heap,0)}}}],[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],i=0;i=r&&o.push(new TV(a,n,r,i));return 1==o.length?o[0]:new e(o)}}]),e}();function NV(e,t){for(var n=e[t];;){var r=1+(t<<1);if(r>=e.length)break;var o=e[r];if(r+1=0&&(o=e[r+1],r++),n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}var IV=function(){function e(t,n,r){No(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=RV.from(t,n,r)}return Do(e,[{key:"goto",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}},{key:"forward",value:function(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}},{key:"removeActive",value:function(e){qV(this.active,e),qV(this.activeTo,e),qV(this.activeRank,e),this.minActive=LV(this.active,this.activeTo)}},{key:"addActive",value:function(e){for(var t=0,n=this.cursor,r=n.value,o=n.to,i=n.rank;t0;)t++;BV(this.active,t,r),BV(this.activeTo,t,o),BV(this.activeRank,t,i),e&&BV(e,t,this.cursor.from),this.minActive=LV(this.active,this.activeTo)}},{key:"next",value:function(){var e=this.to,t=this.point;this.point=null;for(var n=this.openStart<0?[]:null;;){var r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&qV(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[i]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}},{key:"openEnd",value:function(e){for(var t=0,n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}]),e}();function DV(e,t,n,r,o,i){e.goto(t),n.goto(r);for(var a=r+o,s=r,c=r-t;;){var l=e.to+c-n.to||e.endSide-n.endSide,u=l<0?e.to+c:n.to,f=Math.min(u,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&zV(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(s,f,e.point,n.point):f>s&&!zV(e.active,n.active)&&i.compareRange(s,f,e.active,n.active),u>a)break;s=u,l<=0&&e.next(),l>=0&&n.next()}}function zV(e,t){if(e.length!=t.length)return!1;for(var n=0;n=t;r--)e[r+1]=e[r];e[t]=n}function LV(e,t){for(var n=-1,r=1e9,o=0;o2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,o=0;o=t)return o;if(o==e.length)break;i+=9==e.charCodeAt(o)?n-i%n:1,o=pF(e,o)}return!0===r?-1:e.length}for(var HV="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),WV="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),UV="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{},JV=function(){function e(t,n){No(this,e),this.rules=[];var r=(n||{}).finish;function o(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,n,a){var s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&"keyframes"==c[1];if(c&&null==t)return n.push(e[0]+";");for(var u in t){var f=t[u];if(/&/.test(u))i(u.split(/,\s*/).map((function(t){return e.map((function(e){return t.replace(/&/,e)}))})).reduce((function(e,t){return e.concat(t)})),f,n);else if(f&&"object"==Ho(f)){if(!c)throw new RangeError("The value of a property ("+u+") should be a primitive value.");i(o(u),f,s,l)}else null!=f&&s.push(u.replace(/_.*/,"").replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}))+": "+f+";")}(s.length||l)&&n.push((!r||c||a?e:e.map(r)).join(", ")+" {"+s.join(" ")+"}")}for(var a in t)i(o(a),t[a],this.rules)}return Do(e,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var e=UV[HV]||1;return UV[HV]=e+1,"ͼ"+e.toString(36)}},{key:"mount",value:function(e,t,n){var r=e[WV],o=n&&n.nonce;r?o&&r.setNonce(o):r=new GV(e,o),r.mount(Array.isArray(t)?t:[t])}}]),e}(),KV=new Map,GV=function(){function e(t,n){No(this,e);var r=t.ownerDocument||t,o=r.defaultView;if(!t.head&&t.adoptedStyleSheets&&o.CSSStyleSheet){var i=KV.get(r);if(i)return t.adoptedStyleSheets=[i.sheet].concat(Bo(t.adoptedStyleSheets)),t[WV]=i;this.sheet=new o.CSSStyleSheet,t.adoptedStyleSheets=[this.sheet].concat(Bo(t.adoptedStyleSheets)),KV.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);var a=t.head||t;a.insertBefore(this.styleTag,a.firstChild)}this.modules=[],t[WV]=this}return Do(e,[{key:"mount",value:function(e){for(var t=this.sheet,n=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,i),t)for(var s=0;s",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},XV="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),ZV="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),eH=0;eH<10;eH++)QV[48+eH]=QV[96+eH]=String(eH);for(eH=1;eH<=24;eH++)QV[eH+111]="F"+eH;for(eH=65;eH<=90;eH++)QV[eH]=String.fromCharCode(eH+32),YV[eH]=String.fromCharCode(eH);for(var tH in QV)YV.hasOwnProperty(tH)||(YV[tH]=QV[tH]);function nH(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function rH(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function oH(e,t){if(!t.anchorNode)return!1;try{return rH(e,t.anchorNode)}catch(e){return!1}}function iH(e){return 3==e.nodeType?gH(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function aH(e,t,n,r){return!!n&&(cH(e,t,n,r,-1)||cH(e,t,n,r,1))}function sH(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function cH(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:lH(e))){if("DIV"==e.nodeName)return!1;var i=e.parentNode;if(!i||1!=i.nodeType)return!1;t=sH(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?lH(e):0}}}function lH(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function uH(e,t){var n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function fH(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function dH(e,t){var n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}var hH,vH=function(){function e(){No(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Do(e,[{key:"eq",value:function(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}},{key:"setRange",value:function(e){var t=e.anchorNode,n=e.focusNode;this.set(t,Math.min(e.anchorOffset,t?lH(t):0),n,Math.min(e.focusOffset,n?lH(n):0))}},{key:"set",value:function(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}]),e}(),pH=null;function mH(e){if(e.setActive)return e.setActive();if(pH)return e.focus(pH);for(var t=[],n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==pH?{get preventScroll(){return pH={preventScroll:!0},!0}}:void 0),!pH){pH=!1;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:t,r=hH||(hH=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function yH(e,t,n){var r={key:t,code:t,keyCode:n,which:n,cancelable:!0},o=new KeyboardEvent("keydown",r);o.synthetic=!0,e.dispatchEvent(o);var i=new KeyboardEvent("keyup",r);return i.synthetic=!0,e.dispatchEvent(i),o.defaultPrevented||i.defaultPrevented}function bH(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function wH(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}var xH=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];No(this,e),this.node=t,this.offset=n,this.precise=r}return Do(e,null,[{key:"before",value:function(t,n){return new e(t.parentNode,sH(t),n)}},{key:"after",value:function(t,n){return new e(t.parentNode,sH(t)+1,n)}}]),e}(),kH=[],jH=function(){function e(){No(this,e),this.parent=null,this.dom=null,this.flags=2}return Do(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(e){var t,n=this.posAtStart,r=bo(this.children);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o==e)return n;n+=o.length+o.breakAfter}}catch(e){r.e(e)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(e){return this.posBefore(e)+e.length}},{key:"sync",value:function(t,n){if(2&this.flags){var r,o,i=this.dom,a=null,s=bo(this.children);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(7&c.flags){if(!c.dom&&(r=a?a.nextSibling:i.firstChild)){var l=e.get(r);(!l||!l.parent&&l.canReuseDOM(c))&&c.reuseDOM(r)}c.sync(t,n),c.flags&=-8}if(r=a?a.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&r!=c.dom&&(n.written=!0),c.dom.parentNode==i)for(;r&&r!=c.dom;)r=SH(r);else i.insertBefore(c.dom,r);a=c.dom}}catch(e){s.e(e)}finally{s.f()}for((r=a?a.nextSibling:i.firstChild)&&n&&n.node==i&&(n.written=!0);r;)r=SH(r)}else if(1&this.flags){var u,f=bo(this.children);try{for(f.s();!(u=f.n()).done;){var d=u.value;7&d.flags&&(d.sync(t,n),d.flags&=-8)}}catch(e){f.e(e)}finally{f.f()}}}},{key:"reuseDOM",value:function(e){}},{key:"localPosFromDOM",value:function(t,n){var r;if(t==this.dom)r=this.dom.childNodes[n];else{for(var o=0==lH(t)?0:0==n?-1:1;;){var i=t.parentNode;if(i==this.dom)break;0==o&&i.firstChild!=i.lastChild&&(o=t==i.firstChild?-1:1),t=i}r=o<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 c=this.children[a];if(c.dom==r)return s;s+=c.length+c.breakAfter}}},{key:"domBoundsAround",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,i=-1,a=-1,s=0,c=n,l=n;st)return u.domBoundsAround(e,t,c);if(f>=e&&-1==r&&(r=s,o=c),c>t&&u.dom.parentNode==this.dom){i=s,a=l;break}l=f,c=f+u.breakAfter}return{from:o,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i=0?this.children[i].dom:null}}},{key:"markDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.flags|=2,this.markParentsDirty(e)}},{key:"markParentsDirty",value:function(e){for(var t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}},{key:"setParent",value:function(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}},{key:"rootView",get:function(){for(var e=this;;){var t=e.parent;if(!t)return e;e=t}}},{key:"replaceChildren",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:kH;this.markDirty();for(var o=e;o0&&void 0!==arguments[0]?arguments[0]:this.length;return new CH(this.children,e,this.children.length)}},{key:"childPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(e,t)}},{key:"toString",value:function(){var e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?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(e,t,n,r,o,i){return!1}},{key:"become",value:function(e){return!1}},{key:"canReuseDOM",value:function(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){var e,t=bo(this.children);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.parent==this&&n.destroy()}}catch(e){t.e(e)}finally{t.f()}this.parent=null}}],[{key:"get",value:function(e){return e.cmView}}]),e}();function SH(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}jH.prototype.breakAfter=0;var CH=function(){function e(t,n,r){No(this,e),this.children=t,this.pos=n,this.i=r,this.off=0}return Do(e,[{key:"findPos",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;var n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}]),e}();function $H(e,t,n,r,o,i,a,s,c){var l=e.children,u=l.length?l[t]:null,f=i.length?i[i.length-1]:null,d=f?f.breakAfter:a;if(!(t==r&&u&&!a&&!d&&i.length<2&&u.merge(n,o,i.length?f:null,0==n,s,c))){if(r0&&(!a&&i.length&&u.merge(n,u.length,i[0],!1,s,0)?u.breakAfter=i.shift().breakAfter:(n2),qH={mac:zH||/Mac/.test(OH.platform),windows:/Win/.test(OH.platform),linux:/Linux|X11/.test(OH.platform),ie:TH,ie_version:EH?MH.documentMode||6:PH?+PH[1]:AH?+AH[1]:0,gecko:RH,gecko_version:RH?+(/Firefox\/(\d+)/.exec(OH.userAgent)||[0,0])[1]:0,chrome:!!NH,chrome_version:NH?+NH[1]:0,ios:zH,android:/Android\b/.test(OH.userAgent),webkit:IH,safari:DH,webkit_version:IH?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=MH.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},BH=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).text=e,n}return Eo(t,jH),Do(t,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(e){this.setDOM(e||document.createTextNode(this.text))}},{key:"sync",value:function(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(e){3==e.nodeType&&this.createDOM(e)}},{key:"merge",value:function(e,n,r){return!(8&this.flags||r&&(!(r instanceof t)||this.length-(n-e)+r.length>256||8&r.flags))&&(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}},{key:"split",value:function(e){var n=new t(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=8&this.flags,n}},{key:"localPosFromDOM",value:function(e,t){return e==this.dom?t:t?this.text.length:0}},{key:"domAtPos",value:function(e){return new xH(this.dom,e)}},{key:"domBoundsAround",value:function(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(e,t){return function(e,t,n){var r=e.nodeValue.length;t>r&&(t=r);var o=t,i=t,a=0;0==t&&n<0||t==r&&n>=0?qH.chrome||qH.gecko||(t?(o--,a=1):i=0)?0:s.length-1];qH.safari&&!a&&0==c.width&&(c=Array.prototype.find.call(s,(function(e){return e.width}))||c);return a?uH(c,a<0):c||null}(this.dom,e,t)}}]),t}(),LH=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;No(this,t),(n=_o(this,t)).mark=e,n.children=r,n.length=o;var i,a=bo(r);try{for(a.s();!(i=a.n()).done;){i.value.setParent(Ao(n))}}catch(e){a.e(e)}finally{a.f()}return n}return Eo(t,jH),Do(t,[{key:"setAttrs",value:function(e){if(bH(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(var t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}},{key:"canReuseDOM",value:function(e){return go(Mo(t.prototype),"canReuseDOM",this).call(this,e)&&!(8&(this.flags|e.flags))}},{key:"reuseDOM",value:function(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}},{key:"sync",value:function(e,n){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),go(Mo(t.prototype),"sync",this).call(this,e,n)}},{key:"merge",value:function(e,n,r,o,i,a){return(!r||!(!(r instanceof t&&r.mark.eq(this.mark))||e&&i<=0||ne&&r.push(o=e&&(i=a),o=l,a++}}catch(e){s.e(e)}finally{s.f()}var u=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new t(this.mark,r,u)}},{key:"domAtPos",value:function(e){return HH(this,e)}},{key:"coordsAt",value:function(e,t){return UH(this,e,t)}}]),t}();var FH=function(e){function t(e,n,r){var o;return No(this,t),(o=_o(this,t)).widget=e,o.length=n,o.side=r,o.prevWidget=null,o}return Eo(t,jH),Do(t,[{key:"split",value:function(e){var n=t.create(this.widget,this.length-e,this.side);return this.length-=e,n}},{key:"sync",value:function(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(e,n,r,o,i,a){return!(r&&(!(r instanceof t&&this.widget.compare(r.widget))||e>0&&i<=0||n0)?xH.before(this.dom):xH.after(this.dom,e==this.length)}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e,t){var n=this.widget.coordsAt(this.dom,e,t);if(n)return n;var r=this.dom.getClientRects(),o=null;if(!r.length)return null;for(var i=this.side?this.side<0:e>0,a=i?r.length-1:0;o=r[a],!(e>0?0==a:a==r.length-1||o.top0?xH.before(this.dom):xH.after(this.dom)}},{key:"localPosFromDOM",value:function(){return 0}},{key:"domBoundsAround",value:function(){return null}},{key:"coordsAt",value:function(e){return this.dom.getBoundingClientRect()}},{key:"overrideDOMText",get:function(){return eF.empty}},{key:"isHidden",get:function(){return!0}}]),t}();function HH(e,t){for(var n=e.dom,r=e.children,o=0,i=0;oi&&t0;c--){var l=r[c-1];if(l.dom.parentNode==n)return l.domAtPos(l.length)}for(var u=o;u0&&t instanceof LH&&o.length&&(r=o[o.length-1])instanceof LH&&r.mark.eq(t.mark)?WH(r,t.children[0],n-1):(o.push(t),t.setParent(e)),e.length+=t.length}function UH(e,t,n){var r=null,o=-1,i=null,a=-1;!function e(t,s){for(var c=0,l=0;c=s&&(u.children.length?e(u,s-l):(!i||i.isHidden&&n>0)&&(f>s||l==f&&u.getSide()>0)?(i=u,a=s-l):(l-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(var i=0,a=r;i0&&0==this.children[o-1].length;)this.children[--o].destroy();return this.children.length=o,this.markDirty(),this.length=e,n}},{key:"transferDOM",value:function(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(e){GH(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}},{key:"append",value:function(e,t){WH(this,e,t)}},{key:"addLineDeco",value:function(e){var t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=JH(t,this.attrs||{})),n&&(this.attrs=JH({class:n},this.attrs||{}))}},{key:"domAtPos",value:function(e){return HH(this,e)}},{key:"reuseDOM",value:function(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}},{key:"sync",value:function(e,n){var r;this.dom?4&this.flags&&(bH(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),void 0!==this.prevAttrs&&(QH(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),go(Mo(t.prototype),"sync",this).call(this,e,n);for(var o=this.dom.lastChild;o&&jH.get(o)instanceof LH;)o=o.lastChild;if(!(o&&this.length&&("BR"==o.nodeName||0!=(null===(r=jH.get(o))||void 0===r?void 0:r.isEditable)||qH.ios&&this.children.some((function(e){return e instanceof BH}))))){var i=document.createElement("BR");i.cmIgnore=!0,this.dom.appendChild(i)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var e,t,n=0,r=bo(this.children);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(!(o instanceof BH)||/[^ -~]/.test(o.text))return null;var i=iH(o.dom);if(1!=i.length)return null;n+=i[0].width,e=i[0].height}}catch(e){r.e(e)}finally{r.f()}return n?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:n/this.length,textHeight:e}:null}},{key:"coordsAt",value:function(e,t){var n=UH(this,e,t);if(!this.children.length&&n&&this.parent){var r=this.parent.view.viewState.heightOracle,o=n.bottom-n.top;if(Math.abs(o-r.lineHeight)<2&&r.textHeight=n){if(i instanceof t)return i;if(a>n)break}o=a+i.breakAfter}return null}}]),t}(),ZH=function(e){function t(e,n,r){var o;return No(this,t),(o=_o(this,t)).widget=e,o.length=n,o.deco=r,o.breakAfter=0,o.prevWidget=null,o}return Eo(t,jH),Do(t,[{key:"merge",value:function(e,n,r,o,i,a){return!(r&&(!(r instanceof t&&this.widget.compare(r.widget))||e>0&&i<=0||n0)}}]),t}(),eW=function(){function e(){No(this,e)}return Do(e,[{key:"eq",value:function(e){return!1}},{key:"updateDOM",value:function(e,t){return!1}},{key:"compare",value:function(e){return this==e||this.constructor==e.constructor&&this.eq(e)}},{key:"estimatedHeight",get:function(){return-1}},{key:"lineBreaks",get:function(){return 0}},{key:"ignoreEvent",value:function(e){return!0}},{key:"coordsAt",value:function(e,t,n){return null}},{key:"isHidden",get:function(){return!1}},{key:"editable",get:function(){return!1}},{key:"destroy",value:function(e){}}]),e}(),tW=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(tW||(tW={})),nW=function(e){function t(e,n,r,o){var i;return No(this,t),(i=_o(this,t)).startSide=e,i.endSide=n,i.widget=r,i.spec=o,i}return Eo(t,$V),Do(t,[{key:"heightRelevant",get:function(){return!1}},{key:"hasHeight",value:function(){return!!this.widget&&this.widget.estimatedHeight>-1}}],[{key:"mark",value:function(e){return new rW(e)}},{key:"widget",value:function(e){var t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new iW(e,t,t,n,e.widget||null,!1)}},{key:"replace",value:function(e){var t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{var o=aW(e,r);t=(o.start?r?-3e8:-1:5e8)-1,n=1+(o.end?r?2e8:1:-6e8)}return new iW(e,t,n,r,e.widget||null,!0)}},{key:"line",value:function(e){return new oW(e)}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return AV.of(e,t)}}]),t}();nW.none=AV.empty;var rW=function(e){function t(e){var n;No(this,t);var r=aW(e);return(n=_o(this,t,[r.start?-1:5e8,r.end?1:-6e8,null,e])).tagName=e.tagName||"span",n.class=e.class||"",n.attrs=e.attributes||null,n}return Eo(t,nW),Do(t,[{key:"eq",value:function(e){var n,r;return this==e||e instanceof t&&this.tagName==e.tagName&&(this.class||(null===(n=this.attrs)||void 0===n?void 0:n.class))==(e.class||(null===(r=e.attrs)||void 0===r?void 0:r.class))&&GH(this.attrs,e.attrs,"class")}},{key:"range",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e>=n)throw new RangeError("Mark decorations may not be empty");return go(Mo(t.prototype),"range",this).call(this,e,n)}}]),t}();rW.prototype.point=!1;var oW=function(e){function t(e){return No(this,t),_o(this,t,[-2e8,-2e8,null,e])}return Eo(t,nW),Do(t,[{key:"eq",value:function(e){return e instanceof t&&this.spec.class==e.spec.class&&GH(this.spec.attributes,e.spec.attributes)}},{key:"range",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return go(Mo(t.prototype),"range",this).call(this,e,n)}}]),t}();oW.prototype.mapMode=SF.TrackBefore,oW.prototype.point=!0;var iW=function(e){function t(e,n,r,o,i,a){var s;return No(this,t),(s=_o(this,t,[n,r,i,e])).block=o,s.isReplace=a,s.mapMode=o?n<=0?SF.TrackBefore:SF.TrackAfter:SF.TrackDel,s}return Eo(t,nW),Do(t,[{key:"type",get:function(){return this.startSide!=this.endSide?tW.WidgetRange:this.startSide<=0?tW.WidgetBefore:tW.WidgetAfter}},{key:"heightRelevant",get:function(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}},{key:"eq",value:function(e){return e instanceof t&&(n=this.widget,r=e.widget,n==r||!!(n&&r&&n.compare(r)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var n,r}},{key:"range",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return go(Mo(t.prototype),"range",this).call(this,e,n)}}]),t}();function aW(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.inclusiveStart,r=e.inclusiveEnd;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function sW(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=n.length-1;o>=0&&n[o]+r>=e?n[o]=Math.max(n[o],t):n.push(e,t)}iW.prototype.point=!0;var cW=function(){function e(t,n,r,o){No(this,e),this.doc=t,this.pos=n,this.end=r,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=n}return Do(e,[{key:"posCovered",value:function(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;var e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof ZH&&e.deco.endSide<0)}},{key:"getLine",value:function(){return this.curLine||(this.content.push(this.curLine=new XH),this.atCursorPos=!0),this.curLine}},{key:"flushBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(lW(new VH(-1),e),e.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}},{key:"finish",value:function(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof ZH||this.getLine()}},{key:"buildText",value:function(e,t,n){for(;e>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,i=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=o,this.textOff=0}var s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(lW(new BH(this.text.slice(this.textOff,this.textOff+s)),t),n),this.atCursorPos=!0,this.textOff+=s,e-=s,n=0}}},{key:"span",value:function(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(e,t,n,r,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof iW){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=t-e;if(n instanceof iW)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ZH(n.widget||new uW("div"),a,n));else{var s=FH.create(n.widget||new uW("span"),a,a?0:n.startSide),c=this.atCursorPos&&!s.isEditable&&o<=r.length&&(e0),l=!s.isEditable&&(er.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||c||s.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),c&&(u.append(lW(new VH(1),r),o),o=r.length+Math.max(0,o-r.length)),u.append(lW(s,r),o),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(t,n,r,o,i){var a=new e(t,n,r,i);return a.openEnd=AV.spans(o,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}]),e}();function lW(e,t){var n,r=bo(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;e=new LH(o,[e],e.length)}}catch(e){r.e(e)}finally{r.f()}return e}var uW=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).tag=e,n}return Eo(t,eW),Do(t,[{key:"eq",value:function(e){return e.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(e){return e.nodeName.toLowerCase()==this.tag}},{key:"isHidden",get:function(){return!0}}]),t}(),fW=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(fW||(fW={})),dW=fW.LTR,hW=fW.RTL;function vW(e){for(var t=[],n=0;n=t){if(a.level==n)return i;(o<0||(0!=r?r<0?a.fromt:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}]),e}();function _W(e,t){if(e.length!=t.length)return!1;for(var n=0;nc&&a.push(new $W(c,m.from,v)),AW(e,m.direction==dW!=!(v%2)?r+1:r,o,m.inner,m.from,m.to,a),c=m.to;p=m.to}else{if(p==n||(u?OW[p]!=s:OW[p]==s))break;p++}h?MW(e,c,p,r+1,o,h,a):ct;){var x=!0,k=!1;if(!w||b>i[w-1].to){var j=OW[b-1];j!=s&&(x=!1,k=16==j)}var S=x||1!=s?null:[],C=x?r:r+1,$=b;e:for(;;)if(w&&$==i[w-1].to){if(k)break e;var _=i[--w];if(!x)for(var O=_.from,M=w;;){if(O==t)break e;if(!M||i[M-1].to!=O){if(OW[O-1]==s)break e;break}O=i[--M].from}if(S)S.push(_);else _.to=0;p-=3)if(yW[p+1]==-u){var m=yW[p+2],g=2&m?o:4&m?1&m?i:o:0;g&&(OW[v]=OW[yW[p]]=g),s=p;break}}else{if(189==yW.length)break;yW[s++]=v,yW[s++]=l,yW[s++]=c}else if(2==(f=OW[v])||1==f){var y=f==o;c=y?0:1;for(var b=s-3;b>=0;b-=3){var w=yW[b+2];if(2&w)break;if(y)yW[b+2]|=2;else{if(4&w)break;yW[b+2]|=4}}}}(e,o,i,r,s),function(e,t,n,r){for(var o=0,i=r;o<=n.length;o++)for(var a=o?n[o-1].to:e,s=oc;)h==p&&(h=n[--v].from,p=v?n[v-1].to:e),OW[--h]=d;c=u}else i=l,c++}}(o,i,r,s),MW(e,o,i,t,n,r,a)}function EW(e){return[new $W(0,e,0)]}var PW="";function TW(e,t,n,r,o){var i,a=r.head-e.from,s=$W.find(t,a,null!==(i=r.bidiLevel)&&void 0!==i?i:-1,r.assoc),c=t[s],l=c.side(o,n);if(a==l){var u=s+=o?1:-1;if(u<0||u>=t.length)return null;a=(c=t[s=u]).side(!o,n),l=c.side(o,n)}var f=pF(e.text,a,c.forward(o,n));(fc.to)&&(f=l),PW=e.text.slice(Math.min(a,f),Math.max(a,f));var d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d&&f==l&&d.level+(o?0:1)1&&void 0!==arguments[1]?arguments[1]:"nearest",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];No(this,e),this.range=t,this.y=n,this.x=r,this.yMargin=o,this.xMargin=i,this.isSnapshot=a}return Do(e,[{key:"map",value:function(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},{key:"clip",value:function(t){return this.range.to<=t.doc.length?this:new e(RF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}]),e}(),WW=dV.define({map:function(e,t){return e.map(t)}});function UW(e,t,n){var r=e.facet(zW);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 JW=DF.define({combine:function(e){return!e.length||e[0]}}),KW=0,GW=DF.define(),QW=function(){function e(t,n,r,o,i){No(this,e),this.id=t,this.create=n,this.domEventHandlers=r,this.domEventObservers=o,this.extension=i(this)}return Do(e,null,[{key:"define",value:function(t,n){var r=n||{},o=r.eventHandlers,i=r.eventObservers,a=r.provide,s=r.decorations;return new e(KW++,t,o,i,(function(e){var t=[GW.of(e)];return s&&t.push(eU.of((function(t){var n=t.plugin(e);return n?s(n):nW.none}))),a&&t.push(a(e)),t}))}},{key:"fromClass",value:function(t,n){return e.define((function(e){return new t(e)}),n)}}]),e}(),YW=function(){function e(t){No(this,e),this.spec=t,this.mustUpdate=null,this.value=null}return Do(e,[{key:"update",value:function(e){if(this.value){if(this.mustUpdate){var t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(UW(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){UW(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){UW(e.state,t,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),e}(),XW=DF.define(),ZW=DF.define(),eU=DF.define(),tU=DF.define(),nU=DF.define(),rU=DF.define();function oU(e,t){var n=e.state.facet(rU);if(!n.length)return n;var r=n.map((function(t){return t instanceof Function?t(e):t})),o=[];return AV.spans(r,t.from,t.to,{point:function(){},span:function(e,n,r,i){for(var a=e-t.from,s=n-t.from,c=o,l=r.length-1;l>=0;l--,i--){var u=r[l].spec.bidiIsolate,f=void 0;if(null==u&&(u=RW(t.text,a,s)),i>0&&c.length&&(f=c[c.length-1]).to==a&&f.direction==u)f.to=s,c=f.inner;else{var d={from:a,to:s,direction:u,inner:[]};c.push(d),c=d.inner}}}}),o}var iU=DF.define();function aU(e){var t,n=0,r=0,o=0,i=0,a=bo(e.state.facet(iU));try{for(a.s();!(t=a.n()).done;){var s=(0,t.value)(e);s&&(null!=s.left&&(n=Math.max(n,s.left)),null!=s.right&&(r=Math.max(r,s.right)),null!=s.top&&(o=Math.max(o,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}}catch(e){a.e(e)}finally{a.f()}return{left:n,right:r,top:o,bottom:i}}var sU=DF.define(),cU=function(){function e(t,n,r,o){No(this,e),this.fromA=t,this.toA=n,this.fromB=r,this.toB=o}return Do(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(e){for(var t=e.length,n=this;t>0;t--){var r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAu)break;i+=2}if(!c)return r;new e(c.fromA,c.toA,c.fromB,c.toB).addToSet(r),a=c.toA,s=c.toB}}}]),e}(),lU=function(){function e(t,n,r){No(this,e),this.view=t,this.state=n,this.transactions=r,this.flags=0,this.startState=t.state,this.changes=$F.empty(this.startState.doc.length);var o,i=bo(r);try{for(i.s();!(o=i.n()).done;){var a=o.value;this.changes=this.changes.compose(a.changes)}}catch(e){i.e(e)}finally{i.f()}var s=[];this.changes.iterChangedRanges((function(e,t,n,r){return s.push(new cU(e,t,n,r))})),this.changedRanges=s}return Do(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(e){return e.selection}))}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(t,n,r){return new e(t,n,r)}}]),e}(),uU=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).view=e,n.decorations=[],n.dynamicDecorationMap=[],n.domChanged=null,n.hasComposition=null,n.markedForComposition=new Set,n.minWidth=0,n.minWidthFrom=0,n.minWidthTo=0,n.impreciseAnchor=null,n.impreciseHead=null,n.forceSelection=!1,n.lastUpdate=Date.now(),n.setDOM(e.contentDOM),n.children=[new XH],n.children[0].setParent(Ao(n)),n.updateDeco(),n.updateInner([new cU(0,0,0,e.state.doc.length)],0,null),n}return Eo(t,jH),Do(t,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(e){var t,n=this,r=e.changedRanges;this.minWidth>0&&r.length&&(r.every((function(e){var t=e.fromA;return e.toAn.minWidthTo}))?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);var o=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?o=this.domChanged.newSel.head:function(e,t){var n=!1;t&&e.iterChangedRanges((function(e,r){et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(o=e.state.selection.main.head));var i=o>-1?function(e,t,n){var r=dU(e,n);if(!r)return null;var o=r.node,i=r.from,a=r.to,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(r.from,r.to)!=s)return null;for(var c=t.invertedDesc,l=new cU(c.mapPos(i),c.mapPos(a),i,a),u=[],f=o.parentNode;;f=f.parentNode){var d=jH.get(f);if(d instanceof LH)u.push({node:f,deco:d.mark});else{if(d instanceof XH||"DIV"==f.nodeName&&f.parentNode==e.contentDOM)return{range:l,text:o,marks:u,line:f};if(f==e.contentDOM)return null;u.push({node:f,deco:new rW({inclusive:!0,attributes:YH(f),tagName:f.tagName.toLowerCase()})})}}}(this.view,e.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();var a=this.hasComposition,s=a.from,c=a.to;r=new cU(s,c,e.changes.mapPos(s,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(qH.ie||qH.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);var l,u,f,d,h=this.decorations,v=this.updateDeco(),p=(l=h,u=v,f=e.changes,d=new vU,AV.compare(l,u,f,d),d.changes);return r=cU.extendWithRanges(r,p),!!(7&this.flags||0!=r.length)&&(this.updateInner(r,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}},{key:"updateInner",value:function(e,t,n){var r=this;this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);var o=this.view.observer;o.ignore((function(){r.dom.style.height=r.view.viewState.contentHeight/r.view.scaleY+"px",r.dom.style.flexBasis=r.minWidth?r.minWidth+"px":"";var e=qH.chrome||qH.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;r.sync(r.view,e),r.flags&=-8,e&&(e.written||o.selectionRange.focusNode!=e.node)&&(r.forceSelection=!0),r.dom.style.height=""})),this.markedForComposition.forEach((function(e){return e.flags&=-9}));var i=[];if(this.view.viewport.from||this.view.viewport.to=0?r[i]:null;if(!a)break;var s=a.fromA,c=a.toA,l=a.fromB,u=a.toB,f=void 0,d=void 0,h=void 0,v=void 0;if(n&&n.range.fromBl){var p=cW.build(this.view.state.doc,l,n.range.fromB,this.decorations,this.dynamicDecorationMap),m=cW.build(this.view.state.doc,n.range.toB,u,this.decorations,this.dynamicDecorationMap);d=p.breakAtStart,h=p.openStart,v=m.openEnd;var g=this.compositionView(n);m.breakAtStart?g.breakAfter=1:m.content.length&&g.merge(g.length,g.length,m.content[0],!1,m.openStart,0)&&(g.breakAfter=m.content[0].breakAfter,m.content.shift()),p.content.length&&g.merge(0,0,p.content[p.content.length-1],!0,0,p.openEnd)&&p.content.pop(),f=p.content.concat(g).concat(m.content)}else{var y=cW.build(this.view.state.doc,l,u,this.decorations,this.dynamicDecorationMap);f=y.content,d=y.breakAtStart,h=y.openStart,v=y.openEnd}var b=o.findPos(c,1),w=b.i,x=b.off,k=o.findPos(s,-1);$H(this,k.i,k.off,w,x,f,d,h,v)}n&&this.fixCompositionDOM(n)}},{key:"compositionView",value:function(e){var t=new BH(e.text.nodeValue);t.flags|=8;var n,r=bo(e.marks);try{for(r.s();!(n=r.n()).done;){var o=n.value.deco;t=new LH(o,[t],t.length)}}catch(e){r.e(e)}finally{r.f()}var i=new XH;return i.append(t,0),i}},{key:"fixCompositionDOM",value:function(e){var t=this,n=function(e,n){n.flags|=8|(n.children.some((function(e){return 7&e.flags}))?1:0),t.markedForComposition.add(n);var r=jH.get(e);r&&r!=n&&(r.dom=null),n.setDOM(e)},r=this.childPos(e.range.fromB,1),o=this.children[r.i];n(e.line,o);for(var i=e.marks.length-1;i>=-1;i--)r=o.childPos(r.off,1),o=o.children[r.i],n(i>=0?e.marks[i].node:e.text,o)}},{key:"updateSelection",value:function(){var e=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();var n=this.view.root.activeElement,r=n==this.dom,o=!r&&oH(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(r||t||o){var i=this.forceSelection;this.forceSelection=!1;var a,s=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?c:this.moveToLine(this.domAtPos(s.head));if(qH.gecko&&s.empty&&!this.hasComposition&&(1==(a=c).node.nodeType&&a.node.firstChild&&(0==a.offset||"false"==a.node.childNodes[a.offset-1].contentEditable)&&(a.offset==a.node.childNodes.length||"false"==a.node.childNodes[a.offset].contentEditable))){var u=document.createTextNode("");this.view.observer.ignore((function(){return c.node.insertBefore(u,c.node.childNodes[c.offset]||null)})),c=l=new xH(u,0),i=!0}var f=this.view.observer.selectionRange;!i&&f.focusNode&&(aH(c.node,c.offset,f.anchorNode,f.anchorOffset)&&aH(l.node,l.offset,f.focusNode,f.focusOffset)||this.suppressWidgetCursorChange(f,s))||(this.view.observer.ignore((function(){qH.android&&qH.chrome&&e.dom.contains(f.focusNode)&&function(e,t){for(var n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(f.focusNode,e.dom)&&(e.dom.blur(),e.dom.focus({preventScroll:!0}));var t=nH(e.view.root);if(t)if(s.empty){if(qH.gecko){var r=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(ts.head){var u=[l,c];c=u[0],l=u[1]}a.setEnd(l.node,l.offset),a.setStart(c.node,c.offset),t.removeAllRanges(),t.addRange(a)}else;o&&e.view.root.activeElement==e.dom&&(e.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new xH(f.anchorNode,f.anchorOffset),this.impreciseHead=l.precise?null:new xH(f.focusNode,f.focusOffset)}}},{key:"suppressWidgetCursorChange",value:function(e,t){return this.hasComposition&&t.empty&&aH(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}},{key:"enforceCursorAssoc",value:function(){if(!this.hasComposition){var e=this.view,t=e.state.selection.main,n=nH(e.root),r=e.observer.selectionRange,o=r.anchorNode,i=r.anchorOffset;if(n&&t.empty&&t.assoc&&n.modify){var a=XH.find(this,t.head);if(a){var s=a.posAtStart;if(t.head!=s&&t.head!=s+a.length){var c=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(c&&l&&!(c.bottom>l.top)){var u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();var f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(o,i)}}}}}}},{key:"moveToLine",value:function(e){var t,n=this.dom;if(e.node!=n)return e;for(var r=e.offset;!t&&r=0;i--){var a=jH.get(n.childNodes[i]);a instanceof XH&&(t=a.domAtPos(a.length))}return t?new xH(t.node,t.offset,!0):e}},{key:"nearest",value:function(e){for(var t=e;t;){var n=jH.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}},{key:"posFromDOM",value:function(e,t){var n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}},{key:"domAtPos",value:function(e){for(var t=this.childCursor().findPos(e,-1),n=t.i,r=t.off;n=0;i--){var a=this.children[i],s=o-a.breakAfter,c=s-a.length;if(se||a.covers(1))&&(!n||a instanceof XH&&!(n instanceof XH&&t>=0))&&(n=a,r=c),o=c}return n?n.coordsAt(e-r,t):null}},{key:"coordsForChar",value:function(e){var t=this.childPos(e,1),n=t.i,r=t.off,o=this.children[n];if(!(o instanceof XH))return null;for(;o.children.length;){for(var i=o.childPos(r,1),a=i.i,s=i.off;;a++){if(a==o.children.length)return null;if((o=o.children[a]).length)break}r=s}if(!(o instanceof BH))return null;var c=pF(o.text,r);if(c==r)return null;for(var l=gH(o.dom,r,c).getClientRects(),u=0;uMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==fW.LTR,c=0,l=0;lr)break;if(c>=n){var d=u.dom.getBoundingClientRect();if(t.push(d.height),i){var h=u.dom.lastChild,v=h?iH(h):[];if(v.length){var p=v[v.length-1],m=s?p.right-d.left:d.right-p.left;m>a&&(a=m,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+u.breakAfter}return t}},{key:"textDirectionAt",value:function(e){var t=this.childPos(e,1).i;return"rtl"==getComputedStyle(this.children[t].dom).direction?fW.RTL:fW.LTR}},{key:"measureTextSize",value:function(){var e,t=this,n=bo(this.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r instanceof XH){var o=r.measureTextSize();if(o)return o}}}catch(e){n.e(e)}finally{n.f()}var i,a,s,c=document.createElement("div");return c.className="cm-line",c.style.width="99999px",c.style.position="absolute",c.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((function(){t.dom.appendChild(c);var e=iH(c.firstChild)[0];i=c.getBoundingClientRect().height,a=e?e.width/27:7,s=e?e.height:i,c.remove()})),{lineHeight:i,charWidth:a,textHeight:s}}},{key:"childCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,t=this.children.length;return t&&(e-=this.children[--t].length),new CH(this.children,e,t)}},{key:"computeBlockGapDeco",value:function(){for(var e=[],t=this.view.viewState,n=0,r=0;;r++){var o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.length;if(i>n){var a=(t.lineBlockAt(i).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(nW.replace({widget:new fU(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return nW.set(e)}},{key:"updateDeco",value:function(){var e=this,t=this.view.state.facet(eU).map((function(t,n){return(e.dynamicDecorationMap[n]="function"==typeof t)?t(e.view):t})),n=!1,r=this.view.state.facet(tU).map((function(t,r){var o="function"==typeof t;return o&&(n=!0),o?t(e.view):t}));r.length&&(this.dynamicDecorationMap[t.length]=n,t.push(AV.join(r)));for(var o=t.length;or.anchor?-1:1);if(o){!r.empty&&(n=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(o={left:Math.min(o.left,n.left),top:Math.min(o.top,n.top),right:Math.max(o.right,n.right),bottom:Math.max(o.bottom,n.bottom)});var i=aU(this.view),a={left:o.left-i.left,top:o.top-i.top,right:o.right+i.right,bottom:o.bottom+i.bottom},s=this.view.scrollDOM,c=s.offsetWidth,l=s.offsetHeight;!function(e,t,n,r,o,i,a,s){for(var c=e.ownerDocument,l=c.defaultView||window,u=e,f=!1;u&&!f;)if(1==u.nodeType){var d=void 0,h=u==c.body,v=1,p=1;if(h)d=fH(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(f=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}var m=u.getBoundingClientRect(),g=dH(u,m);v=g.scaleX,p=g.scaleY,d={left:m.left,right:m.left+u.clientWidth*v,top:m.top,bottom:m.top+u.clientHeight*p}}var y=0,b=0;if("nearest"==o)t.top0&&t.bottom>d.bottom+b&&(b=t.bottom-d.bottom+b+a)):t.bottom>d.bottom&&(b=t.bottom-d.bottom+a,n<0&&t.top-b0&&t.right>d.right+y&&(y=t.right-d.right+y+i)):t.right>d.right&&(y=t.right-d.right+i,n<0&&t.left0))break;o=lH(r=r.childNodes[o-1])}if(n>=0)for(var i=e,a=t;;){if(3==i.nodeType)return{node:i,offset:a};if(!(1==i.nodeType&&a=0))break;i=i.childNodes[a],a=0}return null}var vU=function(){function e(){No(this,e),this.changes=[]}return Do(e,[{key:"compareRange",value:function(e,t){sW(e,t,this.changes)}},{key:"comparePoint",value:function(e,t){sW(e,t,this.changes)}}]),e}();function pU(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function mU(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function gU(e,t){return e.topt.top+1}function yU(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function wU(e,t,n){for(var r,o,i,a,s,c,l,u,f=!1,d=e.firstChild;d;d=d.nextSibling)for(var h=iH(d),v=0;vg||a==g&&i>m){r=d,o=p,i=m,a=g;var y=g?n0?v0)}0==m?n>p.bottom&&(!l||l.bottomp.top)&&(c=d,u=p):l&&gU(l,p)?l=bU(l,p.bottom):u&&gU(u,p)&&(u=yU(u,p.top))}if(l&&l.bottom>=n?(r=s,o=l):u&&u.top<=n&&(r=c,o=u),!r)return{node:e,offset:0};var b=Math.max(o.left,Math.min(o.right,t));return 3==r.nodeType?xU(r,b,n):f&&"false"!=r.contentEditable?wU(r,b,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(o.left+o.right)/2?1:0)}}function xU(e,t,n){for(var r=e.nodeValue.length,o=-1,i=1e9,a=0,s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=t&&u.right+1>=t&&f=(u.left+u.right)/2,h=d;if(qH.chrome||qH.gecko)gH(e,s).getBoundingClientRect().left==u.right&&(h=!d);if(f<=0)return{node:e,offset:s+(h?1:0)};o=s+(h?1:0),i=f}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function kU(e,t,n){var r,o,i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=e.contentDOM.getBoundingClientRect(),c=s.top+e.viewState.paddingTop,l=e.viewState.docHeight,u=t.x,f=t.y,d=f-c;if(d<0)return 0;if(d>l)return e.state.doc.length;for(var h=e.viewState.heightOracle.textHeight/2,v=!1;(i=e.elementAtHeight(d)).type!=tW.Text;)for(;!((d=a>0?i.bottom+h:i.top-h)>=0&&d<=l);){if(v)return n?null:0;v=!0,a=-a}f=c+d;var p=i.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:jU(e,s,i,u,f);var m=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:m,y=g.elementFromPoint(u,f);y&&!e.contentDOM.contains(y)&&(y=null),y||(u=Math.max(s.left+1,Math.min(s.right-1,u)),(y=g.elementFromPoint(u,f))&&!e.contentDOM.contains(y)&&(y=null));var b,w=-1;if(y&&0!=(null===(r=e.docView.nearest(y))||void 0===r?void 0:r.isEditable))if(m.caretPositionFromPoint){var x=m.caretPositionFromPoint(u,f);x&&(b=x.offsetNode,w=x.offset)}else if(m.caretRangeFromPoint){var k=m.caretRangeFromPoint(u,f);k&&(b=k.startContainer,w=k.startOffset,(!e.contentDOM.contains(b)||qH.safari&&function(e,t,n){var r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(var o=e.nextSibling;o;o=o.nextSibling)if(1!=o.nodeType||"BR"!=o.nodeName)return!1;return gH(e,r-1,r).getBoundingClientRect().left>n}(b,w,u)||qH.chrome&&function(e,t,n){if(0!=t)return!1;for(var r=e;;){var o=r.parentNode;if(!o||1!=o.nodeType||o.firstChild!=r)return!1;if(o.classList.contains("cm-line"))break;r=o}var i=1==e.nodeType?e.getBoundingClientRect():gH(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}(b,w,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){var j=XH.find(e.docView,p);if(!j)return d>i.top+i.height/2?i.to:i.from;var S=wU(j.dom,u,f);b=S.node,w=S.offset}var C=e.docView.nearest(b);if(!C)return null;if(C.isWidget&&1==(null===(o=C.dom)||void 0===o?void 0:o.nodeType)){var $=C.dom.getBoundingClientRect();return t.y<$.top||t.y<=$.bottom&&t.x<=($.left+$.right)/2?C.posAtStart:C.posAtEnd}return C.localPosFromDOM(b,w)+C.posAtStart}function jU(e,t,n,r,o){var i=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){var a=e.viewState.heightOracle.textHeight;i+=Math.floor((o-n.top-.5*(e.defaultLineHeight-a))/a)*e.viewState.heightOracle.lineLength}var s=e.state.sliceDoc(n.from,n.to);return n.from+VV(s,i,e.state.tabSize)}function SU(e,t){var n=e.lineBlockAt(t);if(Array.isArray(n.type)){var r,o=bo(n.type);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i.to>t||i.to==t&&(i.to==n.to||i.type==tW.Text))return i}}catch(e){o.e(e)}finally{o.f()}}return n}function CU(e,t,n,r){for(var o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from),s=t,c=null;;){var l=TW(o,i,a,s,n),u=PW;if(!l){if(o.number==(n?e.state.doc.lines:1))return s;u="\n",o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),l=e.visualLineSide(o,!n)}if(c){if(!c(u))return s}else{if(!r)return l;c=r(u)}s=l}}function $U(e,t,n){for(var r,o=function(){var r,o=0,i=bo(e);try{for(i.s();!(r=i.n()).done;){r.value.between(t-1,t+1,(function(e,r,i){if(t>e&&tn.from?-1:1);return r==n.from?n:RF.cursor(r,r-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((function(){return n.flushIOSKey()}),250),!0):(this.view.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,yH(this.view.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(qH.safari&&!qH.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}},{key:"startMouseSelection",value:function(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}},{key:"update",value:function(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),e}();function MU(e,t){return function(n,r){try{return t.call(e,r,n)}catch(e){UW(n.state,e)}}}function AU(e){var t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}var r,o=bo(e);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.spec;if(a&&a.domEventHandlers)for(var s in a.domEventHandlers){var c=a.domEventHandlers[s];c&&n(s).handlers.push(MU(i.value,c))}if(a&&a.domEventObservers)for(var l in a.domEventObservers){var u=a.domEventObservers[l];u&&n(l).observers.push(MU(i.value,u))}}}catch(e){o.e(e)}finally{o.f()}for(var f in IU)n(f).handlers.push(IU[f]);for(var d in DU)n(d).observers.push(DU[d]);return t}var EU=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],PU="dthko",TU=[16,17,18,20,91,92,224,225];function RU(e){return.7*Math.max(0,e)+8}var NU=function(){function e(t,n,r,o){No(this,e),this.view=t,this.startEvent=n,this.style=r,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=function(e){for(var t=e.ownerDocument,n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(t.contentDOM),this.atoms=t.state.facet(nU).map((function(e){return e(t)}));var i=t.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(SV.allowMultipleSelections)&&function(e,t){var n=e.state.facet(NW);return n.length?n[0](t):qH.mac?t.metaKey:t.ctrlKey}(t,n),this.dragging=!(!function(e,t){var n=e.state.selection.main;if(n.empty)return!1;var r=nH(e.root);if(!r||0==r.rangeCount)return!0;for(var o=r.getRangeAt(0).getClientRects(),i=0;i=t.clientX&&a.top<=t.clientY&&a.bottom>=t.clientY)return!0}return!1}(t,n)||1!=GU(n))&&null}return Do(e,[{key:"start",value:function(e){!1===this.dragging&&this.select(e)}},{key:"move",value:function(e){var t;if(0==e.buttons)return this.destroy();if(!(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))){var n,r;this.select(this.lastEvent=e);var o=0,i=0,a=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=aU(this.view);e.clientX-s.left<=a.left+6?o=-RU(a.left-e.clientX):e.clientX+s.right>=a.right-6&&(o=RU(e.clientX-a.right)),e.clientY-s.top<=a.top+6?i=-RU(a.top-e.clientY):e.clientY+s.bottom>=a.bottom-6&&(i=RU(e.clientY-a.bottom)),this.setScrollSpeed(o,i)}}},{key:"up",value:function(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}},{key:"setScrollSpeed",value:function(e,t){var n=this;this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval((function(){return n.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),!1===this.dragging&&this.select(this.lastEvent)}},{key:"skipAtoms",value:function(e){for(var t=null,n=0;n2&&void 0!==arguments[2]?arguments[2]:1,r=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return RF.cursor(t);0==i?n=1:i==o.length&&(n=-1);var a=i,s=i;n<0?a=pF(o.text,i,!1):s=pF(o.text,i);for(var c=r(o.text.slice(a,s));a>0;){var l=pF(o.text,a,!1);if(r(o.text.slice(l,a))!=c)break;a=l}for(;sDate.now()-2e3)return!1;var n,r=null,o=bo(e.state.facet(DW));try{for(o.s();!(n=o.n()).done;){if(r=(0,n.value)(e,t))break}}catch(e){o.e(e)}finally{o.f()}if(r||0!=t.button||(r=function(e,t){var n=HU(e,t),r=GU(t),o=e.state.selection;return{update:function(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),o=o.map(e.changes))},get:function(t,i,a){var s,c=HU(e,t),l=BU(e,c.pos,c.bias,r);if(n.pos!=c.pos&&!i){var u=BU(e,n.pos,n.bias,r),f=Math.min(u.from,l.from),d=Math.max(u.to,l.to);l=f1&&(s=function(e,t){for(var n=0;n=t)return RF.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(o,c.pos))?s:a?o.addRange(l):RF.create([l])}}}(e,t)),r){var i=!e.hasFocus;e.inputState.startMouseSelection(new NU(e,t,r,i)),i&&e.observer.ignore((function(){return mH(e.contentDOM)}));var a=e.inputState.mouseSelection;if(a)return a.start(t),!1===a.dragging}return!1};var LU=function(e,t){return e>=t.top&&e<=t.bottom},FU=function(e,t,n){return LU(t,n)&&e>=n.left&&e<=n.right};function VU(e,t,n,r){var o=XH.find(e.docView,t);if(!o)return 1;var i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;var a=o.coordsAt(i,-1);if(a&&FU(n,r,a))return-1;var s=o.coordsAt(i,1);return s&&FU(n,r,s)?1:a&&LU(r,a)?-1:1}function HU(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:VU(e,n,t.clientX,t.clientY)}}var WU=qH.ie&&qH.ie_version<=11,UU=null,JU=0,KU=0;function GU(e){if(!WU)return e.detail;var t=UU,n=KU;return UU=e,KU=Date.now(),JU=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(JU+1)%3:1}function QU(e,t,n,r){if(n){var o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),i=e.inputState.draggedContent,a=r&&i&&function(e,t){var n=e.state.facet(IW);return n.length?n[0](t):qH.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:n},c=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(o,-1),head:c.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}}IU.dragstart=function(e,t){var n=e.state.selection.main;if(t.target.draggable){var r=e.docView.nearest(t.target);if(r&&r.isWidget){var o=r.posAtStart,i=o+r.length;(o>=n.to||i<=n.from)&&(n=RF.range(o,i))}}var a=e.inputState;return a.mouseSelection&&(a.mouseSelection.dragging=!0),a.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},IU.dragend=function(e){return e.inputState.draggedContent=null,!1},IU.drop=function(e,t){if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;var n=t.dataTransfer.files;if(n&&n.length){for(var r=Array(n.length),o=0,i=function(){++o==n.length&&QU(e,t,r.filter((function(e){return null!=e})).join(e.state.lineBreak),!1)},a=function(e){var t=new FileReader;t.onerror=i,t.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),i()},t.readAsText(n[e])},s=0;sc&&(n.push(f.text),r.push({from:f.from,to:Math.min(e.doc.length,f.to+1)})),c=f.number}}catch(e){l.e(e)}finally{l.f()}o=!0}return{text:n.join(e.lineBreak),ranges:r,linewise:o}}(e.state),r=n.text,o=n.ranges,i=n.linewise;if(!r&&!i)return!1;YU=i?r:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"});var a=zU?null:t.clipboardData;return a?(a.clearData(),a.setData("text/plain",r),!0):(function(e,t){var n=e.dom.parentNode;if(n){var r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout((function(){r.remove(),e.focus()}),50)}}(e,r),!1)};var XU=lV.define();function ZU(e,t){var n,r=[],o=bo(e.facet(LW));try{for(o.s();!(n=o.n()).done;){var i=(0,n.value)(e,t);i&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return r?e.update({effects:r,annotations:XU.of(!0)}):null}function eJ(e){setTimeout((function(){var t=e.hasFocus;if(t!=e.inputState.notifiedFocused){var n=ZU(e.state,t);n?e.dispatch(n):e.update([])}}),10)}DU.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),eJ(e)},DU.blur=function(e){e.observer.clearSelectionRange(),eJ(e)},DU.compositionstart=DU.compositionupdate=function(e){null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},DU.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,qH.chrome&&qH.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((function(){return e.observer.flush()})):setTimeout((function(){e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50)},DU.contextmenu=function(e){e.inputState.lastContextMenu=Date.now()},IU.beforeinput=function(e,t){var n,r;if(qH.chrome&&qH.android&&(r=EU.find((function(e){return e.inputType==t.inputType})))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){var o=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((function(){var t;((null===(t=window.visualViewport)||void 0===t?void 0:t.height)||0)>o+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())}),100)}return!1};var tJ=new Set;var nJ=["pre-wrap","normal","pre-line","break-spaces"],rJ=function(){function e(t){No(this,e),this.lineWrapping=t,this.doc=eF.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}return Do(e,[{key:"heightForGap",value:function(e,t){var n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}},{key:"heightForLine",value:function(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(e){return this.doc=e,this}},{key:"mustRefreshForWrapping",value:function(e){return nJ.indexOf(e)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(e){for(var t=!1,n=0;n-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=o,s){this.heightSamples={};for(var c=0;c2&&void 0!==arguments[2]?arguments[2]:2;No(this,e),this.length=t,this.height=n,this.flags=r}return Do(e,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(e){this.flags=(e?2:0)|-3&this.flags}},{key:"setHeight",value:function(e,t){this.height!=t&&(Math.abs(this.height-t)>sJ&&(e.heightChanged=!0),this.height=t)}},{key:"replace",value:function(t,n,r){return e.of(r)}},{key:"decomposeLeft",value:function(e,t){t.push(this)}},{key:"decomposeRight",value:function(e,t){t.push(this)}},{key:"applyChanges",value:function(e,t,n,r){for(var o=this,i=n.doc,a=r.length-1;a>=0;a--){var s=r[a],c=s.fromA,l=s.toA,u=s.fromB,f=s.toB,d=o.lineAt(c,aJ.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:o.lineAt(l,aJ.ByPosNoHeight,n,0,0);for(f+=h.to-l,l=h.to;a>0&&d.from<=r[a-1].toA;)c=r[a-1].fromA,u=r[a-1].fromB,a--,c2*i){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,o-=a.size}else{if(!(i>2*o))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,i-=s.size}else if(o=o&&i(this.blockAt(0,n,r,o))}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>3?arguments[3]:void 0;return n&&n.from<=t&&n.more&&this.setHeight(e,n.heights[n.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),t}(),uJ=function(e){function t(e,n){var r;return No(this,t),(r=_o(this,t,[e,n,null])).collapsed=0,r.widgetHeight=0,r.breaks=0,r}return Eo(t,lJ),Do(t,[{key:"blockAt",value:function(e,t,n,r){return new iJ(r,this.length,n,this.height,this.breaks)}},{key:"replace",value:function(e,n,r){var o=r[0];return 1==r.length&&(o instanceof t||o instanceof fJ&&4&o.flags)&&Math.abs(this.length-o.length)<10?(o instanceof fJ?o=new t(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):cJ.of(r)}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),t}(),fJ=function(e){function t(e){return No(this,t),_o(this,t,[e,0])}return Eo(t,cJ),Do(t,[{key:"heightMetrics",value:function(e,t){var n,r=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-r+1,a=0;if(e.lineWrapping){var s=Math.min(this.height,e.lineHeight*i);n=s/i,this.length>i+1&&(a=(this.height-s)/(this.length-i-1))}else n=this.height/i;return{firstLine:r,lastLine:o,perLine:n,perChar:a}}},{key:"blockAt",value:function(e,t,n,r){var o=this.heightMetrics(t,r),i=o.firstLine,a=o.lastLine,s=o.perLine,c=o.perChar;if(t.lineWrapping){var l=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),u=t.doc.lineAt(l),f=s+u.length*c,d=Math.max(n,e-f/2);return new iJ(u.from,u.length,d,f,0)}var h=Math.max(0,Math.min(a-i,Math.floor((e-n)/s))),v=t.doc.line(i+h),p=v.from,m=v.length;return new iJ(p,m,n+s*h,s,0)}},{key:"lineAt",value:function(e,t,n,r,o){if(t==aJ.ByHeight)return this.blockAt(e,n,r,o);if(t==aJ.ByPosNoHeight){var i=n.doc.lineAt(e),a=i.from,s=i.to;return new iJ(a,s-a,0,0,0)}var c=this.heightMetrics(n,o),l=c.firstLine,u=c.perLine,f=c.perChar,d=n.doc.lineAt(e),h=u+d.length*f,v=d.number-l,p=r+u*v+f*(d.from-o-v);return new iJ(d.from,d.length,Math.max(r,Math.min(p,r+this.height-h)),h,0)}},{key:"forEachLine",value:function(e,t,n,r,o,i){e=Math.max(e,o),t=Math.min(t,o+this.length);for(var a=this.heightMetrics(n,o),s=a.firstLine,c=a.perLine,l=a.perChar,u=e,f=r;u<=t;){var d=n.doc.lineAt(u);if(u==e){var h=d.number-s;f+=c*h+l*(e-o-h)}var v=c+l*d.length;i(new iJ(d.from,d.length,f,v,0)),f+=v,u=d.to+1}}},{key:"replace",value:function(e,n,r){var o=this.length-n;if(o>0){var i=r[r.length-1];i instanceof t?r[r.length-1]=new t(i.length+o):r.push(null,new t(o-1))}if(e>0){var a=r[0];a instanceof t?r[0]=new t(e+a.length):r.unshift(new t(e-1),null)}return cJ.of(r)}},{key:"decomposeLeft",value:function(e,n){n.push(new t(e-1),null)}},{key:"decomposeRight",value:function(e,n){n.push(null,new t(this.length-e-1))}},{key:"updateHeight",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0,i=n+this.length;if(o&&o.from<=n+this.length&&o.more){var a=[],s=Math.max(n,o.from),c=-1;for(o.from>n&&a.push(new t(o.from-n-1).updateHeight(e,n));s<=i&&o.more;){var l=e.doc.lineAt(s).length;a.length&&a.push(null);var u=o.heights[o.index++];-1==c?c=u:Math.abs(u-c)>=sJ&&(c=-2);var f=new uJ(l,u);f.outdated=!1,a.push(f),s+=l+1}s<=i&&a.push(null,new t(i-s).updateHeight(e,s));var d=cJ.of(a);return(c<0||Math.abs(d.height-this.height)>=sJ||Math.abs(c-this.heightMetrics(e,n).perLine)>=sJ)&&(e.heightChanged=!0),d}return(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),t}(),dJ=function(e){function t(e,n,r){var o;return No(this,t),(o=_o(this,t,[e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)])).left=e,o.right=r,o.size=e.size+r.size,o}return Eo(t,cJ),Do(t,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(e,t,n,r){var o=n+this.left.height;return ea))return c;var l=t==aJ.ByPosNoHeight?aJ.ByPosNoHeight:aJ.ByPos;return s?c.join(this.right.lineAt(a,l,n,i,a)):this.left.lineAt(a,l,n,r,o).join(c)}},{key:"forEachLine",value:function(e,t,n,r,o,i){var a=r+this.left.height,s=o+this.left.length+this.break;if(this.break)e=s&&this.right.forEachLine(e,t,n,a,s,i);else{var c=this.lineAt(s,aJ.ByPos,n,r,o);e=e&&c.from<=t&&i(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,a,s,i)}}},{key:"replace",value:function(e,t,n){var r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));var o=[];e>0&&this.decomposeLeft(e,o);var i,a=o.length,s=bo(n);try{for(s.s();!(i=s.n()).done;){var c=i.value;o.push(c)}}catch(e){s.e(e)}finally{s.f()}if(e>0&&hJ(o,a-1),t=++n&&t.push(null),e>n&&this.right.decomposeLeft(e-n,t)}},{key:"decomposeRight",value:function(e,t){var n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?cJ.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}},{key:"updateHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,o=this.left,i=this.right,a=t+o.length+this.break,s=null;return r&&r.from<=t+o.length&&r.more?s=o=o.updateHeight(e,t,n,r):o.updateHeight(e,t,n),r&&r.from<=a+i.length&&r.more?s=i=i.updateHeight(e,a,n,r):i.updateHeight(e,a,n),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),t}();function hJ(e,t){var n,r;null==e[t]&&(n=e[t-1])instanceof fJ&&(r=e[t+1])instanceof fJ&&e.splice(t-1,3,new fJ(n.length+1+r.length))}var vJ=function(){function e(t,n){No(this,e),this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}return Do(e,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(e,t){if(this.lineStart>-1){var n=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof uJ?r.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new uJ(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}},{key:"point",value:function(e,t,n){if(e=5)&&this.addLineDeco(r,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)){var e=this.oracle.doc.lineAt(this.pos),t=e.from,n=e.to;this.lineStart=t,this.lineEnd=n,this.writtenTot&&this.nodes.push(new uJ(this.pos-t,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(e,t){var n=new fJ(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}},{key:"ensureLine",value:function(){this.enterLine();var e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof uJ)return e;var t=new uJ(0,-1);return this.nodes.push(t),t}},{key:"addBlock",value:function(e){this.enterLine();var t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}},{key:"addLineDeco",value:function(e,t,n){var r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}},{key:"finish",value:function(e){var t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof uJ||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=f.overflow){var d=u.getBoundingClientRect();i=Math.max(i,d.left),a=Math.min(a,d.right),s=Math.max(s,d.top),c=l==e.parentNode?d.bottom:Math.min(c,d.bottom)}l="absolute"==f.position||"fixed"==f.position?u.offsetParent:u.parentNode}else{if(11!=l.nodeType)break;l=l.host}return{left:i-n.left,right:Math.max(i,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function gJ(e,t){var n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var yJ=function(){function e(t,n,r){No(this,e),this.from=t,this.to=n,this.size=r}return Do(e,[{key:"draw",value:function(e,t){return nW.replace({widget:new bJ(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}],[{key:"same",value:function(e,t){if(e.length!=t.length)return!1;for(var n=0;n=t&&r<=n}))){var i=e.lineBlockAt(r),a=i.from,s=i.to;t.push(new xJ(a,s))}},o=0;o<=1;o++)r();this.viewports=t.sort((function(e,t){return e.from-t.from})),this.scaler=this.heightMap.height<=7e6?CJ:new $J(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var e=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(function(t){e.viewportLines.push(1==e.scaler.scale?t:_J(t,e.scaler))}))}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=e.state;var n=this.stateDeco;this.stateDeco=this.state.facet(eU).filter((function(e){return"function"!=typeof e}));var r,o,i,a,s=e.changedRanges,c=cU.extendWithRanges(s,(r=n,o=this.stateDeco,i=e?e.changes:$F.empty(this.state.doc.length),a=new pJ,AV.compare(r,o,i,a,0),a.changes)),l=this.heightMap.height,u=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),c),this.heightMap.height!=l&&(e.flags|=2),u?(this.scrollAnchorPos=e.changes.mapPos(u.from,-1),this.scrollAnchorHeight=u.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);var f=c.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headf.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,t));var d=!e.changes.empty||2&e.flags||f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,this.updateForViewport(),d&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(VW)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(e){var t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?fW.RTL:fW.LTR;var i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,l=0;if(a.width&&a.height){var u=dH(t,a),f=u.scaleX,d=u.scaleY;this.scaleX==f&&this.scaleY==d||(this.scaleX=f,this.scaleY=d,c|=8,i=s=!0)}var h=(parseInt(n.paddingTop)||0)*this.scaleY,v=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==h&&this.paddingBottom==v||(this.paddingTop=h,this.paddingBottom=v,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);var p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=wH(e.scrollDOM);var m=(this.printing?gJ:mJ)(t,this.paddingTop),g=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;var b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(s=!0)),!this.inView&&!this.scrollTarget)return 0;var w=a.width;if(this.contentDOMWidth==w&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),s){var x=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(x)&&(i=!0),i||r.lineWrapping&&Math.abs(w-this.contentDOMWidth)>r.charWidth){var k=e.docView.measureTextSize(),j=k.lineHeight,S=k.charWidth,C=k.textHeight;(i=j>0&&r.refresh(o,j,S,C,w/S,x))&&(e.docView.minWidth=0,c|=8)}g>0&&y>0?l=Math.max(g,y):g<0&&y<0&&(l=Math.min(g,y)),r.heightChanged=!1;var $,_=bo(this.viewports);try{for(_.s();!($=_.n()).done;){var O=$.value,M=O.from==this.viewport.from?x:e.docView.measureVisibleLineHeights(O);this.heightMap=(i?cJ.empty().applyChanges(this.stateDeco,eF.empty,this.heightOracle,[new cU(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new oJ(O.from,M))}}catch(e){_.e(e)}finally{_.f()}r.heightChanged&&(c|=2)}var A=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.headthis.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(i?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.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(e,t){var n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,i=this.visibleTop,a=this.visibleBottom,s=new xJ(r.lineAt(i-1e3*n,aJ.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-n),aJ.ByHeight,o,0,0).to);if(t){var c=t.range.head;if(cs.to){var l,u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(c,aJ.ByPos,o,0,0);l="center"==t.y?(f.top+f.bottom)/2-u/2:"start"==t.y||"nearest"==t.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var o=this.heightMap.lineAt(t,aJ.ByPos,this.heightOracle,0,0).top,i=this.heightMap.lineAt(n,aJ.ByPos,this.heightOracle,0,0).bottom,a=this.visibleTop,s=this.visibleBottom;return(0==t||o<=a-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||i>=s+Math.max(10,Math.min(r,250)))&&o>a-2e3&&i>1,a=o<<1;if(this.defaultTextDirection!=fW.LTR&&!r)return[];var s,c=[],l=function o(a,s,l,u){if(!(s-aa&&p=l.from&&e.to<=l.to&&Math.abs(e.from-a)t}))}));if(!m){if(s=s}))){var g=t.moveToLineBoundary(RF.cursor(s),!1,!0).head;g>a&&(s=g)}m=new yJ(a,s,n.gapSize(l,a,s,u))}c.push(m)}},u=bo(this.viewportLines);try{for(u.s();!(s=u.n()).done;){var f=s.value;if(!(f.lengthf.from&&l(f.from,v,f,d),p=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((function(t){return t.from<=e&&t.to>=e}))||_J(this.heightMap.lineAt(e,aJ.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(e){return _J(this.heightMap.lineAt(this.scaler.fromDOM(e),aJ.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"scrollAnchorAt",value:function(e){var t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}},{key:"elementAtHeight",value:function(e){return _J(this.heightMap.blockAt(this.scaler.fromDOM(e),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}(),xJ=Do((function e(t,n){No(this,e),this.from=t,this.to=n}));function kJ(e,t,n){var r=[],o=e,i=0;return AV.spans(n,e,t,{span:function(){},point:function(e,t){e>o&&(r.push({from:o,to:e}),i+=e-o),o=t}},20),o=1)return r[r.length-1].to;for(var o=Math.floor(n*t),i=0;;i++){var a=r[i],s=a.from,c=a.to-s;if(o<=c)return s+o;o-=c}}function SJ(e,t){var n,r=0,o=bo(e.ranges);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=i.from,s=i.to;if(t<=s){r+=t-a;break}r+=s-a}}catch(e){o.e(e)}finally{o.f()}return r/e.total}var CJ={toDOM:function(e){return e},fromDOM:function(e){return e},scale:1},$J=function(){function e(t,n,r){No(this,e);var o=0,i=0,a=0;this.viewports=r.map((function(e){var r=e.from,i=e.to,a=n.lineAt(r,aJ.ByPos,t,0,0).top,s=n.lineAt(i,aJ.ByPos,t,0,0).bottom;return o+=s-a,{from:r,to:i,top:a,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-o)/(n.height-o);var s,c=bo(this.viewports);try{for(c.s();!(s=c.n()).done;){var l=s.value;l.domTop=a+(l.top-i)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),i=l.bottom}}catch(e){c.e(e)}finally{c.f()}}return Do(e,[{key:"toDOM",value:function(e){for(var t=0,n=0,r=0;;t++){var o=t-1}}),AJ=JV.newName(),EJ=JV.newName(),PJ=JV.newName(),TJ={"&light":"."+EJ,"&dark":"."+PJ};function RJ(e,t,n){return new JV(t,{finish:function(t){return/&/.test(t)?t.replace(/&\w*/,(function(t){if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: ".concat(t));return n[t]})):e+" "+t}})}var NJ=RJ("."+AJ,{"&":{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",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&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,\')',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"}},TJ),IJ="￿",DJ=function(){function e(t,n){No(this,e),this.points=t,this.text="",this.lineSeparator=n.facet(SV.lineSeparator)}return Do(e,[{key:"append",value:function(e){this.text+=e}},{key:"lineBreak",value:function(){this.text+=IJ}},{key:"readRange",value:function(e,t){if(!e)return this;for(var n=e.parentNode,r=e;;){this.findPointBefore(n,r);var o=this.text.length;this.readNode(r);var i=r.nextSibling;if(i==t)break;var a=jH.get(r),s=jH.get(i);(a&&s?a.breakAfter:(a?a.breakAfter:qJ(r))||qJ(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>o)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}},{key:"readTextNode",value:function(e){var t,n=e.nodeValue,r=bo(this.points);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.node==e&&(o.pos=this.text.length+Math.min(o.offset,n.length))}}catch(e){r.e(e)}finally{r.f()}for(var i=0,a=this.lineSeparator?null:/\r\n?|\n/g;;){var s=-1,c=1,l=void 0;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),c=this.lineSeparator.length):(l=a.exec(n))&&(s=l.index,c=l[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),c>1){var u,f=bo(this.points);try{for(f.s();!(u=f.n()).done;){var d=u.value;d.node==e&&d.pos>this.text.length&&(d.pos-=c-1)}}catch(e){f.e(e)}finally{f.f()}}i=s+c}}},{key:"readNode",value:function(e){if(!e.cmIgnore){var t=jH.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(var r=n.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}}},{key:"findPointBefore",value:function(e,t){var n,r=bo(this.points);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.node==e&&e.childNodes[o.offset]==t&&(o.pos=this.text.length)}}catch(e){r.e(e)}finally{r.f()}}},{key:"findPointInside",value:function(e,t){var n,r=bo(this.points);try{for(r.s();!(n=r.n()).done;){var o=n.value;(3==e.nodeType?o.node==e:e.contains(o.node))&&(o.pos=this.text.length+(zJ(e,o.node,o.offset)?t:0))}}catch(e){r.e(e)}finally{r.f()}}}]),e}();function zJ(e,t,n){for(;;){if(!t||n-1)this.newSel=null;else if(n>-1&&(this.bounds=t.docView.domBoundsAround(n,r,0))){var c=a||s?[]:function(e){var t=[];if(e.root.activeElement!=e.contentDOM)return t;var n=e.observer.selectionRange,r=n.anchorNode,o=n.anchorOffset,i=n.focusNode,a=n.focusOffset;r&&(t.push(new BJ(r,o)),i==r&&a==o||t.push(new BJ(i,a)));return t}(t),l=new DJ(c,t.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=function(e,t){if(0==e.length)return null;var n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?RF.single(n+t,r+t):null}(c,this.bounds.from)}else{var u=t.observer.selectionRange,f=a&&a.node==u.focusNode&&a.offset==u.focusOffset||!rH(t.contentDOM,u.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(u.focusNode,u.focusOffset),d=s&&s.node==u.anchorNode&&s.offset==u.anchorOffset||!rH(t.contentDOM,u.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(u.anchorNode,u.anchorOffset),h=t.viewport;if((qH.ios||qH.chrome)&&t.state.selection.main.empty&&f!=d&&(h.from>0||h.toDate.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){var a=t.bounds,s=a.from,c=a.to,l=o.from,u=null;(8===i||qH.android&&t.text.length0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,i-Math.min(a,s))-i}if(a=a?i-n:0)+(s-a),a=i}else if(s=s?i-n:0)+(a-s),s=i}return{from:i,toA:a,toB:s}}(e.state.doc.sliceString(s,c,IJ),t.text,l-s,u);f&&(qH.chrome&&13==i&&f.toB==f.from+2&&t.text.slice(f.from,f.toB)==IJ+IJ&&f.toB--,n={from:s+f.from,to:s+f.toA,insert:eF.of(t.text.slice(f.from,f.toB).split(IJ))})}else r&&(!e.hasFocus&&e.state.facet(JW)||r.main.eq(o))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!o.empty&&r&&r.main.empty?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,o.to)}:n&&n.from>=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,o.to))}:(qH.mac||qH.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=RF.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:eF.of([" "])}):qH.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=RF.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:eF.of([" "])}),n){if(qH.ios&&e.inputState.flushIOSKey())return!0;if(qH.android&&(n.from==o.from&&n.to==o.to&&1==n.insert.length&&2==n.insert.lines&&yH(e.contentDOM,"Enter",13)||(n.from==o.from-1&&n.to==o.to&&0==n.insert.length||8==i&&n.insert.lengtho.head)&&yH(e.contentDOM,"Backspace",8)||n.from==o.from&&n.to==o.to+1&&0==n.insert.length&&yH(e.contentDOM,"Delete",46)))return!0;var d,h=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;var v=function(){return d||(d=function(e,t,n){var r,o=e.state,i=o.selection.main;if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){var a=i.fromt.to?o.sliceDoc(t.to,i.to):"";r=o.replaceSelection(e.state.toText(a+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{var c=o.changes(t),l=n&&n.main.to<=c.newLength?n.main:void 0;if(o.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=i.to&&t.to>=i.to-10){var u,f=e.state.sliceDoc(t.from,t.to),d=n&&dU(e,n.main.head);if(d){var h=t.insert.length-(t.to-t.from);u={from:d.from,to:d.to-h}}else u=e.state.doc.lineAt(i.head);var v=i.to-t.to,p=i.to-i.from;r=o.changeByRange((function(n){if(n.from==i.from&&n.to==i.to)return{changes:c,range:l||n.map(c)};var r=n.to-v,a=r-f.length;if(n.to-n.from!=p||e.state.sliceDoc(a,r)!=f||n.to>=u.from&&n.from<=u.to)return{range:n};var s=o.changes({from:a,to:r,insert:t.insert}),d=n.to-i.to;return{changes:s,range:l?RF.range(Math.max(0,l.anchor+d),Math.max(0,l.head+d)):n.map(s)}}))}else r={changes:c,selection:l&&o.selection.replaceRange(l)}}var m="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,m+=".compose",e.inputState.compositionFirstChange&&(m+=".start",e.inputState.compositionFirstChange=!1));return o.update(r,{userEvent:m,scrollIntoView:!0})}(e,n,r))};return e.state.facet(BW).some((function(t){return t(e,n.from,n.to,h,v)}))||e.dispatch(v()),!0}if(r&&!r.main.eq(o)){var p=!1,m="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(p=!0),m=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:p,userEvent:m}),!0}return!1}var VJ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},HJ=qH.ie&&qH.ie_version<=11,WJ=function(){function e(t){var n=this;No(this,e),this.view=t,this.active=!1,this.selectionRange=new vH,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((function(e){var r,o=bo(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.queue.push(i)}}catch(e){o.e(e)}finally{o.f()}(qH.ie&&qH.ie_version<=11||qH.ios&&t.composing)&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),HJ&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.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),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((function(){var e;(null===(e=n.view.docView)||void 0===e?void 0:e.lastUpdate)0&&e[e.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(e){e.length>0&&e[e.length-1].intersectionRatio>0&&n.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}return Do(e,[{key:"onScrollChanged",value:function(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}},{key:"onResize",value:function(){var e=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((function(){e.resizeTimeout=-1,e.view.requestMeasure()}),50))}},{key:"onPrint",value:function(){var e=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout((function(){e.view.viewState.printing=!1,e.view.requestMeasure()}),500)}},{key:"updateGaps",value:function(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((function(t,n){return t!=e[n]})))){this.gapIntersection.disconnect();var t,n=bo(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.gapIntersection.observe(r)}}catch(e){n.e(e)}finally{n.f()}this.gaps=e}}},{key:"onSelectionChange",value:function(e){var t=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var n=this.view,r=this.selectionRange;if(n.state.facet(JW)?n.root.activeElement==this.dom:oH(n.dom,r)){var o=r.anchorNode&&n.docView.nearest(r.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(qH.ie&&qH.ie_version<=11||qH.android&&qH.chrome)&&!n.state.selection.main.empty&&r.focusNode&&aH(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var e=this.view,t=qH.safari&&11==e.root.nodeType&&function(e){for(var t=e.activeElement;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){var t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;var r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor);if(aH(s.node,s.offset,i,a)){var c=[i,a,r,o];r=c[0],o=c[1],i=c[2],a=c[3]}return{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}}(this.view)||nH(e.root);if(!t||this.selectionRange.eq(t))return!1;var n=oH(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"pendingRecords",value:function(){var e,t=bo(this.observer.takeRecords());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.queue.push(n)}}catch(e){t.e(e)}finally{t.f()}return this.queue}},{key:"processRecords",value:function(){var e=this.pendingRecords();e.length&&(this.queue=[]);var t,n=-1,r=-1,o=!1,i=bo(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,s=this.readMutation(a);s&&(s.typeOver&&(o=!0),-1==n?(n=s.from,r=s.to):(n=Math.min(s.from,n),r=Math.max(s.to,r)))}}catch(e){i.e(e)}finally{i.f()}return{from:n,to:r,typeOver:o}}},{key:"readChange",value:function(){var e=this.processRecords(),t=e.from,n=e.to,r=e.typeOver,o=this.selectionChanged&&oH(this.dom,this.selectionRange);if(t<0&&!o)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;var i=new LJ(this.view,t,n,r);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}},{key:"flush",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();var t=this.readChange();if(!t)return this.view.requestMeasure(),!1;var n=this.view.state,r=FJ(this.view,t);return this.view.state==n&&this.view.update([]),r}},{key:"readMutation",value:function(e){var t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){var n=UJ(t,e.previousSibling||e.target.previousSibling,-1),r=UJ(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}},{key:"setWindow",value:function(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();var r,o=bo(this.scrollTargets);try{for(o.s();!(r=o.n()).done;){r.value.removeEventListener("scroll",this.onScroll)}}catch(e){o.e(e)}finally{o.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),e}();function UJ(e,t,n){for(;t;){var r=jH.get(t);if(r&&r.parent==e)return r;var o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}var JJ=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};No(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.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),n.parent&&n.parent.appendChild(this.dom);var r=n.dispatch;this.dispatchTransactions=n.dispatchTransactions||r&&function(e){return e.forEach((function(e){return r(e,t)}))}||function(e){return t.update(e)},this.dispatch=this.dispatch.bind(this),this._root=n.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(n.parent)||document,this.viewState=new wJ(n.state||SV.create(n)),n.scrollTo&&n.scrollTo.is(WW)&&(this.viewState.scrollTarget=n.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(GW).map((function(e){return new YW(e)}));var o,i=bo(this.plugins);try{for(i.s();!(o=i.n()).done;){o.value.update(this)}}catch(e){i.e(e)}finally{i.f()}this.observer=new WJ(this),this.inputState=new OU(this),this.inputState.ensureHandlers(this.plugins),this.docView=new uU(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}return Do(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(){for(var e,t=arguments.length,n=new Array(t),r=0;ry.anchor?-1:1))}var b,w=bo(g.effects);try{for(w.s();!(b=w.n()).done;){var x=b.value;x.is(WW)&&(v=x.value.clip(this.state))}}catch(e){w.e(e)}finally{w.f()}}}catch(e){m.e(e)}finally{m.f()}this.viewState.update(n,v),this.bidiCache=QJ.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),o=this.docView.update(n),this.state.facet(sU)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(o,e.some((function(e){return e.isUserEvent("select.pointer")})))}finally{this.updateState=0}if(n.startState.facet(OJ)!=n.state.facet(OJ)&&(this.viewState.mustMeasureContent=!0),(o||i||v||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!n.empty){var k,j=bo(this.state.facet(qW));try{for(j.s();!(k=j.n()).done;){var S=k.value;try{S(n)}catch(x){UW(this.state,x,"update listener")}}}catch(e){j.e(e)}finally{j.f()}}(f||h)&&Promise.resolve().then((function(){f&&t.state==f.startState&&t.dispatch(f),h&&!FJ(t,h)&&d.force&&yH(t.contentDOM,d.key,d.keyCode)}))}}},{key:"setState",value:function(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=e;else{this.updateState=2;var t=this.hasFocus;try{var n,r=bo(this.plugins);try{for(r.s();!(n=r.n()).done;){n.value.destroy(this)}}catch(e){r.e(e)}finally{r.f()}this.viewState=new wJ(e),this.plugins=e.facet(GW).map((function(e){return new YW(e)})),this.pluginMap.clear();var o,i=bo(this.plugins);try{for(i.s();!(o=i.n()).done;){o.value.update(this)}}catch(e){i.e(e)}finally{i.f()}this.docView.destroy(),this.docView=new uU(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(e){var t=e.startState.facet(GW),n=e.state.facet(GW);if(t!=n){var r,o=[],i=bo(n);try{for(i.s();!(r=i.n()).done;){var a=r.value,s=t.indexOf(a);if(s<0)o.push(new YW(a));else{var c=this.plugins[s];c.mustUpdate=e,o.push(c)}}}catch(e){i.e(e)}finally{i.f()}var l,u=bo(this.plugins);try{for(u.s();!(l=u.n()).done;){var f=l.value;f.mustUpdate!=e&&f.destroy(this)}}catch(e){u.e(e)}finally{u.f()}this.plugins=o,this.pluginMap.clear()}else{var d,h=bo(this.plugins);try{for(h.s();!(d=h.n()).done;){d.value.mustUpdate=e}}catch(e){h.e(e)}finally{h.f()}}for(var v=0;v0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();var n=null,r=this.scrollDOM,o=r.scrollTop*this.scaleY,i=this.viewState,a=i.scrollAnchorPos,s=i.scrollAnchorHeight;Math.abs(o-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(var c=0;;c++){if(s<0)if(wH(r))a=-1,s=this.viewState.heightMap.height;else{var l=this.viewState.scrollAnchorAt(o);a=l.from,s=l.top}this.updateState=1;var u=this.viewState.measure(this);if(!u&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&u)){var d=[f,this.measureRequests];this.measureRequests=d[0],f=d[1]}var h=f.map((function(t){try{return t.read(e)}catch(t){return UW(e.state,t),GJ}})),v=lU.create(this,this.state,[]),p=!1;v.flags|=u,n?n.flags|=u:n=v,this.updateState=2,v.empty||(this.updatePlugins(v),this.inputState.update(v),this.updateAttrs(),p=this.docView.update(v));for(var m=0;m1||y<-1){o+=y,r.scrollTop=o/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty){var b,w=bo(this.state.facet(qW));try{for(w.s();!(b=w.n()).done;){(0,b.value)(n)}}catch(e){w.e(e)}finally{w.f()}}}}},{key:"themeClasses",get:function(){return AJ+" "+(this.state.facet(MJ)?PJ:EJ)+" "+this.state.facet(OJ)}},{key:"updateAttrs",value:function(){var e=this,t=YJ(this,XW,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(JW)?"true":"false",class:"cm-content",style:"".concat(qH.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),YJ(this,ZW,n);var r=this.observer.ignore((function(){var r=QH(e.contentDOM,e.contentAttrs,n),o=QH(e.dom,e.editorAttrs,t);return r||o}));return this.editorAttrs=t,this.contentAttrs=n,r}},{key:"showAnnouncements",value:function(t){var n,r=!0,o=bo(t);try{for(o.s();!(n=o.n()).done;){var i,a=bo(n.value.effects);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.is(e.announce))r&&(this.announceDOM.textContent=""),r=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=s.value}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(sU);var t=this.state.facet(e.cspNonce);JV.mount(this.root,this.styleModules.concat(NJ).reverse(),t?{nonce:t}:void 0)}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(e){var t=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((function(){return t.measure()}))),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(var n=0;no.from?t.head-1:t.head):null;if(i){var a=e.dom.getBoundingClientRect(),s=e.textDirectionAt(o.from),c=e.posAtCoords({x:n==(s==fW.LTR)?a.right-1:a.left+1,y:(i.top+i.bottom)/2});if(null!=c)return RF.cursor(c,n?-1:1)}return RF.cursor(n?o.to:o.from,n?-1:1)}(this,e,t,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(e,t,n){return _U(this,e,function(e,t,n,r){var o=t.head,i=n?1:-1;if(o==(n?e.state.doc.length:0))return RF.cursor(o,t.assoc);var a,s=t.goalColumn,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(o,t.assoc||-1),u=e.documentTop;if(l)null==s&&(s=l.left-c.left),a=i<0?l.top:l.bottom;else{var f=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(c.right-c.left,e.defaultCharacterWidth*(o-f.from))),a=(i<0?f.top:f.bottom)+u}for(var d=c.left+s,h=null!=r?r:e.viewState.heightOracle.textHeight>>1,v=0;;v+=10){var p=a+(h+v)*i,m=kU(e,{x:d,y:p},!1,i);if(pc.bottom||(i<0?mo)){var g=e.docView.coordsForChar(m),y=!g||p1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.posFromDOM(e,t)}},{key:"posAtCoords",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),kU(this,e,t)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;var r=this.state.doc.lineAt(e),o=this.bidiSpans(r);return uH(n,o[$W.find(o,e-r.from,-1,t)].dir==fW.LTR==t>0)}},{key:"coordsForChar",value:function(e){return this.readMeasured(),this.docView.coordsForChar(e)}},{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(e){return!this.state.facet(FW)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(e){if(e.length>KJ)return EW(e.length);var t,n,r=this.textDirectionAt(e.from),o=bo(this.bidiCache);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.from==e.from&&i.dir==r&&(i.fresh||_W(i.isolates,t=oU(this,e))))return i.order}}catch(e){o.e(e)}finally{o.f()}t||(t=oU(this,e));var a=function(e,t,n){if(!e)return[new $W(0,0,t==hW?1:0)];if(t==dW&&!n.length&&!CW.test(e))return EW(e.length);if(n.length)for(;e.length>OW.length;)OW[OW.length]=256;var r=[],o=t==dW?0:1;return AW(e,o,o,n,0,e.length,r),r}(e.text,r,t);return this.bidiCache.push(new QJ(e.from,e.to,r,t,!0,a)),a}},{key:"hasFocus",get:function(){var e;return(this.dom.ownerDocument.hasFocus()||qH.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var e=this;this.observer.ignore((function(){mH(e.contentDOM),e.docView.updateSelection()}))}},{key:"setRoot",value:function(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var e,t=bo(this.plugins);try{for(t.s();!(e=t.n()).done;){e.value.destroy(this)}}catch(e){t.e(e)}finally{t.f()}this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}},{key:"scrollSnapshot",value:function(){var e=this.scrollDOM,t=e.scrollTop,n=e.scrollLeft,r=this.viewState.scrollAnchorAt(t);return WW.of(new HW(RF.cursor(r.from),"start","start",r.top-t,n,!0))}}],[{key:"scrollIntoView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return WW.of(new HW("number"==typeof e?RF.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}},{key:"domEventHandlers",value:function(e){return QW.define((function(){return{}}),{eventHandlers:e})}},{key:"domEventObservers",value:function(e){return QW.define((function(){return{}}),{eventObservers:e})}},{key:"theme",value:function(e,t){var n=JV.newName(),r=[OJ.of(n),sU.of(RJ(".".concat(n),e))];return t&&t.dark&&r.push(MJ.of(!0)),r}},{key:"baseTheme",value:function(e){return GF.lowest(sU.of(RJ("."+AJ,e,TJ)))}},{key:"findFromDOM",value:function(e){var t,n=e.querySelector(".cm-content"),r=n&&jH.get(n)||jH.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}]),e}();JJ.styleModule=sU,JJ.inputHandler=BW,JJ.focusChangeEffect=LW,JJ.perLineTextDirection=FW,JJ.exceptionSink=zW,JJ.updateListener=qW,JJ.editable=JW,JJ.mouseSelectionStyle=DW,JJ.dragMovesSelection=IW,JJ.clickAddsSelectionRange=NW,JJ.decorations=eU,JJ.outerDecorations=tU,JJ.atomicRanges=nU,JJ.bidiIsolatedRanges=rU,JJ.scrollMargins=iU,JJ.darkTheme=MJ,JJ.cspNonce=DF.define({combine:function(e){return e.length?e[0]:""}}),JJ.contentAttributes=ZW,JJ.editorAttributes=XW,JJ.lineWrapping=JJ.contentAttributes.of({class:"cm-lineWrapping"}),JJ.announce=dV.define();var KJ=4096,GJ={},QJ=function(){function e(t,n,r,o,i,a){No(this,e),this.from=t,this.to=n,this.dir=r,this.isolates=o,this.fresh=i,this.order=a}return Do(e,null,[{key:"update",value:function(t,n){if(n.empty&&!t.some((function(e){return e.fresh})))return t;for(var r=[],o=t.length?t[t.length-1].dir:fW.LTR,i=Math.max(0,t.length-10);i=0;o--){var i=r[o],a="function"==typeof i?i(e):i;a&&JH(a,n)}return n}var XJ=qH.mac?"mac":qH.windows?"win":qH.linux?"linux":"key";function ZJ(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}var eK=GF.default(JJ.domEventHandlers({keydown:function(e,t){return aK(rK(t.state),e,t,"editor")}})),tK=DF.define({enables:eK}),nK=new WeakMap;function rK(e){var t=e.facet(tK),n=nK.get(t);return n||nK.set(t,n=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:XJ,r=Object.create(null),o=Object.create(null),i=function(e,t){var n=o[e];if(null==n)o[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},a=function(e,t,o,a,s){for(var c,l,u=r[e]||(r[e]=Object.create(null)),f=t.split(/ (?!$)/).map((function(e){return function(e,t){var n,r,o,i,a=e.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(var c=0;c=e.viewport.to)return[];var r=Math.max(n.from,e.viewport.from),o=Math.min(n.to,e.viewport.to),i=e.textDirection==fW.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),c=cK(e),l=a.querySelector(".cm-line"),u=l&&window.getComputedStyle(l),f=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=s.right-(u?parseInt(u.paddingRight):0),h=SU(e,r),v=SU(e,o),p=h.type==tW.Text?h:null,m=v.type==tW.Text?v:null;if(p&&(e.lineWrapping||h.widgetLineBreaks)&&(p=lK(e,r,p)),m&&(e.lineWrapping||v.widgetLineBreaks)&&(m=lK(e,o,m)),p&&m&&p.from==m.from)return x(k(n.from,n.to,p));var g=p?k(n.from,null,p):j(h,!1),y=m?k(null,n.to,m):j(v,!0),b=[];return(p||h).to<(m||v).from-(p&&m?1:0)||h.widgetLineBreaks>1&&g.bottom+e.defaultLineHeight/2u&&p.from=g)break;j>m&&c(Math.max(k,m),null==t&&k<=u,Math.min(j,g),null==n&&j>=h,x.dir)}}catch(e){w.e(e)}finally{w.f()}if((m=b.to+1)>=g)break}}}catch(e){v.e(e)}finally{v.f()}return 0==s.length&&c(u,null==t,h,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function j(e,t){var n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}var fK=function(){function e(t,n){No(this,e),this.view=t,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=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.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}return Do(e,[{key:"update",value:function(e){e.startState.facet(dK)!=e.state.facet(dK)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}},{key:"setOrder",value:function(e){for(var t=0,n=e.facet(dK);t0&&void 0!==arguments[0]?arguments[0]:{};return[pK.of(e),yK,wK,kK,VW.of(!0)]}function gK(e){return e.startState.facet(pK)!=e.state.facet(pK)}var yK=hK({above:!0,markers:function(e){var t,n=e.state,r=n.facet(pK),o=[],i=bo(n.selection.ranges);try{for(i.s();!(t=i.n()).done;){var a=t.value,s=a==n.selection.main;if(a.empty?!s||vK:r.drawRangeCursor){var c,l=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=a.empty?a:RF.cursor(a.head,a.head>a.anchor?-1:1),f=bo(sK.forRange(e,l,u));try{for(f.s();!(c=f.n()).done;){var d=c.value;o.push(d)}}catch(e){f.e(e)}finally{f.f()}}}}catch(e){i.e(e)}finally{i.f()}return o},update:function(e,t){e.transactions.some((function(e){return e.selection}))&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");var n=gK(e);return n&&bK(e.state,t),e.docChanged||e.selectionSet||n},mount:function(e,t){bK(t.state,e)},class:"cm-cursorLayer"});function bK(e,t){t.style.animationDuration=e.facet(pK).cursorBlinkRate+"ms"}var wK=hK({above:!1,markers:function(e){return e.state.selection.ranges.map((function(t){return t.empty?[]:sK.forRange(e,"cm-selectionBackground",t)})).reduce((function(e,t){return e.concat(t)}))},update:function(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||gK(e)},class:"cm-selectionLayer"}),xK={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};vK&&(xK[".cm-line"].caretColor="transparent !important",xK[".cm-content"]={caretColor:"transparent !important"});var kK=GF.highest(JJ.theme(xK)),jK=dV.define({map:function(e,t){return null==e?null:t.mapPos(e)}}),SK=VF.define({create:function(){return null},update:function(e,t){return null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((function(e,t){return t.is(jK)?t.value:e}),e)}}),CK=QW.fromClass(function(){function e(t){No(this,e),this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Do(e,[{key:"update",value:function(e){var t,n=e.state.field(SK);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(SK)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var e=this.view,t=e.state.field(SK),n=null!=t&&e.coordsAtPos(t);if(!n)return null;var r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}},{key:"drawCursor",value:function(e){if(this.cursor){var t=this.view,n=t.scaleX,r=t.scaleY;e?(this.cursor.style.left=e.left/n+"px",this.cursor.style.top=e.top/r+"px",this.cursor.style.height=e.height/r+"px"):this.cursor.style.left="-100000px"}}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(e){this.view.state.field(SK)!=e&&this.view.dispatch({effects:jK.of(e)})}}]),e}(),{eventObservers:{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 $K(e,t,n,r,o){t.lastIndex=0;for(var i,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}var _K=function(){function e(t){No(this,e);var n=t.regexp,r=t.decoration,o=t.decorate,i=t.boundary,a=t.maxLength,s=void 0===a?1e3:a;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,o)this.addMatch=function(e,t,n,r){return o(r,n,n+e[0].length,e,t)};else if("function"==typeof r)this.addMatch=function(e,t,n,o){var i=r(e,t,n);i&&o(n,n+e[0].length,i)};else{if(!r)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(e,t,n,o){return o(n,n+e[0].length,r)}}this.boundary=i,this.maxLength=s}return Do(e,[{key:"createDeco",value:function(e){var t,n=this,r=new EV,o=r.add.bind(r),i=bo(function(e,t){var n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;var r,o=[],i=bo(n);try{for(i.s();!(r=i.n()).done;){var a=r.value,s=a.from,c=a.to;s=Math.max(e.state.doc.lineAt(s).from,s-t),c=Math.min(e.state.doc.lineAt(c).to,c+t),o.length&&o[o.length-1].to>=s?o[o.length-1].to=c:o.push({from:s,to:c})}}catch(e){i.e(e)}finally{i.f()}return o}(e,this.maxLength));try{for(i.s();!(t=i.n()).done;){var a=t.value,s=a.from,c=a.to;$K(e.state.doc,this.regexp,s,c,(function(t,r){return n.addMatch(r,e,t,o)}))}}catch(e){i.e(e)}finally{i.f()}return r.finish()}},{key:"updateDeco",value:function(e,t){var n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((function(t,o,i,a){a>e.view.viewport.from&&i1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}},{key:"updateRange",value:function(e,t,n,r){var o,i=this,a=bo(e.visibleRanges);try{var s=function(){var a=o.value,s=Math.max(a.from,n),c=Math.min(a.to,r);if(c>s){var l=e.state.doc.lineAt(s),u=l.tol.from;s--)if(i.boundary.test(l.text[s-1-l.from])){f=s;break}for(;cd},add:v})}};for(a.s();!(o=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}return t}}]),e}(),OK=null!=/x/.unicode?"gu":"g",MK=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",OK),AK={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"},EK=null;var PK=DF.define({combine:function(e){var t=CV(e,{render:null,specialChars:MK,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==EK&&"undefined"!=typeof document&&document.body){var t=document.body.style;EK=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return EK||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,OK)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,OK)),t}});function TK(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[PK.of(e),RK||(RK=QW.fromClass(function(){function e(t){No(this,e),this.view=t,this.decorations=nW.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(PK)),this.decorations=this.decorator.createDeco(t)}return Do(e,[{key:"makeDecorator",value:function(e){var t=this;return new _K({regexp:e.specialChars,decoration:function(n,r,o){var i=r.state.doc,a=wF(n[0],0);if(9==a){var s=i.lineAt(o),c=r.state.tabSize,l=FV(s.text,c,o-s.from);return nW.replace({widget:new IK((c-l%c)*t.view.defaultCharacterWidth/t.view.scaleX)})}return t.decorationCache[a]||(t.decorationCache[a]=nW.replace({widget:new NK(e,a)}))},boundary:e.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(e){var t=e.state.facet(PK);e.startState.facet(PK)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}}]),e}(),{decorations:function(e){return e.decorations}}))]}var RK=null;var NK=function(e){function t(e,n){var r;return No(this,t),(r=_o(this,t)).options=e,r.code=n,r}return Eo(t,eW),Do(t,[{key:"eq",value:function(e){return e.code==this.code}},{key:"toDOM",value:function(e){var t=function(e){return e>=32?"•":10==e?"␤":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(AK[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;var o=document.createElement("span");return o.textContent=t,o.title=n,o.setAttribute("aria-label",n),o.className="cm-specialChar",o}},{key:"ignoreEvent",value:function(){return!1}}]),t}(),IK=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).width=e,n}return Eo(t,eW),Do(t,[{key:"eq",value:function(e){return e.width==this.width}},{key:"toDOM",value:function(){var e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}},{key:"ignoreEvent",value:function(){return!1}}]),t}();var DK=nW.line({class:"cm-activeLine"}),zK=QW.fromClass(function(){function e(t){No(this,e),this.decorations=this.getDeco(t)}return Do(e,[{key:"update",value:function(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t,n=-1,r=[],o=bo(e.state.selection.ranges);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=e.lineBlockAt(i.head);a.from>n&&(r.push(DK.range(a.from)),n=a.from)}}catch(e){o.e(e)}finally{o.f()}return nW.set(r)}}]),e}(),{decorations:function(e){return e.decorations}}),qK=2e3;function BK(e,t){var n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),o=n-r.from,i=o>qK?-1:o==r.length?function(e,t){var n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):FV(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}function LK(e,t){var n=BK(e,t),r=e.state.selection;return n?{update:function(e){if(e.docChanged){var t=e.changes.mapPos(e.startState.doc.line(n.line).from),o=e.state.doc.lineAt(t);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(e.changes)}},get:function(t,o,i){var a=BK(e,t);if(!a)return r;var s=function(e,t,n){var r=Math.min(t.line,n.line),o=Math.max(t.line,n.line),i=[];if(t.off>qK||n.off>qK||t.col<0||n.col<0)for(var a=Math.min(t.off,n.off),s=Math.max(t.off,n.off),c=r;c<=o;c++){var l=e.doc.line(c);l.length<=s&&i.push(RF.range(l.from+a,l.to+s))}else for(var u=Math.min(t.col,n.col),f=Math.max(t.col,n.col),d=r;d<=o;d++){var h=e.doc.line(d),v=VV(h.text,u,e.tabSize,!0);if(v<0)i.push(RF.cursor(h.to));else{var p=VV(h.text,f,e.tabSize);i.push(RF.range(h.from+v,h.from+p))}}return i}(e.state,n,a);return s.length?i?RF.create(s.concat(r.ranges)):RF.create(s):r}}:null}function FK(e){var t=(null==e?void 0:e.eventFilter)||function(e){return e.altKey&&0==e.button};return JJ.mouseSelectionStyle.of((function(e,n){return t(n)?LK(e,n):null}))}var VK={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}]},HK={style:"cursor: crosshair"};function WK(){var e=jo(VK[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),t=e[0],n=e[1],r=QW.fromClass(function(){function e(t){No(this,e),this.view=t,this.isDown=!1}return Do(e,[{key:"set",value:function(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}}]),e}(),{eventObservers:{keydown:function(e){this.set(e.keyCode==t||n(e))},keyup:function(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove:function(e){this.set(n(e))}}});return[r,JJ.contentAttributes.of((function(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?HK:null}))]}var UK="-10000px",JK=function(){function e(t,n,r,o){No(this,e),this.facet=n,this.createTooltipView=r,this.removeTooltipView=o,this.input=t.state.facet(n),this.tooltips=this.input.filter((function(e){return e}));var i=null;this.tooltipViews=this.tooltips.map((function(e){return i=r(e,i)}))}return Do(e,[{key:"update",value:function(e,t){var n,r=e.state.facet(this.facet),o=r.filter((function(e){return e}));if(r===this.input){var i,a=bo(this.tooltipViews);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.update&&s.update(e)}}catch(e){a.e(e)}finally{a.f()}return!1}for(var c=[],l=t?[]:null,u=0;un.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&n.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Do(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 e,t=bo(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.intersectionObserver.observe(n.dom)}}catch(e){t.e(e)}finally{t.f()}}}},{key:"measureSoon",value:function(){var e=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout((function(){e.measureTimeout=-1,e.maybeMeasure()}),50))}},{key:"update",value:function(e){e.transactions.length&&(this.lastTransaction=Date.now());var t=this.manager.update(e,this.above);t&&this.observeIntersection();var n=t||e.geometryChanged,r=e.state.facet(GK);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;var o,i=bo(this.manager.tooltipViews);try{for(i.s();!(o=i.n()).done;){o.value.dom.style.position=this.position}}catch(e){i.e(e)}finally{i.f()}n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,s=bo(this.manager.tooltipViews);try{for(s.s();!(a=s.n()).done;){var c=a.value;this.container.appendChild(c.dom)}}catch(e){s.e(e)}finally{s.f()}n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}},{key:"createTooltip",value:function(e,t){var n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var o=document.createElement("div");o.className="cm-tooltip-arrow",n.dom.insertBefore(o,r)}return n.dom.style.position=this.position,n.dom.style.top=UK,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}},{key:"destroy",value:function(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);var r,o=bo(this.manager.tooltipViews);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.dom.remove(),null===(e=i.destroy)||void 0===e||e.call(i)}}catch(e){o.e(e)}finally{o.f()}this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var e=this,t=this.view.dom.getBoundingClientRect(),n=1,r=1,o=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){var i=this.manager.tooltipViews[0].dom;if(qH.gecko)o=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==UK&&"0px"==i.style.left){var a=i.getBoundingClientRect();o=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(o||"absolute"==this.position)if(this.parent){var s=this.parent.getBoundingClientRect();s.width&&s.height&&(n=s.width/this.parent.offsetWidth,r=s.height/this.parent.offsetHeight)}else{var c=this.view.viewState;n=c.scaleX,r=c.scaleY}return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((function(t,n){var r=e.manager.tooltipViews[n];return r.getCoords?r.getCoords(t.pos):e.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((function(e){return e.dom.getBoundingClientRect()})),space:this.view.state.facet(GK).tooltipSpace(this.view),scaleX:n,scaleY:r,makeAbsolute:o}}},{key:"writeMeasure",value:function(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";var n,r=bo(this.manager.tooltipViews);try{for(r.s();!(n=r.n()).done;){n.value.dom.style.position="absolute"}}catch(e){r.e(e)}finally{r.f()}}for(var o=e.editor,i=e.space,a=e.scaleX,s=e.scaleY,c=[],l=0;l=Math.min(o.bottom,i.bottom)||h.rightMath.min(o.right,i.right)+.1)d.style.top=UK;else{var p=u.arrow?f.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,g=v.right-v.left,y=null!==(t=QK.get(f))&&void 0!==t?t:v.bottom-v.top,b=f.offset||ZK,w=this.view.textDirection==fW.LTR,x=v.width>i.right-i.left?w?i.left:i.right-v.width:w?Math.min(h.left-(p?14:0)+b.x,i.right-g):Math.max(i.left,h.left-g+(p?14:0)-b.x),k=this.above[l];!u.strictSide&&(k?h.top-(v.bottom-v.top)-b.yi.bottom)&&k==i.bottom-h.bottom>h.top-i.top&&(k=this.above[l]=!k);var j=(k?h.top-i.top:i.bottom-h.bottom)-m;if(jx&&O.topS&&(S=k?O.top-y-2-m:O.bottom+m+2)}}catch(e){_.e(e)}finally{_.f()}}if("absolute"==this.position?(d.style.top=(S-e.parent.top)/s+"px",d.style.left=(x-e.parent.left)/a+"px"):(d.style.top=S/s+"px",d.style.left=x/a+"px"),p){var M=h.left+(w?b.x:-b.x)-(x+14-7);p.style.left=M/a+"px"}!0!==f.overlap&&c.push({left:x,top:S,right:C,bottom:S+y}),d.classList.toggle("cm-tooltip-above",k),d.classList.toggle("cm-tooltip-below",!k),f.positioned&&f.positioned(e.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 e,t=bo(this.manager.tooltipViews);try{for(t.s();!(e=t.n()).done;){e.value.dom.style.top=UK}}catch(e){t.e(e)}finally{t.f()}}}}]),e}(),{eventObservers:{scroll:function(){this.maybeMeasure()}}}),XK=JJ.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"}}}),ZK={x:0,y:0},eG=DF.define({enables:[YK,XK]}),tG=DF.define({combine:function(e){return e.reduce((function(e,t){return e.concat(t)}),[])}}),nG=function(){function e(t){var n=this;No(this,e),this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new JK(t,tG,(function(e,t){return n.createHostedView(e,t)}),(function(e){return e.dom.remove()}))}return Do(e,[{key:"createHostedView",value:function(e,t){var n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}},{key:"mount",value:function(e){var t,n=bo(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.mount&&r.mount(e)}}catch(e){n.e(e)}finally{n.f()}this.mounted=!0}},{key:"positioned",value:function(e){var t,n=bo(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.positioned&&r.positioned(e)}}catch(e){n.e(e)}finally{n.f()}}},{key:"update",value:function(e){this.manager.update(e)}},{key:"destroy",value:function(){var e,t,n=bo(this.manager.tooltipViews);try{for(n.s();!(t=n.n()).done;){var r=t.value;null===(e=r.destroy)||void 0===e||e.call(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"passProp",value:function(e){var t,n=void 0,r=bo(this.manager.tooltipViews);try{for(r.s();!(t=r.n()).done;){var o=t.value[e];if(void 0!==o)if(void 0===n)n=o;else if(n!==o)return}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"offset",get:function(){return this.passProp("offset")}},{key:"getCoords",get:function(){return this.passProp("getCoords")}},{key:"overlap",get:function(){return this.passProp("overlap")}},{key:"resize",get:function(){return this.passProp("resize")}}],[{key:"create",value:function(t){return new e(t)}}]),e}(),rG=eG.compute([tG],(function(e){var t=e.facet(tG);return 0===t.length?null:{pos:Math.min.apply(Math,Bo(t.map((function(e){return e.pos})))),end:Math.max.apply(Math,Bo(t.map((function(e){var t;return null!==(t=e.end)&&void 0!==t?t:e.pos})))),create:nG.create,above:t[0].above,arrow:t.some((function(e){return e.arrow}))}})),oG=function(){function e(t,n,r,o,i){No(this,e),this.view=t,this.source=n,this.field=r,this.setHover=o,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target: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 Do(e,[{key:"update",value:function(){var e=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((function(){return e.startHover()}),20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active.length){var e=Date.now()-this.lastMove.time;ea.bottom||n.xa.right+t.defaultCharacterWidth)return;var s=t.bidiSpans(t.state.doc.lineAt(o)).find((function(e){return e.from<=o&&e.to>=o})),c=s&&s.dir==fW.RTL?-1:1;i=n.x-1?e.manager.tooltipViews[t]:null}},{key:"mousemove",value:function(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));var r=this.active,o=this.tooltip;if(r.length&&o&&!function(e,t){var n=e.getBoundingClientRect();return t.clientX>=n.left-iG&&t.clientX<=n.right+iG&&t.clientY>=n.top-iG&&t.clientY<=n.bottom+iG}(o.dom,e)||this.pending){var i=(r[0]||this.pending).pos,a=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:i;(i==a?this.view.posAtCoords(this.lastMove)==i:function(e,t,n,r,o,i){var a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>r||a.righto||Math.min(a.bottom,s)=t&&c<=n}(this.view,i,a,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}},{key:"mouseleave",value:function(e){if(clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active.length){var t=this.tooltip;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}},{key:"watchTooltipLeave",value:function(e){var t=this;e.addEventListener("mouseleave",(function n(r){e.removeEventListener("mouseleave",n),t.active.length&&!t.view.dom.contains(r.relatedTarget)&&t.view.dispatch({effects:t.setHover.of([])})}))}},{key:"destroy",value:function(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}]),e}(),iG=4;function aG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=dV.define(),r=VF.define({create:function(){return[]},update:function(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter((function(e){return!t.hideOn(r,e)}))),r.docChanged)){var o,i=[],a=bo(e);try{for(a.s();!(o=a.n()).done;){var s=o.value,c=r.changes.mapPos(s.pos,-1,SF.TrackDel);if(null!=c){var l=Object.assign(Object.create(null),s);l.pos=c,null!=l.end&&(l.end=r.changes.mapPos(l.end)),i.push(l)}}}catch(e){a.e(e)}finally{a.f()}e=i}var u,f=bo(r.effects);try{for(f.s();!(u=f.n()).done;){var d=u.value;d.is(n)&&(e=d.value),d.is(cG)&&(e=[])}}catch(e){f.e(e)}finally{f.f()}return e},provide:function(e){return tG.from(e)}});return[r,QW.define((function(o){return new oG(o,e,r,n,t.hoverTime||300)})),rG]}function sG(e,t){var n=e.plugin(YK);if(!n)return null;var r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}var cG=dV.define(),lG=DF.define({combine:function(e){var t,n,r,o=bo(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;t=t||i.topContainer,n=n||i.bottomContainer}}catch(e){o.e(e)}finally{o.f()}return{topContainer:t,bottomContainer:n}}});function uG(e,t){var n=e.plugin(fG),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}var fG=QW.fromClass(function(){function e(t){No(this,e),this.input=t.state.facet(vG),this.specs=this.input.filter((function(e){return e})),this.panels=this.specs.map((function(e){return e(t)}));var n=t.state.facet(lG);this.top=new dG(t,!0,n.topContainer),this.bottom=new dG(t,!1,n.bottomContainer),this.top.sync(this.panels.filter((function(e){return e.top}))),this.bottom.sync(this.panels.filter((function(e){return!e.top})));var r,o=bo(this.panels);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.dom.classList.add("cm-panel"),i.mount&&i.mount()}}catch(e){o.e(e)}finally{o.f()}}return Do(e,[{key:"update",value:function(e){var t=e.state.facet(lG);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new dG(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new dG(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var n=e.state.facet(vG);if(n!=this.input){var r,o=n.filter((function(e){return e})),i=[],a=[],s=[],c=[],l=bo(o);try{for(l.s();!(r=l.n()).done;){var u=r.value,f=this.specs.indexOf(u),d=void 0;f<0?(d=u(e.view),c.push(d)):(d=this.panels[f]).update&&d.update(e),i.push(d),(d.top?a:s).push(d)}}catch(e){l.e(e)}finally{l.f()}this.specs=o,this.panels=i,this.top.sync(a),this.bottom.sync(s);for(var h=0,v=c;hthis.i;){var t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}]),e}(),$G=function(){function e(t,n){var r=this;No(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 o=function(e){r.dom.addEventListener(e,(function(o){var i,a=o.target;if(a!=r.dom&&r.dom.contains(a)){for(;a.parentNode!=r.dom;)a=a.parentNode;var s=a.getBoundingClientRect();i=(s.top+s.bottom)/2}else i=o.clientY;var c=t.lineBlockAtHeight(i-t.documentTop);n.domEventHandlers[e](t,c,o)&&o.preventDefault()}))};for(var i in n.domEventHandlers)o(i);this.markers=jG(n.markers(t)),n.initialSpacer&&(this.spacer=new _G(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Do(e,[{key:"update",value:function(e){var t=this.markers;if(this.markers=jG(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){var n=this.config.updateSpacer(this.spacer.markers[0],e);n!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[n])}var r=e.view.viewport;return!AV.eq(this.markers,t,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}},{key:"destroy",value:function(){var e,t=bo(this.elements);try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(e){t.e(e)}finally{t.f()}}}]),e}(),_G=function(){function e(t,n,r,o){No(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,o)}return Do(e,[{key:"update",value:function(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return[MG.of(e),xG(),PG]}function RG(e){for(var t=9;tr&&(r=a,n.push(NG.range(a)))}}catch(e){o.e(e)}finally{o.f()}return AV.of(n)}));var DG=0,zG=Do((function e(t,n){No(this,e),this.from=t,this.to=n})),qG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};No(this,e),this.id=DG++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Do(e,[{key:"add",value:function(e){var t=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=FG.match(e)),function(n){var r=e(n);return void 0===r?null:[t,r]}}}]),e}();qG.closedBy=new qG({deserialize:function(e){return e.split(" ")}}),qG.openedBy=new qG({deserialize:function(e){return e.split(" ")}}),qG.group=new qG({deserialize:function(e){return e.split(" ")}}),qG.contextHash=new qG({perNode:!0}),qG.lookAhead=new qG({perNode:!0}),qG.mounted=new qG({perNode:!0});var BG=function(){function e(t,n,r){No(this,e),this.tree=t,this.overlay=n,this.parser=r}return Do(e,null,[{key:"get",value:function(e){return e&&e.props&&e.props[qG.mounted.id]}}]),e}(),LG=Object.create(null),FG=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;No(this,e),this.name=t,this.props=n,this.id=r,this.flags=o}return Do(e,[{key:"prop",value:function(e){return this.props[e.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(e){if("string"==typeof e){if(this.name==e)return!0;var t=this.prop(qG.group);return!!t&&t.indexOf(e)>-1}return this.id==e}}],[{key:"define",value:function(t){var n=t.props&&t.props.length?Object.create(null):LG,r=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),o=new e(t.name||"",n,t.id,r);if(t.props){var i,a=bo(t.props);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(Array.isArray(s)||(s=s(o)),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(e){a.e(e)}finally{a.f()}}return o}},{key:"match",value:function(e){var t=Object.create(null);for(var n in e){var r,o=bo(n.split(" "));try{for(o.s();!(r=o.n()).done;){var i=r.value;t[i]=e[n]}}catch(e){o.e(e)}finally{o.f()}}return function(e){for(var n=e.prop(qG.group),r=-1;r<(n?n.length:0);r++){var o=t[r<0?e.name:n[r]];if(o)return o}}}}]),e}();FG.none=new FG("",Object.create(null),0,8);var VG,HG=function(){function e(t){No(this,e),this.types=t;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0;return new aQ(this.topNode,e)}},{key:"cursorAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=WG.get(this)||this.topNode,r=new aQ(n);return r.moveTo(e,t),WG.set(this,r._tree),r}},{key:"topNode",get:function(){return new ZG(this,0,0,null)}},{key:"resolve",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=YG(WG.get(this)||this.topNode,e,t,!1);return WG.set(this,n),n}},{key:"resolveInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=YG(UG.get(this)||this.topNode,e,t,!0);return UG.set(this,n),n}},{key:"resolveStack",value:function(e){return function(e,t,n){for(var r=e.resolveInner(t,n),o=null,i=r instanceof ZG?r:r.context.parent;i;i=i.parent)if(i.index<0){var a=i.parent;(o||(o=[r])).push(a.resolve(t,n)),i=a}else{var s=BG.get(i.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){var c=new ZG(s.tree,s.overlay[0].from+i.from,-1,i);(o||(o=[r])).push(YG(c,t,n,!1))}}return o?oQ(o):r}(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"iterate",value:function(e){for(var t=e.enter,n=e.leave,r=e.from,o=void 0===r?0:r,i=e.to,a=void 0===i?this.length:i,s=e.mode||0,c=(s&VG.IncludeAnonymous)>0,l=this.cursor(s|VG.IncludeAnonymous);;){var u=!1;if(l.from<=a&&l.to>=o&&(!c&&l.type.isAnonymous||!1!==t(l))){if(l.firstChild())continue;u=!0}for(;u&&n&&(c||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}},{key:"prop",value:function(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}},{key:"propValues",get:function(){var e=[];if(this.props)for(var t in this.props)e.push([+t,this.props[t]]);return e}},{key:"balance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.children.length<=8?this:fQ(FG.none,this.children,this.positions,0,this.children.length,0,this.length,(function(n,r,o){return new e(t.type,n,r,o,t.propValues)}),n.makeTree||function(t,n,r){return new e(FG.none,t,n,r)})}}],[{key:"build",value:function(e){return cQ(e)}}]),e}();JG.empty=new JG(FG.none,[],[],0);var KG=function(){function e(t,n){No(this,e),this.buffer=t,this.index=n}return Do(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}(),GG=function(){function e(t,n,r){No(this,e),this.buffer=t,this.length=n,this.set=r}return Do(e,[{key:"type",get:function(){return FG.none}},{key:"toString",value:function(){for(var e=[],t=0;t0));s=i[s+3]);return a}},{key:"slice",value:function(t,n,r){for(var o=this.buffer,i=new Uint16Array(n-t),a=0,s=t,c=0;s=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function YG(e,t,n,r){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"getChild",value:function(e){var t=eQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return t.length?t[0]:null}},{key:"getChildren",value:function(e){return eQ(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"resolve",value:function(e){return YG(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(e){return YG(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"matchContext",value:function(e){return tQ(this,e)}},{key:"enterUnfinishedNodesBefore",value:function(e){for(var t=this.childBefore(e),n=this;t;){var r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(n=t,t=r.prevSibling):t=r}return n}},{key:"node",get:function(){return this}},{key:"next",get:function(){return this.parent}}]),e}(),ZG=function(e){function t(e,n,r,o){var i;return No(this,t),(i=_o(this,t))._tree=e,i.from=n,i.index=r,i._parent=o,i}return Eo(t,XG),Do(t,[{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(e,n,r,o){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=this;;){for(var s=a._tree,c=s.children,l=s.positions,u=n>0?c.length:-1;e!=u;e+=n){var f=c[e],d=l[e]+a.from;if(QG(o,r,d,d+f.length))if(f instanceof GG){if(i&VG.ExcludeBuffers)continue;var h=f.findChild(0,f.buffer.length,n,r-d,o);if(h>-1)return new rQ(new nQ(a,f,e,d),null,h)}else if(i&VG.IncludeAnonymous||!f.type.isAnonymous||sQ(f)){var v=void 0;if(!(i&VG.IgnoreMounts)&&(v=BG.get(f))&&!v.overlay)return new t(v.tree,d,e,a);var p=new t(f,d,e,a);return i&VG.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(n<0?f.children.length-1:0,n,r,o)}}if(i&VG.IncludeAnonymous||!a.type.isAnonymous)return null;if(e=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(e){return this.nextChild(0,1,e,2)}},{key:"childBefore",value:function(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}},{key:"enter",value:function(e,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(o&VG.IgnoreOverlays)&&(r=BG.get(this._tree))&&r.overlay){var i,a=e-this.from,s=bo(r.overlay);try{for(s.s();!(i=s.n()).done;){var c=i.value,l=c.from,u=c.to;if((n>0?l<=a:l=a:u>a))return new t(r.tree,r.overlay[0].from+this.from,-1,this)}}catch(e){s.e(e)}finally{s.f()}}return this.nextChild(0,1,e,n,o)}},{key:"nextSignificantParent",value:function(){for(var e=this;e.type.isAnonymous&&e._parent;)e=e._parent;return e}},{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:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"toString",value:function(){return this._tree.toString()}}]),t}();function eQ(e,t,n,r){var o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=n)for(;!o.type.is(n);)if(!o.nextSibling())return i;for(;;){if(null!=r&&o.type.is(r))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==r?i:[]}}function tQ(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?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 nQ=Do((function e(t,n,r,o){No(this,e),this.parent=t,this.buffer=n,this.index=r,this.start=o})),rQ=function(e){function t(e,n,r){var o;return No(this,t),(o=_o(this,t)).context=e,o._parent=n,o.index=r,o.type=e.buffer.set.types[e.buffer.buffer[r]],o}return Eo(t,XG),Do(t,[{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(e,n,r){var o=this.context.buffer,i=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.context.start,r);return i<0?null:new t(this.context,this,i)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(e){return this.child(1,e,2)}},{key:"childBefore",value:function(e){return this.child(-1,e,-2)}},{key:"enter",value:function(e,n){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&VG.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new t(this.context,this,o)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}},{key:"nextSibling",get:function(){var e=this.context.buffer,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new t(this.context,this._parent,n):this.externalSibling(1)}},{key:"prevSibling",get:function(){var e=this.context.buffer,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new t(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var e=[],t=[],n=this.context.buffer,r=this.index+4,o=n.buffer[this.index+3];if(o>r){var i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),t.push(0)}return new JG(this.type,e,t,this.to-this.from)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}}]),t}();function oQ(e){if(!e.length)return null;for(var t=0,n=e[0],r=1;rn.from||o.to1&&void 0!==arguments[1]?arguments[1]:0;if(No(this,e),this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof ZG)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 Do(e,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}},{key:"yieldBuf",value:function(e,t){this.index=e;var n=this.buffer,r=n.start,o=n.buffer;return this.type=t||o.set.types[o.buffer[e]],this.from=r+o.buffer[e+1],this.to=r+o.buffer[e+2],!0}},{key:"yield",value:function(e){return!!e&&(e instanceof ZG?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);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(e){return this.enterChild(1,e,2)}},{key:"childBefore",value:function(e){return this.enterChild(-1,e,-2)}},{key:"enter",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(n&VG.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&VG.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var e=this.mode&VG.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}},{key:"sibling",value:function(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));var t=this.buffer.buffer,n=this.stack.length-1;if(e<0){var r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{var o=t.buffer[this.index+3];if(o<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(o)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(e){var t,n,r=this.buffer;if(r){if(e>0){if(this.index-1)for(var s=t+e,c=e<0?-1:n._tree.children.length;s!=c;s+=e){var l=n._tree.children[s];if(this.mode&VG.IncludeAnonymous||l instanceof GG||!l.type.isAnonymous||sQ(l))return!1}}return!0}},{key:"move",value:function(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}},{key:"next",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(1,e)}},{key:"prev",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.move(-1,e)}},{key:"moveTo",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(var i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}for(var a=n;a=0;o--){if(o<0)return tQ(this.node,e,r);var i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}}]),e}();function sQ(e){return e.children.some((function(e){return e instanceof GG||!e.type.isAnonymous||sQ(e)}))}function cQ(e){var t,n=e.buffer,r=e.nodeSet,o=e.maxBufferLength,i=void 0===o?1024:o,a=e.reused,s=void 0===a?[]:a,c=e.minRepeatType,l=void 0===c?r.types.length:c,u=Array.isArray(n)?new KG(n,n.length):n,f=r.types,d=0,h=0;function v(e,t,n,o,a,c){for(var b=u.id,w=u.start,x=u.end,k=u.size,j=h;k<0;){if(u.next(),-1==k){var S=s[b];return n.push(S),void o.push(w-e)}if(-3==k)return void(d=b);if(-4==k)return void(h=b);throw new RangeError("Unrecognized record size: ".concat(k))}var C,$,_=f[b],O=w-e;if(x-w<=i&&($=function(e,t){var n=u.fork(),r=0,o=0,a=0,s=n.end-i,c={size:0,start:0,skip:0};e:for(var f=n.pos-e;n.pos>f;){var d=n.size;if(n.id==t&&d>=0)c.size=r,c.start=o,c.skip=a,a+=4,r+=4,n.next();else{var h=n.pos-d;if(d<0||h=l?4:0,p=n.start;for(n.next();n.pos>h;){if(n.size<0){if(-3!=n.size)break e;v+=4}else n.id>=l&&(v+=4);n.next()}o=p,r+=d,a+=v}}(t<0||r==e)&&(c.size=r,c.start=o,c.skip=a);return c.size>4?c:void 0}(u.pos-t,a))){for(var M=new Uint16Array($.size-$.skip),A=u.pos-$.size,E=M.length;u.pos>A;)E=y($.start,M,E);C=new GG(M,x-$.start,r),O=$.start-e}else{var P=u.pos-k;u.next();for(var T=[],R=[],N=b>=l?b:-1,I=0,D=x;u.pos>P;)N>=0&&u.id==N&&u.size>=0?(u.end<=D-i&&(m(T,R,w,I,u.end,D,N,j),I=T.length,D=u.end),u.next()):c>2500?p(w,P,T,R):v(w,P,T,R,N,c+1);if(N>=0&&I>0&&I-1&&I>0){var z=function(e){return function(t,n,r){var o,i,a=0,s=t.length-1;if(s>=0&&(o=t[s])instanceof JG){if(!s&&o.type==e&&o.length==r)return o;(i=o.prop(qG.lookAhead))&&(a=n[s]+o.length+i)}return g(e,t,n,r,a)}}(_);C=fQ(_,T,R,0,T.length,0,x-w,z,z)}else C=g(_,T,R,x-w,j-x)}n.push(C),o.push(O)}function p(e,t,n,o){for(var a=[],s=0,c=-1;u.pos>t;){var l=u.id,f=u.start,d=u.end;if(u.size>4)u.next();else{if(c>-1&&f=0;p-=3)h[m++]=a[p],h[m++]=a[p+1]-v,h[m++]=a[p+2]-v,h[m++]=m;n.push(new GG(h,a[2]-v,r)),o.push(v-e)}}function m(e,t,n,o,i,a,s,c){for(var l=[],u=[];e.length>o;)l.push(e.pop()),u.push(t.pop()+n-i);e.push(g(r.types[s],l,u,a-i,c-a)),t.push(i-n)}function g(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;if(d){var a=[qG.contextHash,d];i=i?[a].concat(i):[a]}if(o>25){var s=[qG.lookAhead,o];i=i?[s].concat(i):[s]}return new JG(e,t,n,r,i)}function y(e,t,n){var r=u.id,o=u.start,i=u.end,a=u.size;if(u.next(),a>=0&&r4)for(var c=u.pos-(a-4);u.pos>c;)n=y(e,t,n);t[--n]=s,t[--n]=i-e,t[--n]=o-e,t[--n]=r}else-3==a?d=r:-4==a&&(h=r);return n}for(var b=[],w=[];u.pos>0;)v(e.start||0,e.bufferStart||0,b,w,-1,0);var x=null!==(t=e.length)&&void 0!==t?t:b.length?w[0]+b[0].length:0;return new JG(f[e.topID],b.reverse(),w.reverse(),x)}var lQ=new WeakMap;function uQ(e,t){if(!e.isAnonymous||t instanceof GG||t.type!=e)return 1;var n=lQ.get(t);if(null==n){n=1;var r,o=bo(t.children);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i.type!=e||!(i instanceof JG)){n=1;break}n+=uQ(e,i)}}catch(e){o.e(e)}finally{o.f()}lQ.set(t,n)}return n}function fQ(e,t,n,r,o,i,a,s,c){for(var l=0,u=r;u=f)break;p+=m}if(l==u+1){if(p>f){var g=n[u];t(g.children,g.positions,0,g.children.length,r[u]+s);continue}d.push(n[u])}else{var y=r[l-1]+n[l-1].length-v;d.push(fQ(e,n,r,u,l,v,y,null,c))}h.push(v+s-i)}}(t,n,r,o,0),(s||c)(d,h,a)}var dQ=function(){function e(t,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];No(this,e),this.from=t,this.to=n,this.tree=r,this.offset=o,this.open=(i?1:0)|(a?2:0)}return Do(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&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[new e(0,t.length,t,0,!1,o)],a=bo(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;s.to>t.length&&i.push(s)}}catch(e){a.e(e)}finally{a.f()}return i}},{key:"applyChanges",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!n.length)return t;for(var o=[],i=1,a=t.length?t[0]:null,s=0,c=0,l=0;;s++){var u=s=r)for(;a&&a.from=d.from||f<=d.to||l){var h=Math.max(d.from,c)-l,v=Math.min(d.to,f)-l;d=h>=v?null:new e(h,v,d.tree,d.offset+l,s>0,!!u)}if(d&&o.push(d),a.to>f)break;a=i-1?t:yQ.get(t.base||t,t.modified.concat(e).sort((function(e,t){return e.id-t.id})))}}}]),e}(),gQ=0,yQ=function(){function e(){No(this,e),this.instances=[],this.id=gQ++}return Do(e,null,[{key:"get",value:function(t,n){if(!n.length)return t;var r=n[0].instances.find((function(e){return e.base==t&&(r=n,o=e.modified,r.length==o.length&&r.every((function(e,t){return e==o[t]})));var r,o}));if(r)return r;var o,i=[],a=new mQ(i,t,n),s=bo(n);try{for(s.s();!(o=s.n()).done;){o.value.instances.push(a)}}catch(e){s.e(e)}finally{s.f()}var c,l=function(e){for(var t=[[]],n=0;n0&&u+3==a.length){c=1;break}var f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+a);if(s.push("*"==f[0]?"":'"'==f[0][0]?JSON.parse(f[0]):f[0]),(u+=f[0].length)==a.length)break;var d=a[u++];if(u==a.length&&"!"==d){c=0;break}if("/"!=d)throw new RangeError("Invalid path: "+a);l=a.slice(u)}var h=s.length-1,v=s[h];if(!v)throw new RangeError("Invalid path: "+a);var p=new xQ(r,c,h>0?s.slice(0,h):null);t[v]=p.sort(t[v])}}}catch(e){i.e(e)}finally{i.f()}}return wQ.add(t)}var wQ=new qG,xQ=function(){function e(t,n,r,o){No(this,e),this.tags=t,this.mode=n,this.context=r,this.next=o}return Do(e,[{key:"opaque",get:function(){return 0==this.mode}},{key:"inherit",get:function(){return 1==this.mode}},{key:"sort",value:function(e){return!e||e.depth3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.length,i=new SQ(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}xQ.empty=new xQ([],2,null);var SQ=function(){function e(t,n,r){No(this,e),this.at=t,this.highlighters=n,this.span=r,this.class=""}return Do(e,[{key:"startSpan",value:function(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}},{key:"flush",value:function(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}},{key:"highlightRange",value:function(e,t,n,r,o){var i=e.type,a=e.from,s=e.to;if(!(a>=n||s<=t)){i.isTop&&(o=this.highlighters.filter((function(e){return!e.scope||e.scope(i)})));var c=r,l=function(e){var t=e.type.prop(wQ);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||xQ.empty,u=function(e,t){var n,r=null,o=bo(e);try{for(o.s();!(n=o.n()).done;){var i=n.value.style(t);i&&(r=r?r+" "+i:i)}}catch(e){o.e(e)}finally{o.f()}return r}(o,l.tags);if(u&&(c&&(c+=" "),c+=u,1==l.mode&&(r+=(r?" ":"")+u)),this.startSpan(Math.max(t,a),c),!l.opaque){var f=e.tree&&e.tree.prop(qG.mounted);if(f&&f.overlay){for(var d=e.node.enter(f.overlay[0].from+a,1),h=this.highlighters.filter((function(e){return!e.scope||e.scope(f.tree.type)})),v=e.firstChild(),p=0,m=a;;p++){var g=p=y)&&e.nextSibling()););if(!g||y>n)break;(m=g.to+a)>t&&(this.highlightRange(d.cursor(),Math.max(t,g.from+a),Math.min(n,m),"",h),this.startSpan(Math.min(n,m),c))}v&&e.parent()}else if(e.firstChild()){f&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),c)}}while(e.nextSibling());e.parent()}}}}}]),e}();var CQ,$Q=mQ.define,_Q=$Q(),OQ=$Q(),MQ=$Q(OQ),AQ=$Q(OQ),EQ=$Q(),PQ=$Q(EQ),TQ=$Q(EQ),RQ=$Q(),NQ=$Q(RQ),IQ=$Q(),DQ=$Q(),zQ=$Q(),qQ=$Q(zQ),BQ=$Q(),LQ={comment:_Q,lineComment:$Q(_Q),blockComment:$Q(_Q),docComment:$Q(_Q),name:OQ,variableName:$Q(OQ),typeName:MQ,tagName:$Q(MQ),propertyName:AQ,attributeName:$Q(AQ),className:$Q(OQ),labelName:$Q(OQ),namespace:$Q(OQ),macroName:$Q(OQ),literal:EQ,string:PQ,docString:$Q(PQ),character:$Q(PQ),attributeValue:$Q(PQ),number:TQ,integer:$Q(TQ),float:$Q(TQ),bool:$Q(EQ),regexp:$Q(EQ),escape:$Q(EQ),color:$Q(EQ),url:$Q(EQ),keyword:IQ,self:$Q(IQ),null:$Q(IQ),atom:$Q(IQ),unit:$Q(IQ),modifier:$Q(IQ),operatorKeyword:$Q(IQ),controlKeyword:$Q(IQ),definitionKeyword:$Q(IQ),moduleKeyword:$Q(IQ),operator:DQ,derefOperator:$Q(DQ),arithmeticOperator:$Q(DQ),logicOperator:$Q(DQ),bitwiseOperator:$Q(DQ),compareOperator:$Q(DQ),updateOperator:$Q(DQ),definitionOperator:$Q(DQ),typeOperator:$Q(DQ),controlOperator:$Q(DQ),punctuation:zQ,separator:$Q(zQ),bracket:qQ,angleBracket:$Q(qQ),squareBracket:$Q(qQ),paren:$Q(qQ),brace:$Q(qQ),content:RQ,heading:NQ,heading1:$Q(NQ),heading2:$Q(NQ),heading3:$Q(NQ),heading4:$Q(NQ),heading5:$Q(NQ),heading6:$Q(NQ),contentSeparator:$Q(RQ),list:$Q(RQ),quote:$Q(RQ),emphasis:$Q(RQ),strong:$Q(RQ),link:$Q(RQ),monospace:$Q(RQ),strikethrough:$Q(RQ),inserted:$Q(),deleted:$Q(),changed:$Q(),invalid:$Q(),meta:BQ,documentMeta:$Q(BQ),annotation:$Q(BQ),processingInstruction:$Q(BQ),definition:mQ.defineModifier(),constant:mQ.defineModifier(),function:mQ.defineModifier(),standard:mQ.defineModifier(),local:mQ.defineModifier(),special:mQ.defineModifier()};kQ([{tag:LQ.link,class:"tok-link"},{tag:LQ.heading,class:"tok-heading"},{tag:LQ.emphasis,class:"tok-emphasis"},{tag:LQ.strong,class:"tok-strong"},{tag:LQ.keyword,class:"tok-keyword"},{tag:LQ.atom,class:"tok-atom"},{tag:LQ.bool,class:"tok-bool"},{tag:LQ.url,class:"tok-url"},{tag:LQ.labelName,class:"tok-labelName"},{tag:LQ.inserted,class:"tok-inserted"},{tag:LQ.deleted,class:"tok-deleted"},{tag:LQ.literal,class:"tok-literal"},{tag:LQ.string,class:"tok-string"},{tag:LQ.number,class:"tok-number"},{tag:[LQ.regexp,LQ.escape,LQ.special(LQ.string)],class:"tok-string2"},{tag:LQ.variableName,class:"tok-variableName"},{tag:LQ.local(LQ.variableName),class:"tok-variableName tok-local"},{tag:LQ.definition(LQ.variableName),class:"tok-variableName tok-definition"},{tag:LQ.special(LQ.variableName),class:"tok-variableName2"},{tag:LQ.definition(LQ.propertyName),class:"tok-propertyName tok-definition"},{tag:LQ.typeName,class:"tok-typeName"},{tag:LQ.namespace,class:"tok-namespace"},{tag:LQ.className,class:"tok-className"},{tag:LQ.macroName,class:"tok-macroName"},{tag:LQ.propertyName,class:"tok-propertyName"},{tag:LQ.operator,class:"tok-operator"},{tag:LQ.comment,class:"tok-comment"},{tag:LQ.meta,class:"tok-meta"},{tag:LQ.invalid,class:"tok-invalid"},{tag:LQ.punctuation,class:"tok-punctuation"}]);var FQ=new qG;var VQ=new qG,HQ=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";No(this,e),this.data=t,this.name=o,SV.prototype.hasOwnProperty("tree")||Object.defineProperty(SV.prototype,"tree",{get:function(){return JQ(this)}}),this.parser=n,this.extension=[nY.of(this),SV.languageData.of((function(e,t,n){var r=WQ(e,t,n),o=r.type.prop(FQ);if(!o)return[];var i=e.facet(o),a=r.type.prop(VQ);if(a){var s,c=r.resolve(t-r.from,n),l=bo(a);try{for(l.s();!(s=l.n()).done;){var u=s.value;if(u.test(c,e)){var f=e.facet(u.facet);return"replace"==u.type?f:f.concat(i)}}}catch(e){l.e(e)}finally{l.f()}}return i}))].concat(r)}return Do(e,[{key:"isActiveAt",value:function(e,t){return WQ(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(FQ)==this.data}},{key:"findRegions",value:function(e){var t=this,n=e.facet(nY);if((null==n?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];var r=[];return function e(n,o){if(n.prop(FQ)!=t.data){var i=n.prop(qG.mounted);if(i){if(i.tree.prop(FQ)==t.data){if(i.overlay){var a,s=bo(i.overlay);try{for(s.s();!(a=s.n()).done;){var c=a.value;r.push({from:c.from+o,to:c.to+o})}}catch(e){s.e(e)}finally{s.f()}}else r.push({from:o,to:o+n.length});return}if(i.overlay){var l=r.length;if(e(i.tree,i.overlay[0].from+o),r.length>l)return}}for(var u=0;u=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}]),e}(),GQ=null,QQ=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0;No(this,e),this.parser=t,this.state=n,this.fragments=r,this.tree=o,this.treeLen=i,this.viewport=a,this.skipped=s,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}return Do(e,[{key:"startParse",value:function(){return this.parser.startParse(new KQ(this.state.doc),this.fragments)}},{key:"work",value:function(e,t){var n=this;return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=JG.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext((function(){var r;if("number"==typeof e){var o=Date.now()+e;e=function(){return Date.now()>o}}for(n.parse||(n.parse=n.startParse()),null!=t&&(null==n.parse.stoppedAt||n.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext((function(){for(;!(t=n.parse.advance()););})),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(dQ.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(e){var t=GQ;GQ=this;try{return e()}finally{GQ=t}}},{key:"withoutTempSkipped",value:function(e){for(var t;t=this.tempSkipped.pop();)e=YQ(e,t.from,t.to);return e}},{key:"changes",value:function(t,n){var r=this.fragments,o=this.tree,i=this.treeLen,a=this.viewport,s=this.skipped;if(this.takeTree(),!t.empty){var c=[];if(t.iterChangedRanges((function(e,t,n,r){return c.push({fromA:e,toA:t,fromB:n,toB:r})})),r=dQ.applyChanges(r,c),o=JG.empty,i=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){s=[];var l,u=bo(this.skipped);try{for(u.s();!(l=u.n()).done;){var f=l.value,d=t.mapPos(f.from,1),h=t.mapPos(f.to,-1);de.from&&(this.fragments=YQ(this.fragments,o,i),this.skipped.splice(n--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(e,t){this.skipped.push({from:e,to:t})}},{key:"isDone",value:function(e){e=Math.min(e,this.state.doc.length);var t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}}],[{key:"create",value:function(t,n,r){return new e(t,n,[],JG.empty,0,r,[],null)}},{key:"getSkippingParser",value:function(e){return new(function(t){function n(){return No(this,n),_o(this,n,arguments)}return Eo(n,hQ),Do(n,[{key:"createParse",value:function(t,n,r){var o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,advance:function(){var t=GQ;if(t){var n,a=bo(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;t.tempSkipped.push(s)}}catch(e){a.e(e)}finally{a.f()}e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new JG(FG.none,[],[],i-o)},stoppedAt:null,stopAt:function(){}}}}]),n}())}},{key:"get",value:function(){return GQ}}]),e}();function YQ(e,t,n){return dQ.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var XQ=function(){function e(t){No(this,e),this.context=t,this.tree=t.tree}return Do(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=QQ.create(t.facet(nY).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}}]),e}();HQ.state=VF.define({create:XQ.init,update:function(e,t){var n,r=bo(t.effects);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.is(HQ.setState))return o.value}}catch(e){r.e(e)}finally{r.f()}return t.startState.facet(nY)!=t.state.facet(nY)?XQ.init(t.state):e.apply(t)}});var ZQ=function(e){var t=setTimeout((function(){return e()}),500);return function(){return clearTimeout(t)}};"undefined"!=typeof requestIdleCallback&&(ZQ=function(e){var t=-1,n=setTimeout((function(){t=requestIdleCallback(e,{timeout:400})}),100);return function(){return t<0?clearTimeout(n):cancelIdleCallback(t)}});var eY="undefined"!=typeof navigator&&(null===(CQ=navigator.scheduling)||void 0===CQ?void 0:CQ.isInputPending)?function(){return navigator.scheduling.isInputPending()}:null,tY=QW.fromClass(function(){function e(t){No(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 Do(e,[{key:"update",value:function(e){var t=this.view.state.field(HQ.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}},{key:"scheduleWork",value:function(){if(!this.working){var e=this.view.state,t=e.field(HQ.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=ZQ(this.work))}}},{key:"work",value:function(e){this.working=null;var t=Date.now();if(this.chunkEndo+1e3,c=i.context.work((function(){return eY&&eY()||Date.now()>a}),o+(s?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:HQ.setState.of(new XQ(i.context))})),this.chunkBudget>0&&(!c||s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}}}},{key:"checkAsyncSchedule",value:function(e){var t=this;e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((function(){return t.scheduleWork()})).catch((function(e){return UW(t.view.state,e)})).then((function(){return t.workScheduled--})),e.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()}}}),nY=DF.define({combine:function(e){return e.length?e[0]:null},enables:function(e){return[HQ.state,tY,JJ.contentAttributes.compute([e],(function(t){var n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]}}),rY=Do((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];No(this,e),this.language=t,this.support=n,this.extension=[t,n]})),oY=DF.define(),iY=DF.define({combine:function(e){if(!e.length)return" ";var t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((function(e){return e!=t[0]})))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function aY(e){var t=e.facet(iY);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function sY(e,t){var n="",r=e.tabSize,o=e.facet(iY)[0];if("\t"==o){for(;t>=r;)n+="\t",t-=r;o=" "}for(var i=0;i=t?function(e,t,n){var r=t.resolveStack(n),o=r.node.enterUnfinishedNodesBefore(n);if(o!=r.node){for(var i=[],a=o;a!=r.node;a=a.parent)i.push(a);for(var s=i.length-1;s>=0;s--)r={node:i[s],next:r}}return fY(r,e,n)}(e,i,t):null}var lY=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};No(this,e),this.state=t,this.options=n,this.unit=aY(t)}return Do(e,[{key:"lineAt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.state.doc.lineAt(e),r=this.options,o=r.simulateBreak,i=r.simulateDoubleBreak;return null!=o&&o>=n.from&&o<=n.to?i&&o==e?{text:"",from:e}:(t<0?o1&&void 0!==arguments[1]?arguments[1]:1;if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";var n=this.lineAt(e,t),r=n.text,o=n.from;return r.slice(e-o,Math.min(r.length,e+100-o))}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,o=n.from,i=this.countColumn(r,e-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(i+=a-this.countColumn(r,r.search(/\S|$/))),i}},{key:"countColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;return FV(e,this.state.tabSize,t)}},{key:"lineIndent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.lineAt(e,t),r=n.text,o=n.from,i=this.options.overrideIndentation;if(i){var a=i(o);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),e}(),uY=new qG;function fY(e,t,n){for(var r=e;r;r=r.next){var o=dY(r.node);if(o)return o(vY.create(t,n,r))}return 0}function dY(e){var t=e.type.prop(uY);if(t)return t;var n,r=e.firstChild;if(r&&(n=r.type.prop(qG.closedBy))){var o=e.lastChild,i=o&&n.indexOf(o.name)>-1;return function(e){return function(e,t,n,r,o){var i=e.textAfter,a=i.match(/^\s*/)[0].length,s=r&&i.slice(a,a+r.length)==r||o==e.pos+a,c=t?function(e){var t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;for(var o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o),s=n.to;;){var c=t.childAfter(s);if(!c||c==r)return null;if(!c.type.isSkipped)return c.from0&&void 0!==arguments[0]?arguments[0]:{},t=e.except,n=e.units,r=void 0===n?1:n;return function(e){var n=t&&t.test(e.textAfter);return e.baseIndent+(n?0:r*e.unit)}}var gY=200;var yY=DF.define(),bY=new qG;function wY(e,t,n){var r,o=bo(e.facet(yY));try{for(o.s();!(r=o.n()).done;){var i=(0,r.value)(e,t,n);if(i)return i}}catch(e){o.e(e)}finally{o.f()}return function(e,t,n){var r=JQ(e);if(r.lengthn)){if(a&&c.from=t&&u.to>n&&(a=u)}}}return a}(e,t,n)}function xY(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 kY=dV.define({map:xY}),jY=dV.define({map:xY});function SY(e){var t,n=[],r=bo(e.state.selection.ranges);try{var o=function(){var r=t.value.head;if(n.some((function(e){return e.from<=r&&e.to>=r})))return 1;n.push(e.lineBlockAt(r))};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}return n}var CY=VF.define({create:function(){return nW.none},update:function(e,t){e=e.map(t.changes);var n,r=bo(t.effects);try{var o=function(){var r=n.value;if(r.is(kY)&&!function(e,t,n){var r=!1;return e.between(t,t,(function(e,o){e==t&&o==n&&(r=!0)})),r}(e,r.value.from,r.value.to)){var o=t.state.facet(EY).preparePlaceholder,i=o?nW.replace({widget:new NY(o(t.state,r.value))}):RY;e=e.update({add:[i.range(r.value.from,r.value.to)]})}else r.is(jY)&&(e=e.update({filter:function(e,t){return r.value.from!=e||r.value.to!=t},filterFrom:r.value.from,filterTo:r.value.to}))};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}if(t.selection){var i=!1,a=t.selection.main.head;e.between(a,a,(function(e,t){ea&&(i=!0)})),i&&(e=e.update({filterFrom:a,filterTo:a,filter:function(e,t){return t<=a||e>=a}}))}return e},provide:function(e){return JJ.decorations.from(e)},toJSON:function(e,t){var n=[];return e.between(0,t.doc.length,(function(e,t){n.push(e,t)})),n},fromJSON:function(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");for(var t=[],n=0;ne)&&(o={from:e,to:t})})),o}function _Y(e,t){return e.field(CY,!1)?t:t.concat(dV.appendConfig.of(PY()))}function OY(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return JJ.announce.of("".concat(e.state.phrase(n?"Folded lines":"Unfolded lines")," ").concat(r," ").concat(e.state.phrase("to")," ").concat(o,"."))}var MY=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(e){var t,n=bo(SY(e));try{for(n.s();!(t=n.n()).done;){var r=t.value,o=wY(e.state,r.from,r.to);if(o)return e.dispatch({effects:_Y(e.state,[kY.of(o),OY(e,o)])}),!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(e){if(!e.state.field(CY,!1))return!1;var t,n=[],r=bo(SY(e));try{for(r.s();!(t=r.n()).done;){var o=t.value,i=$Y(e.state,o.from,o.to);i&&n.push(jY.of(i),OY(e,i,!1))}}catch(e){r.e(e)}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;r0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},IY),e),n=new DY(t,!0),r=new DY(t,!1),o=QW.fromClass(function(){function e(t){No(this,e),this.from=t.viewport.from,this.markers=this.buildMarkers(t)}return Do(e,[{key:"update",value:function(e){(e.docChanged||e.viewportChanged||e.startState.facet(nY)!=e.state.facet(nY)||e.startState.field(CY,!1)!=e.state.field(CY,!1)||JQ(e.startState)!=JQ(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}},{key:"buildMarkers",value:function(e){var t,o=new EV,i=bo(e.viewportLineBlocks);try{for(i.s();!(t=i.n()).done;){var a=t.value,s=$Y(e.state,a.from,a.to)?r:wY(e.state,a.from,a.to)?n:null;s&&o.add(a.from,a.from,s)}}catch(e){i.e(e)}finally{i.f()}return o.finish()}}]),e}()),i=t.domEventHandlers;return[o,bG({class:"cm-foldGutter",markers:function(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||AV.empty},initialSpacer:function(){return new DY(t,!1)},domEventHandlers:Object.assign(Object.assign({},i),{click:function(e,t,n){if(i.click&&i.click(e,t,n))return!0;var r=$Y(e.state,t.from,t.to);if(r)return e.dispatch({effects:jY.of(r)}),!0;var o=wY(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:kY.of(o)}),!0)}})}),PY()]}var qY=JJ.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"}}),BY=function(){function e(t,n){var r;function o(e){var t=JV.newName();return(r||(r=Object.create(null)))["."+t]=e,t}No(this,e),this.specs=t;var i="string"==typeof n.all?n.all:n.all?o(n.all):void 0,a=n.scope;this.scope=a instanceof HQ?function(e){return e.prop(FQ)==a.data}:a?function(e){return e==a}:void 0,this.style=kQ(t.map((function(e){return{tag:e.tag,class:e.class||o(Object.assign({},e,{tag:null}))}})),{all:i}).style,this.module=r?new JV(r):null,this.themeType=n.themeType}return Do(e,null,[{key:"define",value:function(t,n){return new e(t,n||{})}}]),e}(),LY=DF.define(),FY=DF.define({combine:function(e){return e.length?[e[0]]:null}});function VY(e){var t=e.facet(LY);return t.length?t:e.facet(FY)}function HY(e,t){var n,r=[UY];return e instanceof BY&&(e.module&&r.push(JJ.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(FY.of(e)):n?r.push(LY.computeN([JJ.darkTheme],(function(t){return t.facet(JJ.darkTheme)==("dark"==n)?[e]:[]}))):r.push(LY.of(e)),r}var WY=function(){function e(t){No(this,e),this.markCache=Object.create(null),this.tree=JQ(t.state),this.decorations=this.buildDeco(t,VY(t.state)),this.decoratedTo=t.viewport.to}return Do(e,[{key:"update",value:function(e){var t=JQ(e.state),n=VY(e.state),r=n!=VY(e.startState),o=e.view.viewport,i=e.changes.mapPos(this.decoratedTo,1);t.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}},{key:"buildDeco",value:function(e,t){var n=this;if(!t||!this.tree.length)return nW.none;var r,o=new EV,i=bo(e.visibleRanges);try{for(i.s();!(r=i.n()).done;){var a=r.value,s=a.from,c=a.to;jQ(this.tree,t,(function(e,t,r){o.add(e,t,n.markCache[r]||(n.markCache[r]=nW.mark({class:r})))}),s,c)}}catch(e){i.e(e)}finally{i.f()}return o.finish()}}]),e}(),UY=GF.high(QW.fromClass(WY,{decorations:function(e){return e.decorations}})),JY=BY.define([{tag:LQ.meta,color:"#404740"},{tag:LQ.link,textDecoration:"underline"},{tag:LQ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:LQ.emphasis,fontStyle:"italic"},{tag:LQ.strong,fontWeight:"bold"},{tag:LQ.strikethrough,textDecoration:"line-through"},{tag:LQ.keyword,color:"#708"},{tag:[LQ.atom,LQ.bool,LQ.url,LQ.contentSeparator,LQ.labelName],color:"#219"},{tag:[LQ.literal,LQ.inserted],color:"#164"},{tag:[LQ.string,LQ.deleted],color:"#a11"},{tag:[LQ.regexp,LQ.escape,LQ.special(LQ.string)],color:"#e40"},{tag:LQ.definition(LQ.variableName),color:"#00f"},{tag:LQ.local(LQ.variableName),color:"#30a"},{tag:[LQ.typeName,LQ.namespace],color:"#085"},{tag:LQ.className,color:"#167"},{tag:[LQ.special(LQ.variableName),LQ.macroName],color:"#256"},{tag:LQ.definition(LQ.propertyName),color:"#00c"},{tag:LQ.comment,color:"#940"},{tag:LQ.invalid,color:"#f00"}]),KY=JJ.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),GY=1e4,QY="()[]{}",YY=DF.define({combine:function(e){return CV(e,{afterCursor:!0,brackets:QY,maxScanDistance:GY,renderMatch:eX})}}),XY=nW.mark({class:"cm-matchingBracket"}),ZY=nW.mark({class:"cm-nonmatchingBracket"});function eX(e){var t=[],n=e.matched?XY:ZY;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 tX=VF.define({create:function(){return nW.none},update:function(e,t){if(!t.docChanged&&!t.selection)return e;var n,r=[],o=t.state.facet(YY),i=bo(t.state.selection.ranges);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.empty){var s=sX(t.state,a.head,-1,o)||a.head>0&&sX(t.state,a.head-1,1,o)||o.afterCursor&&(sX(t.state,a.head,1,o)||a.head0&&void 0!==arguments[0]?arguments[0]:{};return[YY.of(e),nX]}var oX=new qG;function iX(e,t,n){var r=e.prop(t<0?qG.openedBy:qG.closedBy);if(r)return r;if(1==e.name.length){var o=n.indexOf(e.name);if(o>-1&&o%2==(t<0?1:0))return[n[o+t]]}return null}function aX(e){var t=e.type.prop(oX);return t?t(e.node):e}function sX(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.maxScanDistance||GY,i=r.brackets||QY,a=JQ(e),s=a.resolveInner(t,n),c=s;c;c=c.parent){var l=iX(c.type,n,i);if(l&&c.from0?t>=u.from&&tu.from&&t<=u.to))return cX(e,t,n,c,u,l,i)}}return function(e,t,n,r,o,i,a){var s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=a.indexOf(s);if(c<0||c%2==0!=n>0)return null;for(var l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),f=0,d=0;!u.next().done&&d<=i;){var h=u.value;n<0&&(d+=h.length);for(var v=t+d*n,p=n>0?0:h.length-1,m=n>0?h.length:-1;p!=m;p+=n){var g=a.indexOf(h[p]);if(!(g<0||r.resolveInner(v+p,1).type!=o))if(g%2==0==n>0)f++;else{if(1==f)return{start:l,end:{from:v+p,to:v+p+1},matched:g>>1==c>>1};f--}}n>0&&(d+=h.length)}return u.done?{start:l,matched:!1}:null}(e,t,n,a,s.type,o,i)}function cX(e,t,n,r,o,i,a){var s=r.parent,c={from:o.from,to:o.to},l=0,u=null==s?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==l&&i.indexOf(u.type.name)>-1&&u.from-1||(fX.push(e),console.warn(t))}function wX(e,t){var n,r=[],o=bo(t.split(" "));try{for(o.s();!(n=o.n()).done;){var i,a=n.value,s=[],c=bo(a.split("."));try{for(c.s();!(i=c.n()).done;){var l=i.value,u=e[l]||LQ[l];u?"function"==typeof u?s.length?s=s.map(u):bX(l,"Modifier ".concat(l," used at start of tag")):s.length?bX(l,"Tag ".concat(l," used as modifier")):s=Array.isArray(u)?u:[u]:bX(l,"Unknown highlighting tag ".concat(l))}}catch(e){c.e(e)}finally{c.f()}var f,d=bo(s);try{for(d.s();!(f=d.n()).done;){var h=f.value;r.push(h)}}catch(e){d.e(e)}finally{d.f()}}}catch(e){o.e(e)}finally{o.f()}if(!r.length)return 0;var v=t.replace(/ /g,"_"),p=v+" "+r.map((function(e){return e.id})),m=dX[p];if(m)return m.id;var g=dX[p]=FG.define({id:uX.length,name:v,props:[bQ(zo({},v,r))]});return uX.push(g),g.id}fW.RTL,fW.LTR;function xX(e,t){return function(n){var r=n.state,o=n.dispatch;if(r.readOnly)return!1;var i=e(t,r);return!!i&&(o(r.update(i)),!0)}}var kX=xX(OX,0),jX=xX(_X,0),SX=xX((function(e,t){return _X(e,t,function(e){var t,n=[],r=bo(e.selection.ranges);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=e.doc.lineAt(o.from),a=o.to<=i.to?i:e.doc.lineAt(o.to),s=n.length-1;s>=0&&n[s].to>i.from?n[s].to=a.to:n.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:a.to})}}catch(e){r.e(e)}finally{r.f()}return n}(t))}),0);function CX(e,t){var n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}var $X=50;function _X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges,r=n.map((function(e){return CX(t,e.from).block}));if(!r.every((function(e){return e})))return null;var o=n.map((function(e,n){return function(e,t,n,r){var o,i,a=t.open,s=t.close,c=e.sliceDoc(n-$X,n),l=e.sliceDoc(r,r+$X),u=/\s*$/.exec(c)[0].length,f=/^\s*/.exec(l)[0].length,d=c.length-u;if(c.slice(d-a.length,d)==a&&l.slice(f,f+s.length)==s)return{open:{pos:n-u,margin:u&&1},close:{pos:r+f,margin:f&&1}};r-n<=2*$X?o=i=e.sliceDoc(n,r):(o=e.sliceDoc(n,n+$X),i=e.sliceDoc(r-$X,r));var h=/^\s*/.exec(o)[0].length,v=/\s*$/.exec(i)[0].length,p=i.length-v-s.length;return o.slice(h,h+a.length)==a&&i.slice(p,p+s.length)==s?{open:{pos:n+h+a.length,margin:/\s/.test(o.charAt(h+a.length))?1:0},close:{pos:r-v-s.length,margin:/\s/.test(i.charAt(p-1))?1:0}}:null}(t,r[n],e.from,e.to)}));if(2!=e&&!o.every((function(e){return e})))return{changes:t.changes(n.map((function(e,t){return o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]})))};if(1!=e&&o.some((function(e){return e}))){for(var i,a=[],s=0;s2&&void 0!==arguments[2]?arguments[2]:t.selection.ranges);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=a.from,c=a.to,l=r.length,u=1e9,f=CX(t,s).line;if(f){for(var d=s;d<=c;){var h=t.doc.lineAt(d);if(h.from>o&&(s==c||c>h.from)){o=h.from;var v=/^\s*/.exec(h.text)[0].length,p=v==h.length,m=h.text.slice(v,v+f.length)==f?v:-1;v=0}))){var _,O=[],M=bo(r);try{for(M.s();!(_=M.n()).done;){var A=_.value,E=A.line,P=A.comment,T=A.token;if(P>=0){var R=E.from+P,N=R+T.length;" "==E.text[N-E.from]&&N++,O.push({from:R,to:N})}}}catch(e){M.e(e)}finally{M.f()}return{changes:O}}return null}var MX=lV.define(),AX=lV.define(),EX=DF.define(),PX=DF.define({combine:function(e){return CV(e,{minDepth:100,newGroupDelay:500,joinToEvent:function(e,t){return t}},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:function(e,t){return function(n,r){return e(n,r)||t(n,r)}}})}}),TX=VF.define({create:function(){return ZX.empty},update:function(e,t){var n=t.state.facet(PX),r=t.annotation(MX);if(r){var o=VX.fromTransaction(t,r.selection),i=r.side,a=0==i?e.undone:e.done;return a=o?HX(a,a.length,n.minDepth,o):KX(a,t.startState.selection),new ZX(0==i?r.rest:a,0==i?a:r.rest)}var s=t.annotation(AX);if("full"!=s&&"before"!=s||(e=e.isolate()),!1===t.annotation(hV.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);var c=VX.fromTransaction(t),l=t.annotation(hV.time),u=t.annotation(hV.userEvent);return c?e=e.addChanges(c,l,u,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,u,n.newGroupDelay)),"full"!=s&&"after"!=s||(e=e.isolate()),e},toJSON:function(e){return{done:e.done.map((function(e){return e.toJSON()})),undone:e.undone.map((function(e){return e.toJSON()}))}},fromJSON:function(e){return new ZX(e.done.map(VX.fromJSON),e.undone.map(VX.fromJSON))}});function RX(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[TX,PX.of(e),JJ.domEventHandlers({beforeinput:function(e,t){var n="historyUndo"==e.inputType?IX:"historyRedo"==e.inputType?DX:null;return!!n&&(e.preventDefault(),n(t))}})]}function NX(e,t){return function(n){var r=n.state,o=n.dispatch;if(!t&&r.readOnly)return!1;var i=r.field(TX,!1);if(!i)return!1;var a=i.pop(e,r,t);return!!a&&(o(a),!0)}}var IX=NX(0,!1),DX=NX(1,!1),zX=NX(0,!0),qX=NX(1,!0);function BX(e){return function(t){var n=t.field(TX,!1);if(!n)return 0;var r=0==e?n.done:n.undone;return r.length-(r.length&&!r[0].changes?1:0)}}var LX=BX(0),FX=BX(1),VX=function(){function e(t,n,r,o,i){No(this,e),this.changes=t,this.effects=n,this.mapped=r,this.startSelection=o,this.selectionsAfter=i}return Do(e,[{key:"setSelAfter",value:function(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}},{key:"toJSON",value:function(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((function(e){return e.toJSON()}))}}}],[{key:"fromJSON",value:function(t){return new e(t.changes&&$F.fromJSON(t.changes),[],t.mapped&&CF.fromJSON(t.mapped),t.startSelection&&RF.fromJSON(t.startSelection),t.selectionsAfter.map(RF.fromJSON))}},{key:"fromTransaction",value:function(t,n){var r,o=UX,i=bo(t.startState.facet(EX));try{for(i.s();!(r=i.n()).done;){var a=(0,r.value)(t);a.length&&(o=o.concat(a))}}catch(e){i.e(e)}finally{i.f()}return!o.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),o,void 0,n||t.startState.selection,UX)}},{key:"selection",value:function(t){return new e(void 0,UX,void 0,void 0,t)}}]),e}();function HX(e,t,n,r){var o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function WX(e,t){return e.length?t.length?e.concat(t):e:t}var UX=[],JX=200;function KX(e,t){if(e.length){var n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-JX));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),HX(e,e.length-1,1e9,n.setSelAfter(r)))}return[VX.selection([t])]}function GX(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 QX(e,t){if(!e.length)return e;for(var n=e.length,r=UX;n;){var o=YX(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){var i=e.slice(0,n);return i[n-1]=o,i}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[VX.selection(r)]:UX}function YX(e,t,n){var r=WX(e.selectionsAfter.length?e.selectionsAfter.map((function(e){return e.map(t)})):UX,n);if(!e.changes)return VX.selection(r);var o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new VX(o,dV.mapEffects(e.effects,t),a,e.startSelection.map(i),r)}var XX=/^(input\.type|delete)($|\.)/,ZX=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;No(this,e),this.done=t,this.undone=n,this.prevTime=r,this.prevUserEvent=o}return Do(e,[{key:"isolate",value:function(){return this.prevTime?new e(this.done,this.undone):this}},{key:"addChanges",value:function(t,n,r,o,i){var a=this.done,s=a[a.length-1];return a=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||XX.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime=s&&o<=c&&(r=!0)}})),r}(s.changes,t.changes))||"input.type.compose"==r)?HX(a,a.length-1,o.minDepth,new VX(t.changes.compose(s.changes),WX(t.effects,s.effects),s.mapped,s.startSelection,UX)):HX(a,a.length,o.minDepth,t),new e(a,UX,n,r)}},{key:"addSelection",value:function(t,n,r,o){var i,a,s=this.done.length?this.done[this.done.length-1].selectionsAfter:UX;return s.length>0&&n-this.prevTime2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function fZ(e,t,n){for(var r=JQ(e).resolveInner(t.head),o=n?qG.closedBy:qG.openedBy,i=t.head;;){var a=n?r.childAfter(i):r.childBefore(i);if(!a)break;uZ(e,a,o)?r=a:i=n?a.to:a.from}var s,c;return c=r.type.prop(o)&&(s=n?sX(e,r.from,1):sX(e,r.to,-1))&&s.matched?n?s.end.to:s.end.from:n?r.to:r.from,RF.cursor(c,n?-1:1)}function dZ(e,t){return rZ(e,(function(n){if(!n.empty)return oZ(n,t);var r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}var hZ=function(e){return dZ(e,!1)},vZ=function(e){return dZ(e,!0)};function pZ(e){var t,n=e.scrollDOM.clientHeightc&&a.bottomo&&(n="delete.forward",a=IZ(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=IZ(e,o,!1),i=IZ(e,i,!0);return o==i?{range:r}:{changes:{from:o,to:i},range:RF.cursor(o,ot&&(t=n?r:e)}))}}catch(e){o.e(e)}finally{o.f()}}return t}var DZ=function(e,t){return NZ(e,(function(n){var r,o,i=n.from,a=e.state,s=a.doc.lineAt(i);if(!t&&i>s.from&&i=a.number){var c=n[n.length-1];c.to=s.to,c.ranges.push(i)}else n.push({from:a.from,to:s.to,ranges:[i]});r=s.number+1}}catch(e){o.e(e)}finally{o.f()}return n}function VZ(e,t,n){if(e.readOnly)return!1;var r,o=[],i=[],a=bo(FZ(e));try{for(a.s();!(r=a.n()).done;){var s=r.value;if(n?s.to!=e.doc.length:0!=s.from){var c=e.doc.lineAt(n?s.to+1:s.from-1),l=c.length+1;if(n){o.push({from:s.to,to:c.to},{from:s.from,insert:c.text+e.lineBreak});var u,f=bo(s.ranges);try{for(f.s();!(u=f.n()).done;){var d=u.value;i.push(RF.range(Math.min(e.doc.length,d.anchor+l),Math.min(e.doc.length,d.head+l)))}}catch(e){f.e(e)}finally{f.f()}}else{o.push({from:c.from,to:s.from},{from:s.to,insert:e.lineBreak+c.text});var h,v=bo(s.ranges);try{for(v.s();!(h=v.n()).done;){var p=h.value;i.push(RF.range(p.anchor-l,p.head-l))}}catch(e){v.e(e)}finally{v.f()}}}}}catch(e){a.e(e)}finally{a.f()}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:RF.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function HZ(e,t,n){if(e.readOnly)return!1;var r,o=[],i=bo(FZ(e));try{for(i.s();!(r=i.n()).done;){var a=r.value;n?o.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):o.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)})}}catch(e){i.e(e)}finally{i.f()}return t(e.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var WZ=JZ(!1),UZ=JZ(!0);function JZ(e){return function(t){var n=t.state,r=t.dispatch;if(n.readOnly)return!1;var o=n.changeByRange((function(t){var r=t.from,o=t.to,i=n.doc.lineAt(r),a=!e&&r==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};var n,r=JQ(e).resolveInner(t),o=r.childBefore(t),i=r.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(n=o.type.prop(qG.closedBy))&&n.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(n,r);e&&(r=o=(o<=i.to?i:n.doc.lineAt(o)).to);var s=new lY(n,{simulateBreak:r,simulateDoubleBreak:!!a}),c=cY(s,r);for(null==c&&(c=FV(/^\s*/.exec(n.doc.lineAt(r).text)[0],n.tabSize));oi.from&&rn&&(r.empty||r.to>a.from)&&(t(a,o,r),n=a.number),i=a.to+1}var s=e.changes(o);return{changes:o,range:RF.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}}))}var GZ=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(KZ(t,(function(e,n){n.push({from:e.from,insert:t.facet(iY)})})),{userEvent:"input.indent"})),!0)},QZ=function(e){var t=e.state,n=e.dispatch;return!t.readOnly&&(n(t.update(KZ(t,(function(e,n){var r=/^\s*/.exec(e.text)[0];if(r){for(var o=FV(r,t.tabSize),i=0,a=sY(t,Math.max(0,o-aY(t)));in?n:Math.max(0,t.head-1)}))}},{mac:"Mod-Delete",run:function(e){return NZ(e,(function(t){var n=e.moveToLineBoundary(t,!0).head;return t.head1?o=RF.create([r.main]):r.main.empty||(o=RF.create([RF.cursor(r.main.head)])),!!o&&(n(nZ(t,o)),!0)}},{key:"Mod-Enter",run:UZ},{key:"Alt-l",mac:"Ctrl-l",run:function(e){var t=e.state,n=e.dispatch,r=FZ(t).map((function(e){var n=e.from,r=e.to;return RF.range(n,Math.min(r+1,t.doc.length))}));return n(t.update({selection:RF.create(r),userEvent:"select"})),!0}},{key:"Mod-i",run:function(e){var t=e.state,n=e.dispatch,r=tZ(t.selection,(function(e){for(var n,r=JQ(t).resolveStack(e.from,1);r;r=r.next){var o=r.node;if((o.from=e.to||o.to>e.to&&o.from<=e.from)&&(null===(n=o.parent)||void 0===n?void 0:n.parent))return RF.range(o.to,o.from)}return e}));return n(nZ(t,r)),!0},preventDefault:!0},{key:"Mod-[",run:QZ},{key:"Mod-]",run:GZ},{key:"Mod-Alt-\\",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=Object.create(null),o=new lY(t,{overrideIndentation:function(e){var t=r[e];return null==t?-1:t}}),i=KZ(t,(function(e,n,i){var a=cY(o,e.from);if(null!=a){/\S/.test(e.text)||(a=0);var s=/^\s*/.exec(e.text)[0],c=sY(t,a);(s!=c||i.from0?n--:r0&&sX(e,t.head-1,1)||t.head1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=null;return e.between(n,1e9,(function(e,n,o){var i=o.spec;if(!t||i.diagnostic==t)return r=new r0(e,n,i.diagnostic),!1})),r}function a0(e,t){var n=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((function(e){return e.is(c0)}))&&!e.changes.touchesRange(n.from,n.to))}function s0(e,t){return e.field(f0,!1)?t:t.concat(dV.appendConfig.of(N0))}var c0=dV.define(),l0=dV.define(),u0=dV.define(),f0=VF.define({create:function(){return new o0(nW.none,null,null)},update:function(e,t){if(t.docChanged){var n=e.diagnostics.map(t.changes),r=null;if(e.selected){var o=t.changes.mapPos(e.selected.from,1);r=i0(n,e.selected.diagnostic,o)||i0(n,null,o)}e=new o0(n,e.panel,r)}var i,a=bo(t.effects);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.is(c0)?e=o0.init(s.value,e.panel,t.state):s.is(l0)?e=new o0(e.diagnostics,s.value?j0.open:null,e.selected):s.is(u0)&&(e=new o0(e.diagnostics,e.panel,s.value))}}catch(e){a.e(e)}finally{a.f()}return e},provide:function(e){return[vG.from(e,(function(e){return e.panel})),JJ.decorations.from(e,(function(e){return e.diagnostics}))]}}),d0=nW.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function h0(e,t,n){var r=e.state.field(f0).diagnostics,o=[],i=2e8,a=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(function(e,r,s){var c=s.spec;t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t=65&&e.keyCode<=90&&n.selectedIndex>=0))return;for(var r=n.items[n.selectedIndex].diagnostic,o=b0(r.actions),i=0;io&&(e.items.splice(o,u-o),i=!0)),r&&c.diagnostic==r.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),a=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),o++}));or.bottom&&(e.list.scrollTop+=(n.bottom-r.bottom)/o)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}},{key:"sync",value:function(){var e=this.list.firstChild;function t(){var t=e;e=t.nextSibling,t.remove()}var n,r=bo(this.items);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.dom.parentNode==this.list){for(;e!=o.dom;)t();e=o.dom.nextSibling}else this.list.insertBefore(o.dom,e)}}catch(e){r.e(e)}finally{r.f()}for(;e;)t()}},{key:"moveSelection",value:function(e){if(!(this.selectedIndex<0)){var t=i0(this.view.state.field(f0).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:u0.of(t)})}}}],[{key:"open",value:function(t){return new e(t)}}]),e}();function S0(e){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(e),"')")}function C0(e){return S0(''),'width="6" height="3"')}var $0=JJ.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:C0("#d11")},".cm-lintRange-warning":{backgroundImage:C0("orange")},".cm-lintRange-info":{backgroundImage:C0("#999")},".cm-lintRange-hint":{backgroundImage:C0("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function _0(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}var O0=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).diagnostics=e,n.severity=e.reduce((function(e,t){return _0(e)<_0(t.severity)?t.severity:e}),"hint"),n}return Eo(t,pG),Do(t,[{key:"toDOM",value:function(e){var t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;var n=this.diagnostics,r=e.state.facet(I0).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=function(){return function(e,t,n){function r(){var r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:P0.of({pos:r.from,above:!1,create:function(){return{dom:v0(e,n),getCoords:function(){return t.getBoundingClientRect()}}}})}),t.onmouseout=t.onmousemove=null,function(e,t){var n=function n(r){var o=t.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientXo.top-10&&r.clientY')},".cm-lint-marker-warning":{content:S0('')},".cm-lint-marker-error":{content:S0('')}}),N0=[f0,JJ.decorations.compute([f0],(function(e){var t=e.field(f0),n=t.selected,r=t.panel;return n&&r&&n.from!=n.to?nW.set([d0.range(n.from,n.to)]):nW.none})),aG(h0,{hideOn:a0}),$0],I0=DF.define({combine:function(e){return CV(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function D0(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[I0.of(e),E0,A0,R0,T0]}var z0=function(){function e(t,n,r,o,i,a,s,c,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,f=arguments.length>10?arguments[10]:void 0;No(this,e),this.p=t,this.stack=n,this.state=r,this.reducePos=o,this.pos=i,this.score=a,this.buffer=s,this.bufferBase=c,this.curContext=l,this.lookAhead=u,this.parent=f}return Do(e,[{key:"toString",value:function(){return"[".concat(this.stack.filter((function(e,t){return t%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(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}},{key:"reduce",value:function(e){var t,n=e>>19,r=65535&e,o=this.p.parser,i=o.dynamicPrecedence(r);if(i&&(this.score+=i),0==n)return this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(r,s)}},{key:"storeNode",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==i.buffer[a-4]&&i.buffer[a-1]>-1){if(t==n)return;if(i.buffer[a-2]>=t)return void(i.buffer[a-2]=n)}}if(o&&this.pos!=n){var s=this.buffer.length;if(s>0&&0!=this.buffer[s-4])for(;s>0&&this.buffer[s-2]>n;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=n,this.buffer[s+3]=r}else this.buffer.push(e,t,n,r)}},{key:"shift",value:function(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){var o=e,i=this.p.parser;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,n),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}},{key:"apply",value:function(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}},{key:"useNode",value:function(e,t){var n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);var r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.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),o=t.bufferBase+n;t&&o==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,o,this.curContext,this.lookAhead,t)}},{key:"recoverByDelete",value:function(e,t){var n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}},{key:"canShift",value:function(e){for(var t=new B0(this);;){var n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}},{key:"recoverByInsert",value:function(e){if(this.stack.length>=300)return[];var t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){for(var n,r=[],o=0;o>19,r=65535&t,o=this.stack.length-3*n;if(o<0||e.getGoto(this.stack[o],r,!1)<0){var i=this.findForcedReduction();if(null==i)return!1;t=i}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}},{key:"findForcedReduction",value:function(){var e=this,t=this.p.parser,n=[];return function r(o,i){if(!n.includes(o))return n.push(o),t.allActions(o,(function(n){if(393216&n);else if(65536&n){var o=(n>>19)-i;if(o>1){var a=65535&n,s=e.stack.length-3*o;if(s>=0&&t.getGoto(e.stack[s],a,!1)>=0)return o<<19|65536|a}}else{var c=r(n,i+1);if(null!=c)return c}}))}(this.state,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(3!=this.stack.length)return!1;var e=this.p.parser;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}},{key:"restart",value:function(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(var t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}},{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&&void 0!==arguments[2]?arguments[2]:0,o=t.parser.context;return new e(t,[],n,r,r,0,[],0,o?new q0(o,o.start):null,0,null)}}]),e}(),q0=Do((function e(t,n){No(this,e),this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0})),B0=function(){function e(t){No(this,e),this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}return Do(e,[{key:"reduce",value:function(e){var t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}]),e}(),L0=function(){function e(t,n,r){No(this,e),this.stack=t,this.pos=n,this.index=r,this.buffer=t.buffer,0==this.index&&this.maybeNext()}return Do(e,[{key:"maybeNext",value:function(){var e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.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,0==this.index&&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&&void 0!==arguments[1]?arguments[1]:t.bufferBase+t.buffer.length;return new e(t,n,n-t.bufferBase)}}]),e}();function F0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof e)return e;for(var n=null,r=0,o=0;r=92&&a--,a>=34&&a--;var c=a-32;if(c>=46&&(c-=46,s=!0),i+=c,s)break;i*=46}n?n[o++]=i:n=new t(i)}return n}var V0=Do((function e(){No(this,e),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0})),H0=new V0,W0=function(){function e(t,n){No(this,e),this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=H0,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}return Do(e,[{key:"resolveOffset",value:function(e,t){for(var n=this.range,r=this.rangeIndex,o=this.pos+e;on.to:o>=n.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-n.to,n=a}return o}},{key:"clipPos",value:function(e){if(e>=this.range.from&&ee)return Math.max(e,r.from)}}catch(e){n.e(e)}finally{n.f()}return this.end}},{key:"peek",value:function(e){var t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&ta.to&&(this.chunk2=this.chunk2.slice(0,a.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}},{key:"acceptToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?n.slice(0,this.range.to-this.pos):n,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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{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(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=H0,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);var n,r="",o=bo(this.ranges);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}}catch(e){o.e(e)}finally{o.f()}return r}}]),e}(),U0=function(){function e(t,n){No(this,e),this.data=t,this.id=n}return Do(e,[{key:"token",value:function(e,t){var n=t.p.parser;!function(e,t,n,r,o,i){var a=0,s=1<0){var f=e[u];if(c.allows(f)&&(-1==t.token.value||t.token.value==f||K0(f,t.token.value,o,i))){t.acceptToken(f);break}}var d=t.next,h=0,v=e[a+2];if(!(t.next<0&&v>h&&65535==e[l+3*v-3])){for(;h>1,m=l+p+(p<<1),g=e[m],y=e[m+1]||65536;if(d=y)){a=e[m+2],t.advance();continue e}h=p+1}}break}a=e[l+3*v-1]}}(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}]),e}();function J0(e,t,n){for(var r,o=t;65535!=(r=e[o]);o++)if(r==n)return o-t;return-1}function K0(e,t,n,r){var o=J0(n,r,t);return o<0||J0(n,r,e)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}}var X0=function(){function e(t,n){No(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 Do(e,[{key:"nextFragment",value:function(){var e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Y0(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Y0(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(e){if(ee)return this.nextStart=i,null;if(o instanceof JG){if(i==e){if(i=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),e}(),Z0=function(){function e(t,n){No(this,e),this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((function(e){return new V0}))}return Do(e,[{key:"getActions",value:function(e){for(var t=0,n=null,r=e.p.parser,o=r.tokenizers,i=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0,c=0;cu.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){var f=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>f))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||((n=new V0).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}},{key:"getMainToken",value:function(e){if(this.mainToken)return this.mainToken;var t=new V0,n=e.pos,r=e.p;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}},{key:"updateCachedToken",value:function(e,t,n){var r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){for(var o=n.p.parser,i=0;i=0&&n.p.parser.dialect.allows(a>>1)){0==(1&a)?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(e,t,n,r){for(var o=0;o4*t.bufferLength?new X0(r,t.nodeSet):null}return Do(e,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){var e,t,n=this.stacks,r=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){for(var i=jo(n,1)[0];i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(var a=0;ar)o.push(s);else{if(this.advanceStack(s,o,n))continue;e||(e=[],t=[]),e.push(s);var c=this.tokens.getMainToken(s);t.push(c.value,c.end)}break}if(!o.length){var l=e&&function(e){var t,n=null,r=bo(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=o.p.stoppedAt;(o.pos==o.p.stream.end||null!=i&&o.pos>i)&&o.p.parser.stateFlag(o.state,2)&&(!n||n.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,o);if(u)return G0&&console.log("Force-finish "+this.stackID(u)),this.stackToTree(u.forceAll())}if(this.recovering){var f=1==this.recovering?1:3*this.recovering;if(o.length>f)for(o.sort((function(e,t){return t.score-e.score}));o.length>f;)o.pop();o.some((function(e){return e.reducePos>r}))&&this.recovering--}else if(o.length>1){e:for(var d=0;d500&&p.buffer.length>500){if(!((h.score-p.score||h.buffer.length-p.buffer.length)>0)){o.splice(d--,1);continue e}o.splice(v--,1)}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(var m=1;m ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments)for(var a=e.curContext&&e.curContext.tracker.strict,s=a?e.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var l=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(e.state,c.type.id):-1;if(l>-1&&c.length&&(!a||(c.prop(qG.contextHash)||0)==s))return e.useNode(c,l),G0&&console.log(i+this.stackID(e)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof JG)||0==c.children.length||c.positions[0]>0)break;var u=c.children[0];if(!(u instanceof JG&&0==c.positions[0]))break;c=u}var f=o.stateSlot(e.state,4);if(f>0)return e.reduce(f),G0&&console.log(i+this.stackID(e)+" (via always-reduce ".concat(o.getName(65535&f),")")),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););for(var d=this.tokens.getActions(e),h=0;hr?t.push(y):n.push(y)}return!1}},{key:"advanceFully",value:function(e,t){for(var n=e.pos;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return t1(e,t),!0}}},{key:"runRecovery",value:function(e,t,n){for(var r=null,o=!1,i=0;i ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),G0&&console.log(l+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}for(var u=a.split(),f=l,d=0;u.forceReduce()&&d<10;d++){if(G0&&console.log(f+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;G0&&(f=this.stackID(u)+" -> ")}var h,v=bo(a.recoverByInsert(s));try{for(v.s();!(h=v.n()).done;){var p=h.value;G0&&console.log(l+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n)}}catch(e){v.e(e)}finally{v.f()}this.stream.end>a.pos?(c==a.pos&&(c++,s=0),a.recoverByDelete(s,c),G0&&console.log(l+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(s),")")),t1(a,n)):(!r||r.score=0)l(p,h,d[v++]);else{for(var m=d[v+-p],g=-p;g>0;g--)l(d[v++],h,m);v++}}}}catch(e){f.e(e)}finally{f.f()}}r.nodeSet=new HG(o.map((function(t,n){return FG.define({name:n>=r.minRepeatTerm?void 0:t,id:n,props:s[n],top:a.indexOf(n)>-1,error:0==n,skipped:e.skippedNodes&&e.skippedNodes.indexOf(n)>-1})}))),e.propSources&&(r.nodeSet=(n=r.nodeSet).extend.apply(n,Bo(e.propSources))),r.strict=!1,r.bufferLength=1024;var y=F0(e.tokenData);r.context=e.context,r.specializerSpecs=e.specialized||[],r.specialized=new Uint16Array(r.specializerSpecs.length);for(var b=0;b2&&void 0!==arguments[2]&&arguments[2],r=this.goto;if(t>=r[0])return-1;for(var o=r[t+1];;){var i=r[o++],a=1&i,s=r[o++];if(a&&n)return s;for(var c=o+(i>>1);o0}},{key:"validAction",value:function(e,t){return!!this.allActions(e,(function(e){return e==t||null}))}},{key:"allActions",value:function(e,t){for(var n=this.stateSlot(e,4),r=n?t(n):void 0,o=this.stateSlot(e,1);null==r;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])break;o=o1(this.data,o+2)}r=t(o1(this.data,o+1))}return r}},{key:"nextStates",value:function(e){for(var t=this,n=[],r=function(e){if(65535==t.data[e]){if(1!=t.data[e+1])return o=e,1;e=o1(t.data,e+2)}if(0==(1&t.data[e+2])){var r=t.data[e+1];n.some((function(e,t){return 1&t&&e==r}))||n.push(t.data[e],r)}o=e},o=this.stateSlot(e,1);!r(o);o+=3);return n}},{key:"configure",value:function(e){var n,r=Object.assign(Object.create(t.prototype),this);if(e.props&&(r.nodeSet=(n=this.nodeSet).extend.apply(n,Bo(e.props))),e.top){var o=this.topRules[e.top];if(!o)throw new RangeError("Invalid top rule name ".concat(e.top));r.top=o}return e.tokenizers&&(r.tokenizers=this.tokenizers.map((function(t){var n=e.tokenizers.find((function(e){return e.from==t}));return n?n.to:t}))),e.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((function(t,n){var o=e.specializers.find((function(e){return e.from==t.external}));if(!o)return t;var i=Object.assign(Object.assign({},t),{external:o.to});return r.specializers[n]=i1(i),i}))),e.contextTracker&&(r.context=e.contextTracker),e.dialect&&(r.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(r.strict=e.strict),e.wrap&&(r.wrappers=r.wrappers.concat(e.wrap)),null!=e.bufferLength&&(r.bufferLength=e.bufferLength),r}},{key:"hasWrappers",value:function(){return this.wrappers.length>0}},{key:"getName",value:function(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(e){var t=this.dynamicPrecedences;return null==t?0:t[e]||0}},{key:"parseDialect",value:function(e){var t=Object.keys(this.dialects),n=t.map((function(){return!1}));if(e){var r,o=bo(e.split(" "));try{for(o.s();!(r=o.n()).done;){var i=r.value,a=t.indexOf(i);a>=0&&(n[a]=!0)}}catch(e){o.e(e)}finally{o.f()}}for(var s=null,c=0;c2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;No(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,o),this.bufferStart=r,this.normalize=i?function(e){return i(l1(e))}:l1,this.query=this.normalize(n)}return Do(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 wF(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var e=this.peek();if(e<0)return this.done=!0,this;var t=xF(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=kF(e);for(var r=this.normalize(t),o=0,i=n;;o++){var a=r.charCodeAt(o),s=this.match(a,i,this.bufferPos+this.bufferStart);if(o==r.length-1){if(s)return this.value=s,this;break}i==n&&o3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length;if(No(this,e),this.text=t,this.to=i,this.curLine="",this.done=!1,this.value=f1,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new m1(t,n,r,o,i);this.re=new RegExp(n,d1+((null==r?void 0:r.ignoreCase)?"i":"")),this.test=null==r?void 0:r.test,this.iter=t.iter();var a=t.lineAt(o);this.curLineStart=a.from,this.matchPos=g1(t,o),this.getLine(this.curLineStart)}return Do(e,[{key:"getLine",value:function(e){this.iter.next(e),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 e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;var t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){var n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=g1(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=r||o.to<=n){var i=new e(n,t.sliceString(n,r));return v1.set(t,i),i}if(o.from==n&&o.to==r)return o;var a=o.text,s=o.from;return s>n&&(a=t.sliceString(n,s)+a,s=n),o.to=this.to?this.to:this.text.lineAt(e).to}},{key:"next",value:function(){for(;;){var e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){var n=this.flat.from+t.index,r=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this.matchPos=g1(this.text,r+(n==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=p1.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),e}();function g1(e,t){if(t>=e.length)return t;for(var n,r=e.lineAt(t);t=56320&&n<57344;)t++;return t}function y1(e){var t=t0("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){var n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(n){var r=e.state,o=r.doc.lineAt(r.selection.main.head),i=jo(n,5),a=i[1],s=i[2],c=i[3],l=i[4],u=c?+c.slice(1):0,f=s?+s:o.number;if(s&&l){var d=f/100;a&&(d=d*("-"==a?-1:1)+o.number/r.doc.lines),f=Math.round(r.doc.lines*d)}else s&&a&&(f=f*("-"==a?-1:1)+o.number);var h=r.doc.line(Math.max(1,Math.min(r.doc.lines,f))),v=RF.cursor(h.from+Math.max(0,Math.min(u,h.length)));e.dispatch({effects:[b1.of(!1),JJ.scrollIntoView(v.from,{y:"center"})],selection:v}),e.focus()}}return{dom:t0("form",{class:"cm-gotoLine",onkeydown:function(t){27==t.keyCode?(t.preventDefault(),e.dispatch({effects:b1.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:function(e){e.preventDefault(),n()}},t0("label",e.state.phrase("Go to line"),": ",t)," ",t0("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(h1.prototype[Symbol.iterator]=m1.prototype[Symbol.iterator]=function(){return this});var b1=dV.define(),w1=VF.define({create:function(){return!0},update:function(e,t){var n,r=bo(t.effects);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.is(b1)&&(e=o.value)}}catch(e){r.e(e)}finally{r.f()}return e},provide:function(e){return vG.from(e,(function(e){return e?y1:null}))}}),x1=JJ.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),k1={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},j1=DF.define({combine:function(e){return CV(e,k1,{highlightWordAroundCursor:function(e,t){return e||t},minSelectionLength:Math.min,maxMatches:Math.min})}});var S1=nW.mark({class:"cm-selectionMatch"}),C1=nW.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function $1(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==xV.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==xV.Word)}var _1=QW.fromClass(function(){function e(t){No(this,e),this.decorations=this.getDeco(t)}return Do(e,[{key:"update",value:function(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}},{key:"getDeco",value:function(e){var t=e.state.facet(j1),n=e.state,r=n.selection;if(r.ranges.length>1)return nW.none;var o,i=r.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return nW.none;var s=n.wordAt(i.head);if(!s)return nW.none;a=n.charCategorizer(i.head),o=n.sliceDoc(s.from,s.to)}else{var c=i.to-i.from;if(c200)return nW.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),!$1(a=n.charCategorizer(i.head),n,i.from,i.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==xV.Word&&e(t.sliceDoc(r-1,r))==xV.Word}(a,n,i.from,i.to))return nW.none}else if(!(o=n.sliceDoc(i.from,i.to)))return nW.none}var l,u=[],f=bo(e.visibleRanges);try{for(f.s();!(l=f.n()).done;)for(var d=l.value,h=new u1(n.doc,o,d.from,d.to);!h.next().done;){var v=h.value,p=v.from,m=v.to;if((!a||$1(a,n,p,m))&&(i.empty&&p<=i.from&&m>=i.to?u.push(C1.range(p,m)):(p>=i.to||m<=i.from)&&u.push(S1.range(p,m)),u.length>t.maxMatches))return nW.none}}catch(e){f.e(e)}finally{f.f()}return nW.set(u)}}]),e}(),{decorations:function(e){return e.decorations}}),O1=JJ.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});var M1=DF.define({combine:function(e){return CV(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:function(e){return new i2(e)},scrollToMatch:function(e){return JJ.scrollIntoView(e)}})}});function A1(e){return e?[M1.of(e),f2]:f2}var E1=function(){function e(t){No(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(e){try{return new RegExp(e,d1),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}return Do(e,[{key:"unquote",value:function(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"}))}},{key:"eq",value:function(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}},{key:"create",value:function(){return this.regexp?new z1(this):new R1(this)}},{key:"getCursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=e.doc?e:SV.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?N1(this,r,t,n):T1(this,r,t,n)}}]),e}(),P1=Do((function e(t){No(this,e),this.spec=t}));function T1(e,t,n,r){return new u1(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:function(e){return e.toLowerCase()},e.wholeWord?function(e,t){return function(n,r,o,i){return(i>n||i+o.length=t)return null;r.push(n.value)}return r}},{key:"highlight",value:function(e,t,n,r){for(var o=T1(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));!o.next().done;)r(o.value.from,o.value.to)}}]),t}();function N1(e,t,n,r){return new h1(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),function(e,t,n){return!n[0].length||(o(I1(n.input,n.index))!=xV.Word||o(D1(n.input,n.index))!=xV.Word)&&(o(D1(n.input,n.index+n[0].length))!=xV.Word||o(I1(n.input,n.index+n[0].length))!=xV.Word)}):void 0},n,r);var o}function I1(e,t){return e.slice(pF(e,t,!1),t)}function D1(e,t){return e.slice(t,pF(e,t))}var z1=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,P1),Do(t,[{key:"nextMatch",value:function(e,t,n){var r=N1(this.spec,e,n,e.doc.length).next();return r.done&&(r=N1(this.spec,e,0,t).next()),r.done?null:r.value}},{key:"prevMatchInRange",value:function(e,t,n){for(var r=1;;r++){for(var o=Math.max(t,n-1e4*r),i=N1(this.spec,e,o,n),a=null;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}},{key:"prevMatch",value:function(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}},{key:"getReplacement",value:function(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(function(t,n){return"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n=t)return null;r.push(n.value)}return r}},{key:"highlight",value:function(e,t,n,r){for(var o=N1(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));!o.next().done;)r(o.value.from,o.value.to)}}]),t}(),q1=dV.define(),B1=dV.define(),L1=VF.define({create:function(e){return new F1(Z1(e).create(),null)},update:function(e,t){var n,r=bo(t.effects);try{for(r.s();!(n=r.n()).done;){var o=n.value;o.is(q1)?e=new F1(o.value.create(),e.panel):o.is(B1)&&(e=new F1(e.query,o.value?X1:null))}}catch(e){r.e(e)}finally{r.f()}return e},provide:function(e){return vG.from(e,(function(e){return e.panel}))}}),F1=Do((function e(t,n){No(this,e),this.query=t,this.panel=n})),V1=nW.mark({class:"cm-searchMatch"}),H1=nW.mark({class:"cm-searchMatch cm-searchMatch-selected"}),W1=QW.fromClass(function(){function e(t){No(this,e),this.view=t,this.decorations=this.highlight(t.state.field(L1))}return Do(e,[{key:"update",value:function(e){var t=e.state.field(L1);(t!=e.startState.field(L1)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}},{key:"highlight",value:function(e){var t=e.query;if(!e.panel||!t.spec.valid)return nW.none;for(var n=this.view,r=new EV,o=0,i=n.visibleRanges,a=i.length;oi[o+1].from-500;)l=i[++o].to;t.highlight(n.state,c,l,(function(e,t){var o=n.state.selection.ranges.some((function(n){return n.from==e&&n.to==t}));r.add(e,t,o?H1:V1)}))}return r.finish()}}]),e}(),{decorations:function(e){return e.decorations}});function U1(e){return function(t){var n=t.state.field(L1,!1);return n&&n.query.spec.valid?e(t,n):n2(t)}}var J1=U1((function(e,t){var n=t.query,r=e.state.selection.main.to,o=n.nextMatch(e.state,r,r);if(!o)return!1;var i=RF.single(o.from,o.to),a=e.state.facet(M1);return e.dispatch({selection:i,effects:[l2(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),t2(e),!0})),K1=U1((function(e,t){var n=t.query,r=e.state,o=r.selection.main.from,i=n.prevMatch(r,o,o);if(!i)return!1;var a=RF.single(i.from,i.to),s=e.state.facet(M1);return e.dispatch({selection:a,effects:[l2(e,i),s.scrollToMatch(a.main,e)],userEvent:"select.search"}),t2(e),!0})),G1=U1((function(e,t){var n=t.query.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:RF.create(n.map((function(e){return RF.range(e.from,e.to)}))),userEvent:"select.search.matches"}),!0)})),Q1=U1((function(e,t){var n=t.query,r=e.state,o=r.selection.main,i=o.from,a=o.to;if(r.readOnly)return!1;var s=n.nextMatch(r,i,i);if(!s)return!1;var c,l,u=[],f=[];if(s.from==i&&s.to==a&&(l=r.toText(n.getReplacement(s)),u.push({from:s.from,to:s.to,insert:l}),s=n.nextMatch(r,s.from,s.to),f.push(JJ.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(i).number)+"."))),s){var d=0==u.length||u[0].from>=s.to?0:s.to-s.from-l.length;c=RF.single(s.from-d,s.to-d),f.push(l2(e,s)),f.push(r.facet(M1).scrollToMatch(c.main,e))}return e.dispatch({changes:u,selection:c,effects:f,userEvent:"input.replace"}),!0})),Y1=U1((function(e,t){var n=t.query;if(e.state.readOnly)return!1;var r=n.matchAll(e.state,1e9).map((function(e){return{from:e.from,to:e.to,insert:n.getReplacement(e)}}));if(!r.length)return!1;var o=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:JJ.announce.of(o),userEvent:"input.replace.all"}),!0}));function X1(e){return e.state.facet(M1).createPanel(e)}function Z1(e,t){var n,r,o,i,a,s=e.selection.main,c=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!c)return t;var l=e.facet(M1);return new E1({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:l.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:l.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:l.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:l.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:l.wholeWord})}function e2(e){var t=uG(e,X1);return t&&t.dom.querySelector("[main-field]")}function t2(e){var t=e2(e);t&&t==e.root.activeElement&&t.select()}var n2=function(e){var t=e.state.field(L1,!1);if(t&&t.panel){var n=e2(e);if(n&&n!=e.root.activeElement){var r=Z1(e.state,t.query.spec);r.valid&&e.dispatch({effects:q1.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[B1.of(!0),t?q1.of(Z1(e.state,t.query.spec)):dV.appendConfig.of(f2)]});return!0},r2=function(e){var t=e.state.field(L1,!1);if(!t||!t.panel)return!1;var n=uG(e,X1);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:B1.of(!1)}),!0},o2=[{key:"Mod-f",run:n2,scope:"editor search-panel"},{key:"F3",run:J1,shift:K1,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:J1,shift:K1,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:r2,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 o=r.main,i=o.from,a=o.to,s=[],c=0,l=new u1(t.doc,t.sliceDoc(i,a));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(c=s.length),s.push(RF.range(l.value.from,l.value.to))}return n(t.update({selection:RF.create(s,c),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:function(e){var t=uG(e,y1);if(!t){var n=[b1.of(!0)];null==e.state.field(w1,!1)&&n.push(dV.appendConfig.of([w1,x1])),e.dispatch({effects:n}),t=uG(e,y1)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:function(e){var t=e.state,n=e.dispatch,r=t.selection.ranges;if(r.some((function(e){return e.from===e.to})))return function(e){var t=e.state,n=e.dispatch,r=t.selection,o=RF.create(r.ranges.map((function(e){return t.wordAt(e.head)||RF.cursor(e.head)})),r.mainIndex);return!o.eq(r)&&(n(t.update({selection:o})),!0)}({state:t,dispatch:n});var o=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some((function(e){return t.sliceDoc(e.from,e.to)!=o})))return!1;var i=function(e,t){for(var n,r=e.selection,o=r.main,i=r.ranges,a=e.wordAt(o.head),s=a&&a.from==o.from&&a.to==o.to,c=function(n,r){if(r.next(),!r.done){if(n&&i.some((function(e){return e.from==r.value.from})))return l=n,u=r,0;if(s){var o=e.wordAt(r.value.from);if(!o||o.from!=r.value.from||o.to!=r.value.to)return l=n,u=r,0}return{v:r.value}}if(n)return{v:null};r=new u1(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),l=n=!0,u=r},l=!1,u=new u1(e.doc,t,i[i.length-1].to);;)if(0!==(n=c(l,u))&&n)return n.v}(t,o);return!!i&&(n(t.update({selection:t.selection.addRange(RF.range(i.from,i.to),!1),effects:JJ.scrollIntoView(i.to)})),!0)},preventDefault:!0}],i2=function(){function e(t){var n=this;No(this,e),this.view=t;var r=this.query=t.state.field(L1).query.spec;function o(e,t,n){return t0("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=t0("input",{value:r.search,placeholder:a2(t,"Find"),"aria-label":a2(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=t0("input",{value:r.replace,placeholder:a2(t,"Replace"),"aria-label":a2(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=t0("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=t0("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=t0("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit}),this.dom=t0("div",{onkeydown:function(e){return n.keydown(e)},class:"cm-search"},[this.searchField,o("next",(function(){return J1(t)}),[a2(t,"next")]),o("prev",(function(){return K1(t)}),[a2(t,"previous")]),o("select",(function(){return G1(t)}),[a2(t,"all")]),t0("label",null,[this.caseField,a2(t,"match case")]),t0("label",null,[this.reField,a2(t,"regexp")]),t0("label",null,[this.wordField,a2(t,"by word")])].concat(Bo(t.state.readOnly?[]:[t0("br"),this.replaceField,o("replace",(function(){return Q1(t)}),[a2(t,"replace")]),o("replaceAll",(function(){return Y1(t)}),[a2(t,"replace all")])]),[t0("button",{name:"close",onclick:function(){return r2(t)},"aria-label":a2(t,"close"),type:"button"},["×"])]))}return Do(e,[{key:"commit",value:function(){var e=new E1({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:q1.of(e)}))}},{key:"keydown",value:function(e){!function(e,t,n){return aK(rK(e.state),t,e,n)}(this.view,e,"search-panel")?13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?K1:J1)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),Q1(this.view)):e.preventDefault()}},{key:"update",value:function(e){var t,n=bo(e.transactions);try{for(n.s();!(t=n.n()).done;){var r,o=bo(t.value.effects);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.is(q1)&&!i.value.eq(this.query)&&this.setQuery(i.value)}}catch(e){o.e(e)}finally{o.f()}}}catch(e){n.e(e)}finally{n.f()}}},{key:"setQuery",value:function(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(M1).top}}]),e}();function a2(e,t){return e.state.phrase(t)}var s2=30,c2=/[\s\.,:;?!]/;function l2(e,t){var n=t.from,r=t.to,o=e.state.doc.lineAt(n),i=e.state.doc.lineAt(r).to,a=Math.max(o.from,n-s2),s=Math.min(i,r+s2),c=e.state.sliceDoc(a,s);if(a!=o.from)for(var l=0;lc.length-s2;u--)if(!c2.test(c[u-1])&&c2.test(c[u])){c=c.slice(0,u);break}return JJ.announce.of("".concat(e.state.phrase("current match"),". ").concat(c," ").concat(e.state.phrase("on line")," ").concat(o.number,"."))}var u2=JJ.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"}}),f2=[L1,GF.low(W1),u2],d2=function(){function e(t,n,r){No(this,e),this.state=t,this.pos=n,this.explicit=r,this.abortListeners=[]}return Do(e,[{key:"tokenBefore",value:function(e){for(var t=JQ(this.state).resolveInner(this.pos,-1);t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}},{key:"matchBefore",value:function(e){var t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),o=r.search(g2(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}]),e}();function h2(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 v2(e){var t=e.map((function(e){return"string"==typeof e?{label:e}:e})),n=t.every((function(e){return/^\w+$/.test(e.label)}))?[/\w*$/,/\w+$/]:function(e){var t,n=Object.create(null),r=Object.create(null),o=bo(e);try{for(o.s();!(t=o.n()).done;){var i=t.value.label;n[i[0]]=!0;for(var a=1;a=48&&$<=57||$>=97&&$<=122?2:$>=65&&$<=90?1:0:(_=xF($))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!j||1==O&&x||0==C&&0!=O)&&(t[m]==$||n[m]==$&&(g=!0)?i[m++]=j:i.length&&(k=!1)),C=O,j+=kF($)}return m==u&&0==i[0]&&k?this.result((g?-200:0)-100,i,e):y==u&&0==b?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):y==u?this.ret(-900-e.length,[b,w]):m==u?this.result((g?-200:0)-100-700+(k?0:-1100),i,e):2!=t.length&&this.result((r[0]?-700:0)-200-1100,r,e)}},{key:"result",value:function(e,t,n){var r,o=[],i=0,a=bo(t);try{for(a.s();!(r=a.n()).done;){var s=r.value,c=s+(this.astral?kF(wF(n,s)):1);i&&o[i-1]==s?o[i-1]=c:(o[i++]=s,o[i++]=c)}}catch(e){a.e(e)}finally{a.f()}return this.ret(e-n.length,o)}}]),e}(),S2=DF.define({combine:function(e){return CV(e,{activateOnTyping:!0,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:function(){return""},optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:$2,compareCompletions:function(e,t){return e.label.localeCompare(t.label)},interactionDelay:75,updateSyncTime:100},{defaultKeymap:function(e,t){return e&&t},closeOnBlur:function(e,t){return e&&t},icons:function(e,t){return e&&t},tooltipClass:function(e,t){return function(n){return C2(e(n),t(n))}},optionClass:function(e,t){return function(n){return C2(e(n),t(n))}},addToOptions:function(e,t){return e.concat(t)}})}});function C2(e,t){return e?t?e+" "+t:e:t}function $2(e,t,n,r,o,i){var a,s,c=e.textDirection==fW.RTL,l=c,u=!1,f="top",d=t.left-o.left,h=o.right-t.right,v=r.right-r.left,p=r.bottom-r.top;if(l&&d=p||m>t.top?a=n.bottom-t.top:(f="bottom",a=t.bottom-n.top)}var g=(t.bottom-t.top)/i.offsetHeight,y=(t.right-t.left)/i.offsetWidth;return{style:"".concat(f,": ").concat(a/g,"px; max-width: ").concat(s/y,"px"),class:"cm-completionInfo-"+(u?c?"left-narrow":"right-narrow":l?"left":"right")}}function _2(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 o=Math.floor((e-t)/n);return{from:e-(o+1)*n,to:e-o*n}}var O2=function(){function e(t,n,r){var o=this;No(this,e),this.view=t,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:function(){return o.measureInfo()},write:function(e){return o.placeInfo(e)},key:this},this.space=null,this.currentClass="";var i=t.state.field(n),a=i.open,s=a.options,c=a.selected,l=t.state.facet(S2);this.optionContent=function(e){var t=e.addToOptions.slice();return e.icons&&t.push({render:function(e){var t,n=document.createElement("div");return n.classList.add("cm-completionIcon"),e.type&&(t=n.classList).add.apply(t,Bo(e.type.split(/\s+/g).map((function(e){return"cm-completionIcon-"+e})))),n.setAttribute("aria-hidden","true"),n},position:20}),t.push({render:function(e,t,n,r){var o=document.createElement("span");o.className="cm-completionLabel";for(var i=e.displayLabel||e.label,a=0,s=0;sa&&o.appendChild(document.createTextNode(i.slice(a,c)));var u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(i.slice(c,l))),u.className="cm-completionMatchedText",a=l}return a-1&&n.selected=this.range.to)&&(this.range=_2(n.options.length,n.selected,this.view.state.facet(S2).maxRenderedOptions),this.showOptions(n.options,t.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();var r=n.options[n.selected].completion,o=r.info;if(!o)return;var i="string"==typeof o?document.createTextNode(o):o(r);if(!i)return;"then"in i?i.then((function(n){n&&e.view.state.field(e.stateField,!1)==t&&e.addInfoPane(n,r)})).catch((function(t){return UW(e.view.state,t,"completion info")})):this.addInfoPane(i,r)}}},{key:"addInfoPane",value:function(e,t){this.destroyInfo();var n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{var r=e.dom,o=e.destroy;n.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}},{key:"updateSelectedOption",value:function(e){for(var t=null,n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/o)}(this.list,t),t}},{key:"measureInfo",value:function(){var e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;var t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){var i=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:i.innerWidth,bottom:i.innerHeight}}return r.top>Math.min(o.bottom,t.bottom)-10||r.bottomn.from||0==n.from))if(o=u,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else r.appendChild(document.createElement("completion-section")).textContent=u}var f=r.appendChild(document.createElement("li"));f.id=t+"-"+i,f.setAttribute("role","option");var d=this.optionClass(s);d&&(f.className=d);var h,v=bo(this.optionContent);try{for(v.s();!(h=v.n()).done;){var p=(0,h.value)(s,this.view.state,this.view,c);p&&f.appendChild(p)}}catch(e){v.e(e)}finally{v.f()}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to=this.options.length?this:new e(this.options,R2(n,t),this.tooltip,this.timestamp,t,this.disabled)}},{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,this.disabled)}}],[{key:"build",value:function(t,n,r,o,i){var a=function(e,t){var n,r=[],o=null,i=function(e){r.push(e);var t=e.completion.section;if(t){o||(o=[]);var n="string"==typeof t?t:t.name;o.some((function(e){return e.name==n}))||o.push("string"==typeof t?{name:n}:t)}},a=bo(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.hasResult()){var c=s.result.getMatch;if(!1===s.result.filter){var l,u=bo(s.result.options);try{for(u.s();!(l=u.n()).done;){var f=l.value;i(new p2(f,s.source,c?c(f):[],1e9-r.length))}}catch(e){u.e(e)}finally{u.f()}}else{var d,h=new j2(t.sliceDoc(s.from,s.to)),v=bo(s.result.options);try{for(v.s();!(d=v.n()).done;){var p=d.value;if(h.match(p.label)){var m=p.displayLabel?c?c(p,h.matched):[]:h.matched;i(new p2(p,s.source,m,h.score+(p.boost||0)))}}}catch(e){v.e(e)}finally{v.f()}}}}}catch(e){a.e(e)}finally{a.f()}if(o){var g,y=Object.create(null),b=0,w=bo(o.sort((function(e,t){var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.nameA2(O)&&(_[_.length-1]=E),O=E.completion}}catch(e){A.e(e)}finally{A.f()}return _}(t,n);if(!a.length)return o&&t.some((function(e){return 1==e.state}))?new e(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;var s=n.facet(S2).selectOnOpen?0:-1;if(o&&o.selected!=s&&-1!=o.selected)for(var c=o.options[o.selected].completion,l=0;l-1&&(n["aria-activedescendant"]=e+"-"+t),n}var N2=[];function I2(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}var D2=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;No(this,e),this.source=t,this.state=n,this.explicitPos=r}return Do(e,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(t,n){var r=I2(t),o=this;r?o=o.handleUserEvent(t,r,n):t.docChanged?o=o.handleChange(t):t.selection&&0!=o.state&&(o=new e(o.source,0));var i,a=bo(t.effects);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.is(x2))o=new e(o.source,1,s.value?m2(t.state):-1);else if(s.is(k2))o=new e(o.source,0);else if(s.is(q2)){var c,l=bo(s.value);try{for(l.s();!(c=l.n()).done;){var u=c.value;u.source==o.source&&(o=u)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"handleUserEvent",value:function(t,n,r){return"delete"!=n&&r.activateOnTyping?new e(this.source,1):this.map(t.changes)}},{key:"handleChange",value:function(t){return t.changes.touchesRange(m2(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}(),z2=function(e){function t(e,n,r,o,i){var a;return No(this,t),(a=_o(this,t,[e,2,n])).result=r,a.from=o,a.to=i,a}return Eo(t,D2),Do(t,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(e,n,r){var o,i=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=m2(e.state);if((this.explicitPos<0?s<=i:sa||"delete"==n&&m2(e.startState)==this.from)return new D2(this.source,"input"==n&&r.activateOnTyping?1:0);var c,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;var o=t.sliceDoc(n,r);return"function"==typeof e?e(o,n,r,t):g2(e,!0).test(o)}(this.result.validFor,e.state,i,a)?new t(this.source,l,this.result,i,a):this.result.update&&(c=this.result.update(this.result,i,a,new d2(e.state,s,l>=0)))?new t(this.source,l,c,c.from,null!==(o=c.to)&&void 0!==o?o:m2(e.state)):new D2(this.source,1,l)}},{key:"handleChange",value:function(e){return e.changes.touchesRange(this.from,this.to)?new D2(this.source,0):this.map(e.changes)}},{key:"map",value:function(e){return e.empty?this:new t(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}]),t}();var q2=dV.define({map:function(e,t){return e.map((function(e){return e.map(t)}))}}),B2=dV.define(),L2=VF.define({create:function(){return P2.start()},update:function(e,t){return e.update(t)},provide:function(e){return[eG.from(e,(function(e){return e.tooltip})),JJ.contentAttributes.from(e,(function(e){return e.attrs}))]}});function F2(e,t){var n=t.completion.apply||t.completion.label,r=e.state.field(L2).active.find((function(e){return e.source==t.source}));return r instanceof z2&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){var o=e.selection.main,i=n-o.from,a=r-o.from;return Object.assign(Object.assign({},e.changeByRange((function(s){return s!=o&&n!=r&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(n,r)?{range:s}:{changes:{from:s.from+i,to:r==o.from?s.to:s.from+a,insert:t},range:RF.cursor(s.from+i+t.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:y2.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}var V2=M2(L2,F2);function H2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(n){var r=n.state.field(L2,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:B2.of(s)}),!0}}var W2=Do((function e(t,n){No(this,e),this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0})),U2=QW.fromClass(function(){function e(t){No(this,e),this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;var n,r=bo(t.state.field(L2).active);try{for(r.s();!(n=r.n()).done;){var o=n.value;1==o.state&&this.startQuery(o)}}catch(e){r.e(e)}finally{r.f()}}return Do(e,[{key:"update",value:function(e){var t=this,n=e.state.field(L2);if(e.selectionSet||e.docChanged||e.startState.field(L2)!=n){for(var r=e.transactions.some((function(e){return(e.selection||e.docChanged)&&!I2(e)})),o=0;o50&&Date.now()-i.time>1e3){var a,s=bo(i.context.abortListeners);try{for(s.s();!(a=s.n()).done;){var c=a.value;try{c()}catch(e){UW(this.view.state,e)}}}catch(e){s.e(e)}finally{s.f()}i.context.abortListeners=null,this.running.splice(o--,1)}else{var l;(l=i.updates).push.apply(l,Bo(e.transactions))}}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some((function(e){return e.effects.some((function(e){return e.is(x2)}))}))&&(this.pendingStart=!0);var u=this.pendingStart?50:e.state.facet(S2).activateOnTypingDelay;if(this.debounceUpdate=n.active.some((function(e){return 1==e.state&&!t.running.some((function(t){return t.active.source==e.source}))}))?setTimeout((function(){return t.startUpdate()}),u):-1,0!=this.composing){var f,d=bo(e.transactions);try{for(d.s();!(f=d.n()).done;){var h=f.value;"input"==I2(h)?this.composing=2:2==this.composing&&h.selection&&(this.composing=3)}}catch(e){d.e(e)}finally{d.f()}}}}},{key:"startUpdate",value:function(){var e=this;this.debounceUpdate=-1,this.pendingStart=!1;var t,n=bo(this.view.state.field(L2).active);try{var r=function(){var n=t.value;1!=n.state||e.running.some((function(e){return e.active.source==n.source}))||e.startQuery(n)};for(n.s();!(t=n.n()).done;)r()}catch(e){n.e(e)}finally{n.f()}}},{key:"startQuery",value:function(e){var t=this,n=this.view.state,r=m2(n),o=new d2(n,r,e.explicitPos==r),i=new W2(e,o);this.running.push(i),Promise.resolve(e.source(o)).then((function(e){i.context.aborted||(i.done=e||null,t.scheduleAccept())}),(function(e){t.view.dispatch({effects:k2.of(null)}),UW(t.view.state,e)}))}},{key:"scheduleAccept",value:function(){var e=this;this.running.every((function(e){return void 0!==e.done}))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((function(){return e.accept()}),this.view.state.facet(S2).updateSyncTime))}},{key:"accept",value:function(){var e,t=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var n=[],r=this.view.state.facet(S2),o=function(o){var a=t.running[o];if(void 0===a.done)return i=o,0;if(t.running.splice(o--,1),a.done){var s,c=new z2(a.active.source,a.active.explicitPos,a.done,a.done.from,null!==(e=a.done.to)&&void 0!==e?e:m2(a.updates.length?a.updates[0].startState:t.view.state)),l=bo(a.updates);try{for(l.s();!(s=l.n()).done;){var u=s.value;c=c.update(u,r)}}catch(e){l.e(e)}finally{l.f()}if(c.hasResult())return n.push(c),i=o,0}var f=t.view.state.field(L2).active.find((function(e){return e.source==a.active.source}));if(f&&1==f.state)if(null==a.done){var d,h=new D2(a.active.source,0),v=bo(a.updates);try{for(v.s();!(d=v.n()).done;){var p=d.value;h=h.update(p,r)}}catch(e){v.e(e)}finally{v.f()}1!=h.state&&n.push(h)}else t.startQuery(f);i=o},i=0;i1||e.ctrlKey&&(!J2||!e.altKey)||e.metaKey)return!1;var r=n.open.options[n.open.selected],o=n.active.find((function(e){return e.source==r.source})),i=r.completion.commitCharacters||o.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&F2(t,r),!1}})),G2=JJ.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"".concat(400,"px"),boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"".concat(30,"px")},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"".concat(30,"px")},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Q2={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Y2=dV.define({map:function(e,t){var n=t.mapPos(e,-1,SF.TrackAfter);return null==n?void 0:n}}),X2=new(function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,$V),Do(t)}());X2.startSide=1,X2.endSide=-1;var Z2=VF.define({create:function(){return AV.empty},update:function(e,t){if(e=e.map(t.changes),t.selection){var n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:function(e){return e>=n.from&&e<=n.to}})}var r,o=bo(t.effects);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.is(Y2)&&(e=e.update({add:[X2.range(i.value,i.value+1)]}))}}catch(e){o.e(e)}finally{o.f()}return e}});var e3="()[]{}<>";function t3(e){for(var t=0;t2||2==r.length&&1==kF(wF(r,0))||t!=o.from||n!=o.to)return!1;var i=function(e,t){var n,r=n3(e,e.selection.main.head),o=r.brackets||Q2.brackets,i=bo(o);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=t3(wF(a,0));if(t==a)return s==a?u3(e,a,o.indexOf(a+a+a)>-1,r):c3(e,a,s,r.before||Q2.before);if(t==s&&a3(e,e.selection.main.from))return l3(e,a,s)}}catch(e){i.e(e)}finally{i.f()}return null}(e.state,r);return!!i&&(e.dispatch(i),!0)})),i3=[{key:"Backspace",run:function(e){var t=e.state,n=e.dispatch;if(t.readOnly)return!1;var r=n3(t,t.selection.main.head).brackets||Q2.brackets,o=null,i=t.changeByRange((function(e){if(e.empty){var n,i=function(e,t){var n=e.sliceString(t-2,t);return kF(wF(n,0))==n.length?n:n.slice(1)}(t.doc,e.head),a=bo(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s==i&&s3(t.doc,e.head)==t3(wF(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:RF.cursor(e.head-s.length)}}}catch(e){a.e(e)}finally{a.f()}}return{range:o=e}}));return o||n(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!o}}];function a3(e,t){var n=!1;return e.field(Z2).between(0,e.doc.length,(function(e){e==t&&(n=!0)})),n}function s3(e,t){var n=e.sliceString(t,t+2);return n.slice(0,kF(wF(n,0)))}function c3(e,t,n,r){var o=null,i=e.changeByRange((function(i){if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:n,from:i.to}],effects:Y2.of(i.to+t.length),range:RF.range(i.anchor+t.length,i.head+t.length)};var a=s3(e.doc,i.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:i.head},effects:Y2.of(i.head+t.length),range:RF.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function l3(e,t,n){var r=null,o=e.changeByRange((function(t){return t.empty&&s3(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:RF.cursor(t.head+n.length)}:r={range:t}}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function u3(e,t,n,r){var o=r.stringPrefixes||Q2.stringPrefixes,i=null,a=e.changeByRange((function(r){if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Y2.of(r.to+t.length),range:RF.range(r.anchor+t.length,r.head+t.length)};var a,s=r.head,c=s3(e.doc,s);if(c==t){if(f3(e,s))return{changes:{insert:t+t,from:s},effects:Y2.of(s+t.length),range:RF.cursor(s+t.length)};if(a3(e,s)){var l=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+l.length,insert:l},range:RF.cursor(s+l.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=d3(e,s-2*t.length,o))>-1&&f3(e,a))return{changes:{insert:t+t+t+t,from:s},effects:Y2.of(s+t.length),range:RF.cursor(s+t.length)};if(e.charCategorizer(s)(c)!=xV.Word&&d3(e,s,o)>-1&&!function(e,t,n,r){for(var o=JQ(e).resolveInner(t,-1),i=r.reduce((function(e,t){return Math.max(e,t.length)}),0),a=0;a<5;a++){var s=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),c=s.indexOf(n);if(!c||c>-1&&r.indexOf(s.slice(0,c))>-1){for(var l=o.firstChild;l&&l.from==o.from&&l.to-l.from>n.length+c;){if(e.sliceDoc(l.to-n.length,l.to)==n)return!1;l=l.firstChild}return!0}var u=o.to==t&&o.parent;if(!u)break;o=u}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:Y2.of(s+t.length),range:RF.cursor(s+t.length)}}return{range:i=r}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function f3(e,t){var n=JQ(e).resolveInner(t+1);return n.parent&&n.from==t}function d3(e,t,n){var r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=xV.Word)return t;var o,i=bo(n);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=t-a.length;if(e.sliceDoc(s,t)==a&&r(e.sliceDoc(s-1,s))!=xV.Word)return s}}catch(e){i.e(e)}finally{i.f()}return-1}function h3(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[K2,L2,S2.of(e),U2,p3,G2]}var v3=[{key:"Ctrl-Space",run:function(e){return!!e.state.field(L2,!1)&&(e.dispatch({effects:x2.of(!0)}),!0)}},{key:"Escape",run:function(e){var t=e.state.field(L2,!1);return!(!t||!t.active.some((function(e){return 0!=e.state})))&&(e.dispatch({effects:k2.of(null)}),!0)}},{key:"ArrowDown",run:H2(!0)},{key:"ArrowUp",run:H2(!1)},{key:"PageDown",run:H2(!0,"page")},{key:"PageUp",run:H2(!1,"page")},{key:"Enter",run:function(e){var t=e.state.field(L2,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp0&&b3(e);return{c:function(){t=ji("div"),o&&o.c(),n=$i(),i&&i.c(),r=$i(),a&&a.c(),Ei(t,"class","jse-status-bar svelte-hhcn0f")},m:function(e,s){wi(e,t,s),o&&o.m(t,null),pi(t,n),i&&i.m(t,null),pi(t,r),a&&a.m(t,null)},p:function(e,s){var c=jo(s,1)[0];void 0!==e[0]?o?o.p(e,c):((o=g3(e)).c(),o.m(t,n)):o&&(o.d(1),o=null),void 0!==e[1]?i?i.p(e,c):((i=y3(e)).c(),i.m(t,r)):i&&(i.d(1),i=null),void 0!==e[2]&&e[2]>0?a?a.p(e,c):((a=b3(e)).c(),a.m(t,null)):a&&(a.d(1),a=null)},i:Wo,o:Wo,d:function(e){e&&xi(t),o&&o.d(),i&&i.d(),a&&a.d()}}}function x3(e,t,n){var r,o,i,a,s,c=t.editorState;return e.$$set=function(e){"editorState"in e&&n(3,c=e.editorState)},e.$$.update=function(){var t,l,u;8&e.$$.dirty&&n(4,r=null===(t=c)||void 0===t||null===(t=t.selection)||void 0===t||null===(t=t.main)||void 0===t?void 0:t.head);24&e.$$.dirty&&n(5,o=void 0!==r?null===(l=c)||void 0===l||null===(l=l.doc)||void 0===l?void 0:l.lineAt(r):void 0);(32&e.$$.dirty&&n(0,i=void 0!==o?o.number:void 0),48&e.$$.dirty&&n(1,a=void 0!==o&&void 0!==r?r-o.from+1:void 0),8&e.$$.dirty)&&n(2,s=null===(u=c)||void 0===u||null===(u=u.selection)||void 0===u||null===(u=u.ranges)||void 0===u?void 0:u.reduce((function(e,t){return e+t.to-t.from}),0))},[i,a,s,c,r,o]}var k3=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,x3,w3,Xo,{editorState:3},m3),n}return Eo(t,Ia),Do(t)}(),j3=BY.define([{tag:LQ.propertyName,color:"var(--internal-key-color)"},{tag:LQ.number,color:"var(--internal-value-color-number)"},{tag:LQ.bool,color:"var(--internal-value-color-boolean)"},{tag:LQ.string,color:"var(--internal-value-color-string)"},{tag:LQ.keyword,color:"var(--internal-value-color-null)"}]),S3=HY(j3),C3=j3.style;function $3(e){var t=e.selection.main.head;return e.doc.lineAt(t)}function _3(e,t){var n=0;e:for(var r=0;r=r.level&&"codeOnly"!==this.markerType?this.set(e,0,n.level):n.empty&&0===n.level&&0!==r.level?this.set(e,0,0):r.level>n.level?this.set(e,0,n.level+1):this.set(e,0,r.level)}var o=_3(e.text,this.state.tabSize),i=Math.floor(o/this.unitWidth);return this.set(e,o,i)}},{key:"closestNonEmpty",value:function(e,t){for(var n=e.number+t;-1===t?n>=1:n<=this.state.doc.lines;){if(this.has(n)){var r=this.get(n);if(!r.empty)return r}var o=this.state.doc.line(n);if(o.text.trim().length){var i=_3(o.text,this.state.tabSize),a=Math.floor(i/this.unitWidth);return this.set(o,i,a)}n+=t}var s=this.state.doc.line(-1===t?1:this.state.doc.lines);return this.set(s,0,0)}},{key:"findAndSetActiveLines",value:function(){var e=$3(this.state);if(this.has(e)){var t=this.get(e);if(this.has(t.line.number+1)){var n=this.get(t.line.number+1);n.level>t.level&&(t=n)}if(this.has(t.line.number-1)){var r=this.get(t.line.number-1);r.level>t.level&&(t=r)}if(0!==t.level){var o,i;for(t.active=t.level,o=t.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level0&&s.push(E3("--indent-marker-bg-color",r,t,a,c)),s.push(E3("--indent-marker-active-bg-color",r,t,i-1,1)),i!==o&&s.push(E3("--indent-marker-bg-color",r,t,i,o-i))}else s.push(E3("--indent-marker-bg-color",r,t,a,o-a));return s.join(",")}var T3=function(){function e(t){No(this,e),this.view=t,this.unitWidth=aY(t.state),this.currentLineNumber=$3(t.state).number,this.generate(t.state)}return Do(e,[{key:"update",value:function(e){var t=aY(e.state),n=t!==this.unitWidth;n&&(this.unitWidth=t);var r=$3(e.state).number,o=r!==this.currentLineNumber;this.currentLineNumber=r;var i=e.state.facet(O3).highlightActiveBlock&&o;(e.docChanged||e.viewportChanged||n||i)&&this.generate(e.state)}},{key:"generate",value:function(e){var t,n=new EV,r=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.state,r=new Set,o=bo(e.visibleRanges);try{for(o.s();!(t=o.n()).done;)for(var i=t.value,a=i.from,s=i.to,c=a;c<=s;){var l=n.doc.lineAt(c);r.has(l)||r.add(l),c=l.to+1}}catch(e){o.e(e)}finally{o.f()}return r}(this.view,e),o=e.facet(O3),i=o.hideFirstIndent,a=o.markerType,s=o.thickness,c=new M3(r,e,this.unitWidth,a),l=bo(r);try{for(l.s();!(t=l.n()).done;){var u=t.value,f=c.get(u.number);if(null==f?void 0:f.level){var d=P3(f,this.unitWidth,i,s);n.add(u.from,u.from,nW.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(d)}}))}}}catch(e){l.e(e)}finally{l.f()}this.decorations=n.finish()}}]),e}();function R3(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[O3.of(e),A3(e.colors),QW.fromClass(T3,{decorations:function(e){return e.decorations}})]}var N3=function(){function e(t){No(this,e),this.view=t,this.indentUnit=aY(t.state),this.initialPaddingLeft=null,this.generate(t.state)}return Do(e,[{key:"update",value:function(e){var t=aY(e.state);(t!==this.indentUnit||e.docChanged||e.viewportChanged)&&(this.indentUnit=t,this.generate(e.state))}},{key:"generate",value:function(e){var t=this,n=new EV;this.initialPaddingLeft?this.addStyleToBuilder(n,e,this.initialPaddingLeft):this.view.requestMeasure({read:function(e){var r=e.contentDOM.querySelector(".cm-line");r&&(t.initialPaddingLeft=window.getComputedStyle(r).getPropertyValue("padding-left"),t.addStyleToBuilder(n,e.state,t.initialPaddingLeft)),t.decorations=n.finish()}}),this.decorations=n.finish()}},{key:"addStyleToBuilder",value:function(e,t,n){var r,o=bo(this.getVisibleLines(t));try{for(o.s();!(r=o.n()).done;){var i=r.value,a=this.numColumns(i.text,t.tabSize),s="calc(".concat(a+this.indentUnit,"ch + ").concat(n,")");e.add(i.from,i.from,nW.line({attributes:{style:"padding-left: ".concat(s,"; text-indent: -").concat(a+this.indentUnit,"ch;")}}))}}catch(e){o.e(e)}finally{o.f()}}},{key:"getVisibleLines",value:function(e){var t,n=new Set,r=null,o=bo(this.view.visibleRanges);try{for(o.s();!(t=o.n()).done;)for(var i=t.value,a=i.from,s=i.to,c=a;c<=s;){var l=e.doc.lineAt(c);r!==l&&(n.add(l),r=l),c=l.to+1}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"numColumns",value:function(e,t){var n=0;e:for(var r=0;r
loading...
',Ei(t,"class","jse-contents svelte-a0poeb")},m:function(e,n){wi(e,t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function L3(e){var t,n,r,o,i,a=e[98]&&F3(e),s=!e[98]&&V3(e);return{c:function(){t=ji("div"),n=$i(),a&&a.c(),r=$i(),s&&s.c(),o=_i(),Ei(t,"class","jse-contents svelte-a0poeb"),qi(t,"jse-hidden",e[98])},m:function(c,l){wi(c,t,l),e[53](t),wi(c,n,l),a&&a.m(c,l),wi(c,r,l),s&&s.m(c,l),wi(c,o,l),i=!0},p:function(e,n){(!i||268438016&n[0])&&qi(t,"jse-hidden",e[98]),e[98]?a?(a.p(e,n),2560&n[0]&&xa(a,1)):((a=F3(e)).c(),xa(a,1),a.m(r.parentNode,r)):a&&(ba(),ka(a,1,1,(function(){a=null})),wa()),e[98]?s&&(ba(),ka(s,1,1,(function(){s=null})),wa()):s?(s.p(e,n),2560&n[0]&&xa(s,1)):((s=V3(e)).c(),xa(s,1),s.m(o.parentNode,o))},i:function(e){i||(xa(a),xa(s),i=!0)},o:function(e){ka(a),ka(s),i=!1},d:function(i){i&&(xi(t),xi(n),xi(r),xi(o)),e[53](null),a&&a.d(i),s&&s.d(i)}}}function F3(e){var t,n,r,o,i,a=rM(e[11]||"",fs)+"";return t=new LN({props:{icon:zP,type:"error",message:"The JSON document is larger than ".concat(QL(ps,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(QL(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(){Pa(t.$$.fragment),n=$i(),r=ji("div"),o=Ci(a),Ei(r,"class","jse-contents jse-preview svelte-a0poeb")},m:function(e,a){Ta(t,e,a),wi(e,n,a),wi(e,r,a),pi(r,o),i=!0},p:function(e,n){var r={};2048&n[0]&&(r.message="The JSON document is larger than ".concat(QL(ps,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(QL(e[11].length,1024),".")),t.$set(r),(!i||2048&n[0])&&a!==(a=rM(e[11]||"",fs)+"")&&Ni(o,a)},i:function(e){i||(xa(t.$$.fragment,e),i=!0)},o:function(e){ka(t.$$.fragment,e),i=!1},d:function(e){e&&(xi(n),xi(r)),Ra(t,e)}}}function V3(e){var t,n,r,o,i,a=!e[14]&&e[0]&&aO(e[11]),s=e[3]&&H3(e),c=e[14]&&W3(e),l=a&&U3(e);return o=new XN({props:{validationErrors:e[10],selectError:e[27]}}),{c:function(){s&&s.c(),t=$i(),c&&c.c(),n=$i(),l&&l.c(),r=$i(),Pa(o.$$.fragment)},m:function(e,a){s&&s.m(e,a),wi(e,t,a),c&&c.m(e,a),wi(e,n,a),l&&l.m(e,a),wi(e,r,a),Ta(o,e,a),i=!0},p:function(e,i){e[3]?s?(s.p(e,i),8&i[0]&&xa(s,1)):((s=H3(e)).c(),xa(s,1),s.m(t.parentNode,t)):s&&(ba(),ka(s,1,1,(function(){s=null})),wa()),e[14]?c?(c.p(e,i),16384&i[0]&&xa(c,1)):((c=W3(e)).c(),xa(c,1),c.m(n.parentNode,n)):c&&(ba(),ka(c,1,1,(function(){c=null})),wa()),18433&i[0]&&(a=!e[14]&&e[0]&&aO(e[11])),a?l?(l.p(e,i),18433&i[0]&&xa(l,1)):((l=U3(e)).c(),xa(l,1),l.m(r.parentNode,r)):l&&(ba(),ka(l,1,1,(function(){l=null})),wa());var u={};1024&i[0]&&(u.validationErrors=e[10]),o.$set(u)},i:function(e){i||(xa(s),xa(c),xa(l),xa(o.$$.fragment,e),i=!0)},o:function(e){ka(s),ka(c),ka(l),ka(o.$$.fragment,e),i=!1},d:function(e){e&&(xi(t),xi(n),xi(r)),s&&s.d(e),c&&c.d(e),l&&l.d(e),Ra(o,e)}}}function H3(e){var t,n;return t=new k3({props:{editorState:e[8]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};256&n[0]&&(r.editorState=e[8]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function W3(e){var t,n;return t=new LN({props:{type:"error",icon:zP,message:e[14].message,actions:e[15],onClick:e[29],onClose:e[5]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};16384&n[0]&&(r.message=e[14].message),32768&n[0]&&(r.actions=e[15]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function U3(e){var t,n;return t=new LN({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:Nz,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:e[17]},{icon:RP,text:"No thanks",title:"Close this message",onClick:e[54]}],onClose:e[5]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&n[0]&&(r.actions=[{icon:Nz,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:e[17]},{icon:RP,text:"No thanks",title:"Close this message",onClick:e[54]}]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function J3(e){var t,n,r,o,i,a=e[2]&&q3(z3(e)),s=[L3,B3],c=[];function l(e,t){return 0===t?function(e){var t=e.slice(),n=t[28](t[11],t[9]);return t[98]=n,t}(e):e}return r=function(e,t){return e[16]?1:0}(e),o=c[r]=s[r](l(e,r)),{c:function(){t=ji("div"),a&&a.c(),n=$i(),o.c(),Ei(t,"class","jse-text-mode svelte-a0poeb"),qi(t,"no-main-menu",!e[2])},m:function(o,s){wi(o,t,s),a&&a.m(t,null),pi(t,n),c[r].m(t,null),e[55](t),i=!0},p:function(e,s){e[2]?a?(a.p(z3(e),s),4&s[0]&&xa(a,1)):((a=q3(z3(e))).c(),xa(a,1),a.m(t,n)):a&&(ba(),ka(a,1,1,(function(){a=null})),wa()),o.p(l(e,r),s),(!i||4&s[0])&&qi(t,"no-main-menu",!e[2])},i:function(e){i||(xa(a),xa(o),i=!0)},o:function(e){ka(a),ka(o),i=!1},d:function(n){n&&xi(t),a&&a.d(),c[r].d(),e[55](null)}}}function K3(e){return{from:e.from||0,to:e.to||0,message:e.message||"",actions:e.actions,severity:e.severity}}function G3(e,t,n){var r,o,i,a,s,c,l=t.readOnly,u=t.mainMenuBar,f=t.statusBar,d=t.askToFormat,h=t.externalContent,v=t.externalSelection,p=t.indentation,m=t.tabSize,g=t.escapeUnicodeCharacters,y=t.parser,b=t.validator,w=t.validationParser,x=t.onChange,k=t.onChangeMode,j=t.onSelect,S=t.onError,C=t.onFocus,$=t.onBlur,_=t.onRenderMenu,O=t.onSortModal,M=t.onTransformModal,A=Da("jsoneditor:TextMode"),E={key:"Mod-i",run:Q,shift:Y,preventDefault:!0},P="undefined"==typeof window;A("isSSR:",P);var T=!1,R=[],N=new YF,I=new YF,D=new YF,z=new YF,q=new YF,B=h,L=Z_(B,p,y),F=g;Gi(ko(wo().mark((function e(){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return");case 2:try{s=re({target:i,initialText:be(L,T)?"":r.escapeValue(L),readOnly:l,indentation:p})}catch(e){console.error(e)}case 3:case"end":return e.stop()}}),e)})))),Qi((function(){s&&(A("Destroy CodeMirror editor"),s.destroy())}));var V=!1,H=!1,W=T$(),U=T$();function J(){s&&(A("focus"),s.focus())}var K=!1;function G(e,t){A("handlePatch",e,t);var n=y.parse(L),r=oc(n,e),o=pc(n,e);return se({text:y.stringify(r,null,p)},t,!1),{json:r,previousJson:n,undo:o,redo:e}}function Q(){if(A("format"),l)return!1;try{var e=y.parse(L);return se({text:y.stringify(e,null,p)},!0,!1),!0}catch(e){S(e)}return!1}function Y(){if(A("compact"),l)return!1;try{var e=y.parse(L);return se({text:y.stringify(e)},!0,!1),!0}catch(e){S(e)}return!1}function X(){if(A("repair"),!l)try{se({text:Wl(L)},!0,!1),n(52,we=$s),n(14,xe=null)}catch(e){S(e)}}function Z(e){var t=e.id,n=e.rootPath,r=e.onTransform,o=e.onClose;try{var i=y.parse(L);K=!0,M({id:t||U,json:i,rootPath:n||[],onTransform:function(e){r?r({operations:e,json:i,transformedJson:oc(i,e)}):(A("onTransform",e),G(e,!0))},onClose:function(){K=!1,J(),o&&o()}})}catch(e){S(e)}}function ee(e,t){A("setSelection",{anchor:e,head:t}),s&&s.dispatch(s.state.update({selection:{anchor:e,head:t},scrollIntoView:!0}))}function te(e,t){if(1===t.state.selection.ranges.length){var n=t.state.selection.ranges[0],r=L.slice(n.from,n.to);if("{"===r||"["===r){var o=wc.parse(L),i=Object.keys(o.pointers).find((function(e){var t;return(null===(t=o.pointers[e].value)||void 0===t?void 0:t.pos)===n.from})),a=o.pointers[i];if(i&&a&&a.value&&a.valueEnd)A("pointer found, selecting inner contents of path:",i,a),ee(a.value.pos+1,a.valueEnd.pos-1)}}}function ne(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[y0.of({source:e,config:t}),g0,N0]}(ke,{delay:300})}function re(e){var t=e.target,r=e.initialText,o=e.readOnly,i=e.indentation;A("Create CodeMirror editor",{readOnly:o,indentation:i});var a,l,u=SV.create({doc:r,selection:ce(v),extensions:[tK.of([e0,E]),N.of(ne()),D0(),TG(),IG,TK(),RX(),zY(),mK(),[SK,CK],SV.allowMultipleSelections.of(!0),SV.transactionFilter.of((function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;var n=e.newDoc,r=e.newSelection.main.head,o=n.lineAt(r);if(r>o.from+gY)return e;var i=n.sliceString(o.from,r);if(!t.some((function(e){return e.test(i)})))return e;var a,s=e.state,c=-1,l=[],u=bo(s.selection.ranges);try{for(u.s();!(a=u.n()).done;){var f=a.value.head,d=s.doc.lineAt(f);if(d.from!=c){c=d.from;var h=cY(s,d.from);if(null!=h){var v=/^\s*/.exec(d.text)[0],p=sY(s,h);v!=p&&l.push({from:d.from,to:d.from+v.length,insert:p})}}}}catch(e){u.e(e)}finally{u.f()}return l.length?[e,{changes:l,sequential:!0}]:e})),HY(JY,{fallback:!0}),rX(),[o3,Z2],h3(),FK(),WK(),zK,(l=[O1,_1],a&&l.push(j1.of(a)),l),tK.of([].concat(i3,Bo(ZZ),o2,eZ,MY,v3,m0)),S3,R3({hideFirstIndent:!0}),JJ.domEventHandlers({dblclick:te}),JJ.updateListener.of((function(e){n(8,c=e.state),e.docChanged?pe():e.selectionSet&&ye()})),new rY(c1),A1({top:!0}),JJ.lineWrapping,I.of(SV.readOnly.of(o)),z.of(SV.tabSize.of(m)),D.of(he(i)),q.of(JJ.theme({},{dark:oe()}))]});return s=new JJ({state:u,parent:t})}function oe(){return!!i&&getComputedStyle(i).getPropertyValue("--jse-theme").includes("dark")}function ie(e){var t=e.path,n=e.message,o=function(e,t){try{var n=wc.parse(e),r=ec(t),o=n.pointers[r];if(o)return{path:t,line:o.key?o.key.line:o.value?o.value.line:0,column:o.key?o.key.column:o.value?o.value.column:0,from:o.key?o.key.pos:o.value?o.value.pos:0,to:o.keyEnd?o.keyEnd.pos:o.valueEnd?o.valueEnd.pos:0}}catch(e){console.error(e)}return{path:t,line:0,column:0,from:0,to:0}}(r.escapeValue(L),t);return{path:t,line:o.line,column:o.column,from:o.from,to:o.to,message:n,severity:Za.warning,actions:[]}}function ae(e,t){var n=e.line,r=e.column,o=e.position,i=e.message;return{path:[],line:n,column:r,from:o,to:o,severity:Za.error,message:i,actions:t&&!l?[{name:"Auto repair",apply:function(){return X()}}]:null}}function se(e,t,o){var i=Z_(e,p,y),a=!Ex(e,B),c=B;A("setCodeMirrorContent",{isChanged:a,emitChange:t,forceUpdate:o}),s&&(a||o)&&(B=e,n(11,L=i),be(L,T)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:r.escapeValue(L)}}),ve(),a&&t&&ge(B,c))}function ce(e){return xA(e)?RF.fromJSON(e):void 0}function le(){return(le=ko(wo().mark((function e(){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A("refresh"),e.next=3,fe();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(){if(s){var e=s?r.unescapeValue(s.state.doc.toString()):"",t=e!==L;if(A("onChangeCodeMirrorValue",{isChanged:t}),t){var o=B;n(11,L=e),B={text:L},ve(),ge(B,o),ca().then(ye)}}}function fe(){return de.apply(this,arguments)}function de(){return(de=ko(wo().mark((function e(){var t;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ca();case 2:s&&(t=oe(),A("updateTheme",{dark:t}),s.dispatch({effects:[q.reconfigure(JJ.theme({},{dark:t}))]}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e){var t=iY.of("number"==typeof e?" ".repeat(e):e);return"\t"===e?[t]:[t,I3]}function ve(){n(12,V=LX(s.state)>0),n(13,H=FX(s.state)>0),A({canUndo:V,canRedo:H})}Qi((function(){me()})),TN({onMount:Gi,onDestroy:Qi,getWindow:function(){return $O(a)},hasFocus:function(){return K&&document.hasFocus()||_O(a)},onFocus:C,onBlur:function(){me(),$()}});var pe=Uy(ue,300);function me(){pe.flush()}function ge(e,t){x&&x(e,t,{contentErrors:je(),patchResult:null})}function ye(){j(Ro({type:Ya.text},c.selection.toJSON()))}function be(e,t){return!!e&&e.length>ps&&!t}var we=$s,xe=null;function ke(){if(be(L,T))return[];var e=je();return pI(e)?[K3(ae(e.parseError,e.isRepairable))]:mI(e)?e.validationErrors.map(ie).map(K3):[]}function je(){A("validate:start"),me();var e=Se(r.escapeValue(L),b,y,w);return pI(e)?(n(52,we=e.isRepairable?_s:"invalid"),n(14,xe=e.parseError),n(10,R=[])):(n(52,we=$s),n(14,xe=null),n(10,R=(null==e?void 0:e.validationErrors)||[])),A("validate:end"),e}var Se=zq(EN);function Ce(){xe&&function(e){A("select parse error",e);var t=ae(e,!1);ee(null!=t.from?t.from:0,null!=t.to?t.to:0),J()}(xe)}var $e={icon:mP,text:"Show me",title:"Move to the parse error location",onClick:Ce};return e.$$set=function(e){"readOnly"in e&&n(1,l=e.readOnly),"mainMenuBar"in e&&n(2,u=e.mainMenuBar),"statusBar"in e&&n(3,f=e.statusBar),"askToFormat"in e&&n(0,d=e.askToFormat),"externalContent"in e&&n(30,h=e.externalContent),"externalSelection"in e&&n(31,v=e.externalSelection),"indentation"in e&&n(32,p=e.indentation),"tabSize"in e&&n(33,m=e.tabSize),"escapeUnicodeCharacters"in e&&n(34,g=e.escapeUnicodeCharacters),"parser"in e&&n(35,y=e.parser),"validator"in e&&n(36,b=e.validator),"validationParser"in e&&n(37,w=e.validationParser),"onChange"in e&&n(38,x=e.onChange),"onChangeMode"in e&&n(39,k=e.onChangeMode),"onSelect"in e&&n(40,j=e.onSelect),"onError"in e&&n(41,S=e.onError),"onFocus"in e&&n(42,C=e.onFocus),"onBlur"in e&&n(43,$=e.onBlur),"onRenderMenu"in e&&n(4,_=e.onRenderMenu),"onSortModal"in e&&n(44,O=e.onSortModal),"onTransformModal"in e&&n(45,M=e.onTransformModal)},e.$$.update=function(){8&e.$$.dirty[1]&&(r=cO({escapeControlCharacters:!1,escapeUnicodeCharacters:g})),1073741824&e.$$.dirty[0]&&se(h,!1,!1),1&e.$$.dirty[1]&&function(e){if(xA(e)){var t=ce(e);!s||!t||c&&c.selection.eq(t)||(A("applyExternalSelection",t),s.dispatch({selection:t}))}}(v),32&e.$$.dirty[1]&&function(e){A("updateLinter",e),s&&s.dispatch({effects:N.reconfigure(ne())})}(b),2&e.$$.dirty[1]&&function(e){s&&(A("updateIndentation",e),s.dispatch({effects:D.reconfigure(he(e))}))}(p),4&e.$$.dirty[1]&&function(e){s&&(A("updateTabSize",e),s.dispatch({effects:z.reconfigure(SV.tabSize.of(e))}))}(m),2&e.$$.dirty[0]&&function(e){s&&(A("updateReadOnly",e),s.dispatch({effects:[I.reconfigure(SV.readOnly.of(e))]}))}(l),1048584&e.$$.dirty[1]&&F!==g&&(n(51,F=g),A("forceUpdateText",{escapeUnicodeCharacters:g}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:r.escapeValue(L)}})),2&e.$$.dirty[0]|2097152&e.$$.dirty[1]&&n(15,o=we!==_s||l?[$e]:[{icon:pP,text:"Auto repair",title:"Automatically repair JSON",onClick:X},$e])},[d,l,u,f,_,J,i,a,c,T,R,L,V,H,xe,o,P,Q,Y,function(){var e;if(!l)try{var t=y.parse(L);K=!0,O({id:W,json:t,rootPath:[],onSort:(e=ko(wo().mark((function e(t){var n;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.operations,A("onSort",n),G(n,!0);case 3:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)}),onClose:function(){K=!1,J()}})}catch(e){S(e)}},function(){l||Z({rootPath:[]})},function(){s&&(i&&i.querySelector(".cm-search")?r2(s):n2(s))},function(){l||s&&(IX(s),J())},function(){l||s&&(DX(s),J())},function(){n(9,T=!0),se(h,!0,!0)},function(){k(Qa.tree)},function(){ue()},function(e){A("select validation error",e);var t=ie(e),n=t.from,r=t.to;null!==n&&null!==r&&(ee(n,r),J())},be,Ce,h,v,p,m,g,y,b,w,x,k,j,S,C,$,O,M,function(e){return G(e,!1)},G,Z,function(){return le.apply(this,arguments)},je,F,we,function(e){na[e?"unshift":"push"]((function(){n(6,i=e)}))},function(){return n(0,d=!1)},function(e){na[e?"unshift":"push"]((function(){n(7,a=e)}))}]}var Q3=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,G3,J3,Zo,{readOnly:1,mainMenuBar:2,statusBar:3,askToFormat:0,externalContent:30,externalSelection:31,indentation:32,tabSize:33,escapeUnicodeCharacters:34,parser:35,validator:36,validationParser:37,onChange:38,onChangeMode:39,onSelect:40,onError:41,onFocus:42,onBlur:43,onRenderMenu:4,onSortModal:44,onTransformModal:45,focus:5,patch:46,handlePatch:47,openTransformModal:48,refresh:49,validate:50},D3,[-1,-1,-1,-1]),n}return Eo(t,Ia),Do(t,[{key:"focus",get:function(){return this.$$.ctx[5]}},{key:"patch",get:function(){return this.$$.ctx[46]}},{key:"handlePatch",get:function(){return this.$$.ctx[47]}},{key:"openTransformModal",get:function(){return this.$$.ctx[48]}},{key:"refresh",get:function(){return this.$$.ctx[49]}},{key:"validate",get:function(){return this.$$.ctx[50]}}]),t}();function Y3(e){var t,n;return t=new DI({props:{items:e[0]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};1&jo(n,1)[0]&&(r.items=e[0]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function X3(e,t,n){var r,o,i=t.containsValidArray,a=t.readOnly,s=t.showSearch,c=void 0!==s&&s,l=t.historyState,u=t.onSort,f=t.onTransform,d=t.onContextMenu,h=t.onUndo,v=t.onRedo,p=t.onRenderMenu;function m(){n(1,c=!c)}return e.$$set=function(e){"containsValidArray"in e&&n(2,i=e.containsValidArray),"readOnly"in e&&n(3,a=e.readOnly),"showSearch"in e&&n(1,c=e.showSearch),"historyState"in e&&n(4,l=e.historyState),"onSort"in e&&n(5,u=e.onSort),"onTransform"in e&&n(6,f=e.onTransform),"onContextMenu"in e&&n(7,d=e.onContextMenu),"onUndo"in e&&n(8,h=e.onUndo),"onRedo"in e&&n(9,v=e.onRedo),"onRenderMenu"in e&&n(10,p=e.onRenderMenu)},e.$$.update=function(){1020&e.$$.dirty&&n(11,r=a?[{type:"space"}]:[{type:"button",icon:CP,title:"Sort",className:"jse-sort",onClick:u,disabled:a||!i},{type:"button",icon:hP,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:f,disabled:a||!i},{type:"button",icon:OP,title:"Search (Ctrl+F)",className:"jse-search",onClick:m,disabled:!i},{type:"button",icon:jP,title:ks,className:"jse-contextmenu",onClick:d},{type:"separator"},{type:"button",icon:bP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!l.canUndo},{type:"button",icon:yP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:v,disabled:!l.canRedo},{type:"space"}]),3072&e.$$.dirty&&n(0,o=p(r))},[o,c,i,a,l,u,f,d,h,v,p,r]}var Z3=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,X3,Y3,Zo,{containsValidArray:2,readOnly:3,showSearch:1,historyState:4,onSort:5,onTransform:6,onContextMenu:7,onUndo:8,onRedo:9,onRenderMenu:10}),n}return Eo(t,Ia),Do(t)}();function e4(e,t,n){var r=e.slice();return r[9]=t[n],r}function t4(e){var t,n,r=e[9].component,o=r4(e);return{c:function(){o.c(),t=_i()},m:function(e,r){o.m(e,r),wi(e,t,r),n=!0},p:function(e,n){1&n&&Zo(r,r=e[9].component)?(ba(),ka(o,1,1,Wo),wa(),(o=r4(e)).c(),xa(o,1),o.m(t.parentNode,t)):o.p(e,n)},i:function(e){n||(xa(o),n=!0)},o:function(e){ka(o),n=!1},d:function(e){e&&xi(t),o.d(e)}}}function n4(e){var t,n=e[9].action,r=o4(e);return{c:function(){r.c(),t=_i()},m:function(e,n){r.m(e,n),wi(e,t,n)},p:function(e,o){1&o&&Zo(n,n=e[9].action)?(r.d(1),(r=o4(e)).c(),r.m(t.parentNode,t)):r.p(e,o)},i:Wo,o:Wo,d:function(e){e&&xi(t),r.d(e)}}}function r4(e){var t,n,r,o=[e[9].props],i=e[9].component;function a(e,t){for(var n={},r=0;r0){for(var r=[e],o=Zw(n);o.length>0&&!Xs(t,o);)r.unshift({op:"add",path:ec(o),value:{}}),o=Zw(o);return r}}return e}))}(e,s.getJson()),t)}return e.$$set=function(e){"path"in e&&n(1,i=e.path),"value"in e&&n(2,a=e.value),"context"in e&&n(3,s=e.context),"enforceString"in e&&n(4,c=e.enforceString),"selection"in e&&n(5,l=e.selection),"searchResultItems"in e&&n(6,u=e.searchResultItems)},e.$$.update=function(){40&e.$$.dirty&&n(7,r=!s.readOnly&&gA(l)&&LA(l)),254&e.$$.dirty&&n(0,o=s.onRenderValue({path:i,value:a,readOnly:s.readOnly,enforceString:c,isEditing:r,parser:s.parser,normalization:s.normalization,selection:l,searchResultItems:u,onPatch:f,onPasteJson:s.onPasteJson,onSelect:s.onSelect,onFind:s.onFind,findNextInside:s.findNextInside,focus:s.focus}))},[o,i,a,s,c,l,u,r]}var c4=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,s4,a4,Zo,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),n}return Eo(t,Ia),Do(t)}();function l4(e){mi(e,"svelte-1dhomzn",'.jse-inline-value.svelte-1dhomzn{font-family:var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace);font-size:var(--jse-font-size-mono, 14px);line-height:var(--jse-line-height, calc(1em + 4px));border:none;padding:0 calc(0.5 * var(--jse-padding, 10px));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-1dhomzn:hover{background:var(--jse-hover-background-color, rgba(0, 0, 0, 0.06))}.jse-inline-value.jse-selected.svelte-1dhomzn{background:var(--jse-selection-background-color, #d3d3d3)}.jse-inline-value.jse-highlight.svelte-1dhomzn{background-color:var(--jse-search-match-color, #ffe665);outline:var(--jse-search-match-outline, 1px solid #ffd700)}.jse-inline-value.jse-highlight.jse-active.svelte-1dhomzn{background-color:var(--jse-search-match-active-color, #ffd700);outline:var(--jse-search-match-active-outline, 1px solid #e1be00)}')}function u4(e){var t,n,r,o,i,a=rM(null!==(t=e[2].stringify(e[1]))&&void 0!==t?t:"",50)+"";return{c:function(){n=ji("button"),r=Ci(a),Ei(n,"type","button"),Ei(n,"class","jse-inline-value svelte-1dhomzn"),qi(n,"jse-selected",e[3]),qi(n,"jse-highlight",e[4]),qi(n,"jse-active",e[5])},m:function(t,a){wi(t,n,a),pi(n,r),o||(i=Oi(n,"dblclick",e[7]),o=!0)},p:function(e,t){var o,i=jo(t,1)[0];6&i&&a!==(a=rM(null!==(o=e[2].stringify(e[1]))&&void 0!==o?o:"",50)+"")&&Ni(r,a),8&i&&qi(n,"jse-selected",e[3]),16&i&&qi(n,"jse-highlight",e[4]),32&i&&qi(n,"jse-active",e[5])},i:Wo,o:Wo,d:function(e){e&&xi(n),o=!1,i()}}}function f4(e,t,n){var r=t.path,o=t.value,i=t.parser,a=t.isSelected,s=t.containsSearchResult,c=t.containsActiveSearchResult,l=t.onEdit;return e.$$set=function(e){"path"in e&&n(0,r=e.path),"value"in e&&n(1,o=e.value),"parser"in e&&n(2,i=e.parser),"isSelected"in e&&n(3,a=e.isSelected),"containsSearchResult"in e&&n(4,s=e.containsSearchResult),"containsActiveSearchResult"in e&&n(5,c=e.containsActiveSearchResult),"onEdit"in e&&n(6,l=e.onEdit)},[r,o,i,a,s,c,l,function(){return l(r)}]}var d4=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,f4,u4,Zo,{path:0,value:1,parser:2,isSelected:3,containsSearchResult:4,containsActiveSearchResult:5,onEdit:6},l4),n}return Eo(t,Ia),Do(t)}();function h4(e){mi(e,"svelte-2v0aqj",".jse-column-header.svelte-2v0aqj.svelte-2v0aqj{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding, 10px);padding:calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)) calc(0.5 * var(--jse-padding, 10px));width:100%}.jse-column-header.svelte-2v0aqj.svelte-2v0aqj:hover{background:var(--jse-table-header-background-highlight, #e8e8e8)}.jse-column-header.svelte-2v0aqj.svelte-2v0aqj:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-2v0aqj span.jse-column-sort-icon.svelte-2v0aqj{height:1em}")}function v4(e){var t,n,r,o;return n=new CM({props:{data:e[1]===ts.asc?kP:fP}}),{c:function(){t=ji("span"),Pa(n.$$.fragment),Ei(t,"class","jse-column-sort-icon svelte-2v0aqj"),Ei(t,"title",r="Currently sorted in ".concat(e[2]," order"))},m:function(e,r){wi(e,t,r),Ta(n,t,null),o=!0},p:function(e,i){var a={};2&i&&(a.data=e[1]===ts.asc?kP:fP),n.$set(a),(!o||4&i&&r!==(r="Currently sorted in ".concat(e[2]," order")))&&Ei(t,"title",r)},i:function(e){o||(xa(n.$$.fragment,e),o=!0)},o:function(e){ka(n.$$.fragment,e),o=!1},d:function(e){e&&xi(t),Ra(n)}}}function p4(e){var t,n,r,o,i,a,s,c,l=rM(e[3],50)+"",u=void 0!==e[1]&&v4(e);return{c:function(){t=ji("button"),n=ji("span"),r=Ci(l),o=$i(),u&&u.c(),Ei(n,"class","jse-column-name"),Ei(t,"type","button"),Ei(t,"class","jse-column-header svelte-2v0aqj"),Ei(t,"title",i=e[0]?e[3]:e[3]+" (Click to sort the data by this column)"),qi(t,"jse-readonly",e[0])},m:function(i,l){wi(i,t,l),pi(t,n),pi(n,r),pi(t,o),u&&u.m(t,null),a=!0,s||(c=Oi(t,"click",e[4]),s=!0)},p:function(e,n){var o=jo(n,1)[0];(!a||8&o)&&l!==(l=rM(e[3],50)+"")&&Ni(r,l),void 0!==e[1]?u?(u.p(e,o),2&o&&xa(u,1)):((u=v4(e)).c(),xa(u,1),u.m(t,null)):u&&(ba(),ka(u,1,1,(function(){u=null})),wa()),(!a||9&o&&i!==(i=e[0]?e[3]:e[3]+" (Click to sort the data by this column)"))&&Ei(t,"title",i),(!a||1&o)&&qi(t,"jse-readonly",e[0])},i:function(e){a||(xa(u),a=!0)},o:function(e){ka(u),a=!1},d:function(e){e&&xi(t),u&&u.d(),s=!1,c()}}}function m4(e,t,n){var r,o,i,a=t.path,s=t.sortedColumn,c=t.readOnly,l=t.onSort;return e.$$set=function(e){"path"in e&&n(5,a=e.path),"sortedColumn"in e&&n(6,s=e.sortedColumn),"readOnly"in e&&n(0,c=e.readOnly),"onSort"in e&&n(7,l=e.onSort)},e.$$.update=function(){var t;(32&e.$$.dirty&&n(3,r=Ax(a)?"values":GO(a)),96&e.$$.dirty)&&n(1,o=s&&Ex(a,null===(t=s)||void 0===t?void 0:t.path)?s.sortDirection:void 0);2&e.$$.dirty&&n(2,i=o?Es[o]:void 0)},[c,o,i,r,function(){c||l({path:a,sortDirection:o===ts.asc?ts.desc:ts.asc})},a,s,l]}var g4,y4,b4=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,m4,p4,Zo,{path:5,sortedColumn:6,readOnly:0,onSort:7},h4),n}return Eo(t,Ia),Do(t)}();function w4(e,t){return g4||(y4=new WeakMap,g4=new ResizeObserver((function(e){var t,n=bo(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=y4.get(r.target);o&&o(r.target)}}catch(e){n.e(e)}finally{n.f()}}))),y4.set(e,t),g4.observe(e),{destroy:function(){y4.delete(e),g4.unobserve(e)}}}function x4(e){mi(e,"svelte-fxr3ye",'.jse-table-mode-welcome.svelte-fxr3ye.svelte-fxr3ye{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border, 1px solid #d7d7d7);border-right:var(--jse-main-border, 1px solid #d7d7d7)}.jse-table-mode-welcome.svelte-fxr3ye.svelte-fxr3ye:last-child{border-bottom:var(--jse-main-border, 1px solid #d7d7d7)}.jse-table-mode-welcome.svelte-fxr3ye .jse-space.jse-before.svelte-fxr3ye{flex:1}.jse-table-mode-welcome.svelte-fxr3ye .jse-nested-arrays.svelte-fxr3ye{display:flex;flex-direction:column;gap:var(--jse-padding, 10px);max-width:300px;margin:2em var(--jse-padding, 10px);font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px)}.jse-table-mode-welcome.svelte-fxr3ye .jse-nested-arrays .jse-nested-arrays-info.svelte-fxr3ye{color:var(--jse-panel-color-readonly, #b2b2b2)}.jse-table-mode-welcome.svelte-fxr3ye .jse-nested-arrays button.jse-nested-array-action.svelte-fxr3ye{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);padding:5px;margin:0;background:var(--jse-button-primary-background, var(--jse-theme-color, #3883fa));color:var(--jse-button-primary-color, #fff);padding:var(--jse-padding, 10px) calc(2 * var(--jse-padding, 10px));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-fxr3ye .jse-nested-arrays button.jse-nested-array-action.svelte-fxr3ye:hover{background:var(--jse-button-primary-background-highlight, var(--jse-theme-color-highlight, #5f9dff))}.jse-table-mode-welcome.svelte-fxr3ye .jse-nested-arrays button.jse-nested-array-action.svelte-fxr3ye:disabled{background:var(--jse-button-primary-background-disabled, #9d9d9d)}.jse-table-mode-welcome.svelte-fxr3ye .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-fxr3ye{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-fxr3ye .jse-space.jse-after.svelte-fxr3ye{flex:2}')}function k4(e,t,n){var r=e.slice();r[16]=t[n];var o=r[9](r[16]);return r[17]=o,r}function j4(e){var t,n;return{c:function(){t=Ci(e[7]),n=Ci(" cannot be opened in table mode.")},m:function(e,r){wi(e,t,r),wi(e,n,r)},p:function(e,n){128&n&&Ni(t,e[7])},d:function(e){e&&(xi(t),xi(n))}}}function S4(e){var t;return{c:function(){t=Ci("An object cannot be opened in table mode. You can open a nested array instead, or open the\n document in tree mode.")},m:function(e,n){wi(e,t,n)},p:Wo,d:function(e){e&&xi(t)}}}function C4(e){var t;return{c:function(){t=Ci("You can open the document in tree mode instead.")},m:function(e,n){wi(e,t,n)},d:function(e){e&&xi(t)}}}function $4(e){var t,n,r;return{c:function(){t=Ci("You can open the document in tree mode instead, or paste a JSON Array using "),(n=ji("b")).textContent="Ctrl+V",r=Ci(".")},m:function(e,o){wi(e,t,o),wi(e,n,o),wi(e,r,o)},d:function(e){e&&(xi(t),xi(n),xi(r))}}}function _4(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v=GO(e[16])+"",p=e[17]+"",m=1!==e[17]?"items":"item";function g(){return e[13](e[16])}return{c:function(){t=ji("button"),n=Ci(e[8]),r=Ci(' "'),o=Ci(v),i=Ci('"\n '),a=ji("span"),s=Ci("("),c=Ci(p),l=$i(),u=Ci(m),f=Ci(")"),Ei(a,"class","jse-nested-array-count svelte-fxr3ye"),Ei(t,"type","button"),Ei(t,"class","jse-nested-array-action svelte-fxr3ye")},m:function(e,v){wi(e,t,v),pi(t,n),pi(t,r),pi(t,o),pi(t,i),pi(t,a),pi(a,s),pi(a,c),pi(a,l),pi(a,u),pi(a,f),d||(h=Oi(t,"click",g),d=!0)},p:function(t,r){e=t,256&r&&Ni(n,e[8]),16&r&&v!==(v=GO(e[16])+"")&&Ni(o,v),16&r&&p!==(p=e[17]+"")&&Ni(c,p),16&r&&m!==(m=1!==e[17]?"items":"item")&&Ni(u,m)},d:function(e){e&&xi(t),d=!1,h()}}}function O4(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y;function b(e,t){return e[6]?S4:j4}var w=b(e),x=w(e);function k(e,t){return e[5]&&!e[0]?$4:C4}for(var j=k(e),S=j(e),C=Ca(e[4]),$=[],_=0;_1&&void 0!==arguments[1]?arguments[1]:2,n=[];return function e(r,o){Ns(r)&&o.length0})):[]),16&e.$$.dirty&&n(6,o=!Ax(s)),3072&e.$$.dirty&&n(5,i=void 0===l&&(""===c||void 0===c)),6240&e.$$.dirty&&n(7,a=o?"Object with nested arrays":i?"An empty document":Ns(l)?"An object":Rs(l)?"An empty array":"A ".concat(tu(l,f)))},[u,d,h,v,s,i,o,a,r,function(e){return Us(l,e).length},c,l,f,function(e){return d(e)},function(){return h(Qa.tree)},function(){return v()}]}var A4=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,M4,O4,Zo,{text:10,json:11,readOnly:0,parser:12,openJSONEditorModal:1,onChangeMode:2,onClick:3},x4),n}return Eo(t,Ia),Do(t)}();function E4(e){mi(e,"svelte-1nml1r3",".jse-column-header.svelte-1nml1r3{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding, 10px);padding:calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)) calc(0.5 * var(--jse-padding, 10px));width:100%}.jse-column-header.svelte-1nml1r3:hover{background:var(--jse-table-header-background-highlight, #e8e8e8)}.jse-column-header.svelte-1nml1r3:not(.jse-column-header.jse-readonly){cursor:pointer}")}function P4(e){var t,n,r,o,i,a;return n=new CM({props:{data:NP}}),{c:function(){t=ji("button"),Pa(n.$$.fragment),Ei(t,"type","button"),Ei(t,"class","jse-column-header svelte-1nml1r3"),Ei(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(r,s){wi(r,t,s),Ta(n,t,null),o=!0,i||(a=Oi(t,"click",e[3]),i=!0)},p:function(e,n){var i=jo(n,1)[0];(!o||3&i&&r!==(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."))&&Ei(t,"title",r)},i:function(e){o||(xa(n.$$.fragment,e),o=!0)},o:function(e){ka(n.$$.fragment,e),o=!1},d:function(e){e&&xi(t),Ra(n),i=!1,a()}}}function T4(e,t,n){var r=t.count,o=t.maxSampleCount,i=t.onRefresh;return e.$$set=function(e){"count"in e&&n(0,r=e.count),"maxSampleCount"in e&&n(1,o=e.maxSampleCount),"onRefresh"in e&&n(2,i=e.onRefresh)},[r,o,i,function(){return i()}]}var R4=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,T4,P4,Zo,{count:0,maxSampleCount:1,onRefresh:2},E4),n}return Eo(t,Ia),Do(t)}();function N4(e){mi(e,"svelte-12ygzbc",'.jse-table-mode.svelte-12ygzbc.svelte-12ygzbc{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color, #fff);min-width:0;min-height:0;font-family:var(--jse-font-family-mono, consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace);font-size:var(--jse-font-size-mono, 14px);color:var(--jse-text-color, #4d4d4d);line-height:var(--jse-line-height, calc(1em + 4px))}.jse-table-mode.no-main-menu.svelte-12ygzbc.svelte-12ygzbc{border-top:var(--jse-main-border, 1px solid #d7d7d7)}.jse-table-mode.svelte-12ygzbc .jse-search-box-container.svelte-12ygzbc{position:relative;height:0;top:calc(var(--jse-line-height, calc(1em + 4px)) + 2 * var(--jse-padding, 10px));margin-right:calc(var(--jse-padding, 10px) + 20px);margin-left:var(--jse-padding, 10px);text-align:right;z-index:3}.jse-table-mode.svelte-12ygzbc .jse-hidden-input-label.svelte-12ygzbc{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-12ygzbc .jse-hidden-input-label .jse-hidden-input.svelte-12ygzbc{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-12ygzbc .jse-contents.svelte-12ygzbc{flex:1;align-items:flex-start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;scrollbar-gutter:stable;border-left:var(--jse-main-border, 1px solid #d7d7d7);border-right:var(--jse-main-border, 1px solid #d7d7d7)}.jse-table-mode.svelte-12ygzbc .jse-contents.svelte-12ygzbc:last-child{border-bottom:var(--jse-main-border, 1px solid #d7d7d7)}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main.svelte-12ygzbc{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-12ygzbc,.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-12ygzbc{margin:0;padding:0}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-12ygzbc{padding-bottom:var(--jse-padding, 10px)}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row.svelte-12ygzbc:hover{background-color:var(--jse-table-row-odd-background, rgba(0, 0, 0, 0.05))}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-12ygzbc{padding:0 var(--jse-padding, 10px) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height, calc(1em + 4px))}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-12ygzbc,.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-12ygzbc{font-weight:normal;text-align:left;color:var(--jse-text-readonly, #8d8d8d);background:var(--jse-table-header-background, #f5f5f5)}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-12ygzbc{padding:0;position:sticky;top:0}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-12ygzbc{padding:calc(0.5 * var(--jse-padding, 10px)) var(--jse-padding, 10px) calc(0.5 * var(--jse-padding, 10px)) calc(0.5 * var(--jse-padding, 10px))}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-12ygzbc{padding:0 var(--jse-padding, 10px) 0 calc(0.5 * var(--jse-padding, 10px))}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-12ygzbc>.jse-value{background:var(--jse-selection-background-color, #d3d3d3)}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-12ygzbc div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-12ygzbc .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-12ygzbc{display:inline-flex;position:relative;vertical-align:top}.jse-table-mode.svelte-12ygzbc .jse-contents.jse-contents-loading.svelte-12ygzbc{align-items:unset}.jse-table-mode.svelte-12ygzbc .jse-contents.jse-contents-loading .jse-loading-space.svelte-12ygzbc{flex:1}.jse-table-mode.svelte-12ygzbc .jse-contents.jse-contents-loading .jse-loading.svelte-12ygzbc{flex:2;text-align:center;color:var(--jse-panel-color-readonly, #b2b2b2);box-sizing:border-box;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px)}')}function I4(e,t,n){var r,o,i,a=e.slice();a[132]=t[n],a[138]=n;var s=a[27].startIndex+a[138];a[133]=s;var c=a[26].rows[a[133]];a[134]=c;var l=Kq([String(a[133])],null===(r=a[134])||void 0===r?void 0:r.row);a[135]=l;var u=null!==(o=a[20])&&void 0!==o&&o.itemsMap?AD(null===(i=a[20])||void 0===i?void 0:i.itemsMap,tc(a[133])):void 0;return a[136]=u,a}function D4(e,t,n){var r,o=e.slice();o[139]=t[n],o[146]=n;var i=[String(o[133])].concat(o[139]);o[140]=i;var a=ec(o[140]);o[141]=a;var s=Us(o[132],o[139]);o[142]=s;var c=gA(o[12].selection)&&TA(o[12].selection.path,o[140]);o[143]=c;var l=null===(r=o[134])||void 0===r?void 0:r.columns[o[146]];o[144]=l;var u=Kq(o[140],o[144]);return o[135]=u,o}function z4(e,t,n){var r=e.slice();return r[139]=t[n],r}function q4(e){var t,n=e.slice(),r=Kq([],null===(t=n[26])||void 0===t?void 0:t.root);return n[135]=r,n}function B4(e){var t,n,r;function o(t){e[79](t)}var i={containsValidArray:e[22],readOnly:e[0],historyState:e[24],onSort:e[47],onTransform:e[48],onUndo:e[49],onRedo:e[50],onContextMenu:e[39],onRenderMenu:e[5]};return void 0!==e[9]&&(i.showSearch=e[9]),t=new Z3({props:i}),na.push((function(){return Ea(t,"showSearch",o)})),{c:function(){Pa(t.$$.fragment)},m:function(e,n){Ta(t,e,n),r=!0},p:function(e,r){var o={};4194304&r[0]&&(o.containsValidArray=e[22]),1&r[0]&&(o.readOnly=e[0]),16777216&r[0]&&(o.historyState=e[24]),32&r[0]&&(o.onRenderMenu=e[5]),!n&&512&r[0]&&(n=!0,o.showSearch=e[9],ua((function(){return n=!1}))),t.$set(o)},i:function(e){r||(xa(t.$$.fragment,e),r=!0)},o:function(e){ka(t.$$.fragment,e),r=!1},d:function(e){Ra(t,e)}}}function L4(e){var t;return{c:function(){(t=ji("div")).innerHTML='
loading...
',Ei(t,"class","jse-contents jse-contents-loading svelte-12ygzbc")},m:function(e,n){wi(e,t,n)},p:Wo,i:Wo,o:Wo,d:function(e){e&&xi(t)}}}function F4(e){var t,n,r,o,i,a,s,c,l,u=[W4,H4,V4],f=[];function d(e,t){return e[22]?0:e[18]&&void 0!==e[17]&&""!==e[17]?1:2}return o=d(e),i=f[o]=u[o](e),{c:function(){t=ji("label"),n=ji("input"),r=$i(),i.c(),a=_i(),Ei(n,"type","text"),n.readOnly=!0,Ei(n,"tabindex","-1"),Ei(n,"class","jse-hidden-input svelte-12ygzbc"),Ei(t,"class","jse-hidden-input-label svelte-12ygzbc")},m:function(i,u){wi(i,t,u),pi(t,n),e[80](n),wi(i,r,u),f[o].m(i,u),wi(i,a,u),s=!0,c||(l=Oi(n,"paste",e[44]),c=!0)},p:function(e,t){var n=o;(o=d(e))===n?f[o].p(e,t):(ba(),ka(f[n],1,1,(function(){f[n]=null})),wa(),(i=f[o])?i.p(e,t):(i=f[o]=u[o](e)).c(),xa(i,1),i.m(a.parentNode,a))},i:function(e){s||(xa(i),s=!0)},o:function(e){ka(i),s=!1},d:function(n){n&&(xi(t),xi(r),xi(a)),e[80](null),f[o].d(n),c=!1,l()}}}function V4(e){var t,n;return t=new A4({props:{text:e[17],json:e[8],readOnly:e[0],parser:e[2],openJSONEditorModal:e[46],onChangeMode:e[4],onClick:e[84]}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};131072&n[0]&&(r.text=e[17]),256&n[0]&&(r.json=e[8]),1&n[0]&&(r.readOnly=e[0]),4&n[0]&&(r.parser=e[2]),16&n[0]&&(r.onChangeMode=e[4]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function H4(e){var t,n,r,o;return t=new LN({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:e[0]?[]:[{icon:vP,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[42]}]}}),r=new yB({props:{text:e[17],json:e[8],indentation:e[3],parser:e[2]}}),{c:function(){Pa(t.$$.fragment),n=$i(),Pa(r.$$.fragment)},m:function(e,i){Ta(t,e,i),wi(e,n,i),Ta(r,e,i),o=!0},p:function(e,n){var o={};1&n[0]&&(o.actions=e[0]?[]:[{icon:vP,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:e[42]}]),t.$set(o);var i={};131072&n[0]&&(i.text=e[17]),256&n[0]&&(i.json=e[8]),8&n[0]&&(i.indentation=e[3]),4&n[0]&&(i.parser=e[2]),r.$set(i)},i:function(e){o||(xa(t.$$.fragment,e),xa(r.$$.fragment,e),o=!0)},o:function(e){ka(t.$$.fragment,e),ka(r.$$.fragment,e),o=!1},d:function(e){e&&xi(n),Ra(t,e),Ra(r,e)}}}function W4(e){var t,n,r,o,i,a,s,c,l,u,f,d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O=!Ax(null===(t=e[26])||void 0===t?void 0:t.root);r=new Nq({props:{json:e[8],documentState:e[12],parser:e[2],showSearch:e[9],showReplace:e[21],readOnly:e[0],columns:e[11],onSearch:e[30],onFocus:e[31],onPatch:e[34],onClose:e[32]}});for(var M=O&&U4(q4(e)),A=Ca(e[11]),E=[],P=0;P1&&void 0!==arguments[1])||arguments[1],n=J?As:0,r=Hq(e,X,ee,c6),o=r-ne+n+c6,i=_e(e);if(a("scrollTo",{path:e,top:r,scrollTop:ne,elem:i}),!g)return Promise.resolve();var s=g.getBoundingClientRect();if(i&&!t){var c=i.getBoundingClientRect();if(c.bottom>s.top&&c.topr.right){var i=o.right-r.right;n(15,g.scrollLeft+=i,g)}if(o.lefts){var c=o-s;n(15,g.scrollTop+=c,g)}if(r0&&void 0!==n[0])||n[0],void 0!==b){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,eB({json:b,documentState:ie,indentation:t?P:void 0,parser:O});case 5:case"end":return e.stop()}}),e)}))),ze.apply(this,arguments)}function qe(){rB({json:b,text:w,documentState:ie,keepSelection:!0,readOnly:x,onChange:T,onPatch:ge})}function Be(){oB({json:b,documentState:ie,columns:X,readOnly:x,onPatch:ge})}function Le(){iB({json:b,documentState:ie,columns:X,readOnly:x,onPatch:ge})}function Fe(){aB({json:b,documentState:ie,columns:X,readOnly:x,onPatch:ge})}function Ve(){sB({json:b,documentState:ie,columns:X,readOnly:x,onPatch:ge})}function He(){return(He=ko(wo().mark((function e(t){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lB({char:t,selectInside:!1,refJsonEditor:m,json:b,selection:ie.selection,readOnly:x,parser:O,onPatch:ge,onReplaceJson:We,onSelect:re});case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e,t){var r=ie,o=b,i=w,a={json:b,text:w},s=ae,c=UM(b,ie,[],dA),l="function"==typeof t?t(e,c):void 0;n(8,b=l&&void 0!==l.json?l.json:e),n(12,ie=l&&void 0!==l.state?l.state:c),n(17,w=void 0),n(23,ae=!1),n(18,U=void 0),oe(b),fe({previousJson:o,previousState:r,previousText:i,previousTextIsRepaired:s});ye(a,null)}function Ue(e,t){a("handleChangeText");var r=ie,o=b,i=w,s={json:b,text:w},c=ae;try{n(8,b=M(e)),n(12,ie=UM(b,ie,[],dA)),n(17,w=void 0),n(23,ae=!1),n(18,U=void 0)}catch(t){try{n(8,b=M(Wl(e))),n(12,ie=UM(b,ie,[],dA)),n(17,w=e),n(23,ae=!0),n(18,U=void 0)}catch(r){n(8,b=void 0),n(12,ie=FM({json:b,expand:dA})),n(17,w=e),n(23,ae=!1),n(18,U=""!==w?U_(w,t.message||String(t)):void 0)}}if("function"==typeof t){var l=t(b,ie);n(8,b=l&&l.json?l.json:b),n(12,ie=l&&l.state?l.state:ie)}oe(b),fe({previousJson:o,previousState:r,previousText:i,previousTextIsRepaired:c});ye(s,null)}function Je(e){if(void 0!==b){var t=e.id,n=e.onTransform,r=e.onClose,o=e.rootPath||[];Z=!0,F({id:t||h,json:b,rootPath:o||[],onTransform:function(e){n?n({operations:e,json:b,transformedJson:oc(b,e)}):(a("onTransform",o,e),ge(e))},onClose:function(){Z=!1,ke(),r&&r()}})}}function Ke(e){a("openJSONEditorModal",{path:e}),Z=!0,V({content:{json:Us(b,e)},path:e,onPatch:se.onPatch,onClose:function(){Z=!1,ke()}})}function Ge(e,t){s(YI,{text:e,onParse:function(e){return V_(e,(function(e){return L_(e,O)}))},onRepair:H_,onApply:t},Ro(Ro({},gs),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ke()}})}function Qe(e){a("openFind",{findAndReplace:e}),n(9,J=!1),n(21,K=!1),ca().then((function(){n(9,J=!0),n(21,K=e)}))}function Ye(){if(!x&&ce.getState().canUndo){var e=ce.undo();if(e){var t={json:b,text:w};n(8,b=e.undo.patch?oc(b,e.undo.patch):e.undo.json),n(12,ie=e.undo.state),n(17,w=e.undo.text),n(23,ae=e.undo.textIsRepaired),n(18,U=void 0),a("undo",{item:e,json:b}),ye(t,e.undo.patch&&e.redo.patch?{json:b,previousJson:t.json,redo:e.undo.patch,undo:e.redo.patch}:null),ke(),ie.selection&&Se(GA(ie.selection),!1)}}}function Xe(){if(!x&&ce.getState().canRedo){var e=ce.redo();if(e){var t={json:b,text:w};n(8,b=e.redo.patch?oc(b,e.redo.patch):e.redo.json),n(12,ie=e.redo.state),n(17,w=e.redo.text),n(23,ae=e.redo.textIsRepaired),n(18,U=void 0),a("redo",{item:e,json:b}),ye(t,e.undo.patch&&e.redo.patch?{json:b,previousJson:t.json,redo:e.redo.patch,undo:e.undo.patch}:null),ke(),ie.selection&&Se(GA(ie.selection),!1)}}}function Ze(e,t){n(76,ee[t]=e.getBoundingClientRect().height,ee)}return e.$$set=function(e){"readOnly"in e&&n(0,x=e.readOnly),"externalContent"in e&&n(53,k=e.externalContent),"externalSelection"in e&&n(54,j=e.externalSelection),"mainMenuBar"in e&&n(1,S=e.mainMenuBar),"escapeControlCharacters"in e&&n(55,C=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(56,$=e.escapeUnicodeCharacters),"flattenColumns"in e&&n(57,_=e.flattenColumns),"parser"in e&&n(2,O=e.parser),"parseMemoizeOne"in e&&n(58,M=e.parseMemoizeOne),"validator"in e&&n(59,A=e.validator),"validationParser"in e&&n(60,E=e.validationParser),"indentation"in e&&n(3,P=e.indentation),"onChange"in e&&n(61,T=e.onChange),"onChangeMode"in e&&n(4,R=e.onChangeMode),"onSelect"in e&&n(62,N=e.onSelect),"onRenderValue"in e&&n(63,I=e.onRenderValue),"onRenderMenu"in e&&n(5,D=e.onRenderMenu),"onRenderContextMenu"in e&&n(64,z=e.onRenderContextMenu),"onFocus"in e&&n(65,q=e.onFocus),"onBlur"in e&&n(66,B=e.onBlur),"onSortModal"in e&&n(67,L=e.onSortModal),"onTransformModal"in e&&n(68,F=e.onTransformModal),"onJSONEditorModal"in e&&n(69,V=e.onJSONEditorModal)},e.$$.update=function(){50331648&e.$$.dirty[1]&&n(75,p=cO({escapeControlCharacters:C,escapeUnicodeCharacters:$})),512&e.$$.dirty[0]&&function(e){if(g){var t=e?As:-100;g.scrollTo({top:n(15,g.scrollTop+=t,g),left:g.scrollLeft})}}(J),4194304&e.$$.dirty[1]&&ue(k),8388608&e.$$.dirty[1]&&function(e){Ex(ie.selection,e)||(a("applyExternalSelection",e),(wA(e)||null===e)&&re(e))}(j),3328&e.$$.dirty[0]|67108864&e.$$.dirty[1]&&n(11,X=Rs(b)?function(e,t){var n,r=new Set(t.map(ec)),o=new Set(e.map(ec)),i=bo(r);try{for(i.s();!(n=i.n()).done;){var a=n.value;o.has(a)||r.delete(a)}}catch(e){i.e(e)}finally{i.f()}var s,c=bo(o);try{for(c.s();!(s=c.n()).done;){var l=s.value;r.has(l)||r.add(l)}}catch(e){c.e(e)}finally{c.f()}return Bo(r).map(Zs)}(Bq(b,_,Y),X):[]),2304&e.$$.dirty[0]&&n(22,Q=!(!b||Ax(X))),1280&e.$$.dirty[0]&&n(28,r=Array.isArray(b)&&b.length>Y),768&e.$$.dirty[0]|114688&e.$$.dirty[2]&&n(27,o=Vq(ne,te,b,ee,c6,J?As:0)),256&e.$$.dirty[0]&&g&&g.scrollTo({top:g.scrollTop,left:g.scrollLeft}),4357&e.$$.dirty[0]|8194&e.$$.dirty[2]&&n(25,se={readOnly:x,parser:O,normalization:p,getJson:function(){return b},getDocumentState:function(){return ie},findElement:_e,findNextInside:xe,focus:ke,onPatch:ge,onSelect:re,onFind:be,onPasteJson:we,onRenderValue:I}),260&e.$$.dirty[0]|805306368&e.$$.dirty[1]&&ve(b,A,O,E),10240&e.$$.dirty[0]&&n(26,i=Jq(de,X))},[x,S,O,P,R,D,ke,function(){if(ae&&void 0!==b){var e=ie,t=b,r=w,o={json:b,text:w},i=ae;n(17,w=void 0),n(23,ae=!1),oe(b),fe({previousJson:t,previousState:e,previousText:r,previousTextIsRepaired:i});ye(o,null)}return{json:b,text:w}},b,J,Y,X,ie,de,m,g,y,w,U,H,W,K,Q,ae,le,se,i,o,r,v,function(e){n(20,W=e)},function(e){return G.apply(this,arguments)},function(){n(9,J=!1),n(21,K=!1),ke()},function(e){if(!x){a("onSortByHeader",e);var t=e.sortDirection===ts.desc?-1:1;ge(Gz(b,[],e.path,t),(function(t,n){return{state:Ro(Ro({},n),{},{sortedColumn:e})}}))}},ge,function(e){n(78,ne=e.target.scrollTop)},function(e){var t=e.target,n=EO(t);if(n){if(LA(ie.selection)&&JA(b,ie.selection,n))return;re(IA(n,!1)),e.preventDefault()}t.isContentEditable||ke()},Oe,Me,function(e){Oe({anchor:OO(e.target,"BUTTON"),offsetTop:0,width:Ms,height:Os,showTip:!0})},function(){return Te.apply(this,arguments)},function(){a("clear pasted json"),n(19,H=void 0),ke()},function(){R(Qa.text)},function(e){var t=RO(e);if(a("keydown",{combo:t,key:e.key}),"Ctrl+X"===t&&(e.preventDefault(),Ne(!0)),"Ctrl+Shift+X"===t&&(e.preventDefault(),Ne(!1)),"Ctrl+C"===t&&(e.preventDefault(),De(!0)),"Ctrl+Shift+C"===t&&(e.preventDefault(),De(!1)),"Ctrl+D"===t&&e.preventDefault(),"Delete"!==t&&"Backspace"!==t||(e.preventDefault(),qe()),"Insert"===t&&e.preventDefault(),"Ctrl+A"===t&&e.preventDefault(),"Ctrl+Q"===t&&Me(e),"ArrowLeft"===t&&(e.preventDefault(),je(),ie.selection)){var n=function(e,t){var n=Wq(GA(t),e),r=n.rowIndex,o=n.columnIndex;return o>0?IA(Uq({rowIndex:r,columnIndex:o-1},e),!1):t}(X,ie.selection);re(n),$e(GA(n))}if("ArrowRight"===t&&(e.preventDefault(),je(),ie.selection)){var r=function(e,t){var n=Wq(GA(t),e),r=n.rowIndex,o=n.columnIndex;return o0?IA(Uq({rowIndex:r-1,columnIndex:o},e),!1):t}(X,ie.selection);re(o),$e(GA(o))}if("ArrowDown"===t&&(e.preventDefault(),je(),ie.selection)){var i=function(e,t,n){var r=Wq(GA(n),t),o=r.rowIndex,i=r.columnIndex;return o1?" (".concat(e[20].length,")"):""),onClose:e[27]}});var w={mode:e[23].mode,content:e[23].content,selection:e[23].selection,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[24],validator:e[11],validationParser:e[12],pathParser:e[13],insideModal:!0,onError:e[31],onChange:e[28],onChangeMode:e[30],onSelect:e[29],onRenderValue:e[14],onClassName:e[15],onFocus:GL,onBlur:GL,onRenderMenu:e[16],onRenderContextMenu:e[17],onSortModal:e[18],onTransformModal:e[19],onJSONEditorModal:e[32]};d=new m6({props:w}),e[37](d);var x=e[22]&&y6(e),k=e[20].length>1&&b6(e);function j(e,t){return e[0]?w6:x6}var S=j(e),C=S(e);return{c:function(){t=ji("div"),Pa(n.$$.fragment),r=$i(),o=ji("div"),(i=ji("div")).innerHTML='
Path
',a=$i(),s=ji("input"),c=$i(),(l=ji("div")).innerHTML='
Contents
',u=$i(),f=ji("div"),Pa(d.$$.fragment),h=$i(),v=ji("div"),x&&x.c(),p=$i(),k&&k.c(),m=$i(),C.c(),Ei(i,"class","jse-label svelte-1m3nfgb"),Ei(s,"class","jse-path svelte-1m3nfgb"),Ei(s,"type","text"),s.readOnly=!0,Ei(s,"title","Selected path"),s.value=e[25],Ei(l,"class","jse-label svelte-1m3nfgb"),Ei(f,"class","jse-modal-inline-editor svelte-1m3nfgb"),Ei(v,"class","jse-actions svelte-1m3nfgb"),Ei(o,"class","jse-modal-contents svelte-1m3nfgb"),Ei(t,"class","jse-modal jse-jsoneditor-modal svelte-1m3nfgb")},m:function(w,j){wi(w,t,j),Ta(n,t,null),pi(t,r),pi(t,o),pi(o,i),pi(o,a),pi(o,s),pi(o,c),pi(o,l),pi(o,u),pi(o,f),Ta(d,f,null),pi(o,h),pi(o,v),x&&x.m(v,null),pi(v,p),k&&k.m(v,null),pi(v,m),C.m(v,null),g=!0,y||(b=ci(JI.call(null,t,e[27])),y=!0)},p:function(e,t){var r={};1048576&t[0]&&(r.title="Edit nested content "+(e[20].length>1?" (".concat(e[20].length,")"):"")),n.$set(r),(!g||33554432&t[0]&&s.value!==e[25])&&(s.value=e[25]);var o={};8388608&t[0]&&(o.mode=e[23].mode),8388608&t[0]&&(o.content=e[23].content),8388608&t[0]&&(o.selection=e[23].selection),1&t[0]&&(o.readOnly=e[0]),2&t[0]&&(o.indentation=e[1]),4&t[0]&&(o.tabSize=e[2]),32&t[0]&&(o.statusBar=e[5]),64&t[0]&&(o.askToFormat=e[6]),8&t[0]&&(o.mainMenuBar=e[3]),16&t[0]&&(o.navigationBar=e[4]),128&t[0]&&(o.escapeControlCharacters=e[7]),256&t[0]&&(o.escapeUnicodeCharacters=e[8]),512&t[0]&&(o.flattenColumns=e[9]),1024&t[0]&&(o.parser=e[10]),16777216&t[0]&&(o.parseMemoizeOne=e[24]),2048&t[0]&&(o.validator=e[11]),4096&t[0]&&(o.validationParser=e[12]),8192&t[0]&&(o.pathParser=e[13]),16384&t[0]&&(o.onRenderValue=e[14]),32768&t[0]&&(o.onClassName=e[15]),65536&t[0]&&(o.onRenderMenu=e[16]),131072&t[0]&&(o.onRenderContextMenu=e[17]),262144&t[0]&&(o.onSortModal=e[18]),524288&t[0]&&(o.onTransformModal=e[19]),d.$set(o),e[22]?x?x.p(e,t):((x=y6(e)).c(),x.m(v,p)):x&&(x.d(1),x=null),e[20].length>1?k?(k.p(e,t),1048576&t[0]&&xa(k,1)):((k=b6(e)).c(),xa(k,1),k.m(v,m)):k&&(ba(),ka(k,1,1,(function(){k=null})),wa()),S===(S=j(e))&&C?C.p(e,t):(C.d(1),(C=S(e))&&(C.c(),C.m(v,null)))},i:function(e){g||(xa(n.$$.fragment,e),xa(d.$$.fragment,e),xa(k),g=!0)},o:function(e){ka(n.$$.fragment,e),ka(d.$$.fragment,e),ka(k),g=!1},d:function(r){r&&xi(t),Ra(n),e[37](null),Ra(d),x&&x.d(),k&&k.d(),C.d(),y=!1,b()}}}function j6(e){e.focus()}function S6(e,t,n){var r,o,i,a,s,c=Da("jsoneditor:JSONEditorModal"),l=t.content,u=t.path,f=t.onPatch,d=t.readOnly,h=t.indentation,v=t.tabSize,p=t.mainMenuBar,m=t.navigationBar,g=t.statusBar,y=t.askToFormat,b=t.escapeControlCharacters,w=t.escapeUnicodeCharacters,x=t.flattenColumns,k=t.parser,j=t.validator,S=t.validationParser,C=t.pathParser,$=t.onRenderValue,_=t.onClassName,O=t.onRenderMenu,M=t.onRenderContextMenu,A=t.onSortModal,E=t.onTransformModal,P=Zi("simple-modal").close,T={mode:I(l),content:l,selection:null,relativePath:u},R=[T],N=void 0;function I(e){return Q_(e)&&Rs(e.json)?Qa.table:Qa.tree}function D(){var e,t=(null===(e=gb(R))||void 0===e?void 0:e.selection)||null;wA(t)&&s.scrollTo(GA(t))}return e.$$set=function(e){"content"in e&&n(33,l=e.content),"path"in e&&n(34,u=e.path),"onPatch"in e&&n(35,f=e.onPatch),"readOnly"in e&&n(0,d=e.readOnly),"indentation"in e&&n(1,h=e.indentation),"tabSize"in e&&n(2,v=e.tabSize),"mainMenuBar"in e&&n(3,p=e.mainMenuBar),"navigationBar"in e&&n(4,m=e.navigationBar),"statusBar"in e&&n(5,g=e.statusBar),"askToFormat"in e&&n(6,y=e.askToFormat),"escapeControlCharacters"in e&&n(7,b=e.escapeControlCharacters),"escapeUnicodeCharacters"in e&&n(8,w=e.escapeUnicodeCharacters),"flattenColumns"in e&&n(9,x=e.flattenColumns),"parser"in e&&n(10,k=e.parser),"validator"in e&&n(11,j=e.validator),"validationParser"in e&&n(12,S=e.validationParser),"pathParser"in e&&n(13,C=e.pathParser),"onRenderValue"in e&&n(14,$=e.onRenderValue),"onClassName"in e&&n(15,_=e.onClassName),"onRenderMenu"in e&&n(16,O=e.onRenderMenu),"onRenderContextMenu"in e&&n(17,M=e.onRenderContextMenu),"onSortModal"in e&&n(18,A=e.onSortModal),"onTransformModal"in e&&n(19,E=e.onTransformModal)},e.$$.update=function(){1048576&e.$$.dirty[0]&&n(23,r=gb(R)||T),1048576&e.$$.dirty[0]&&n(36,o=R.flatMap((function(e){return e.relativePath}))),32&e.$$.dirty[1]&&n(25,i=Ax(o)?"(document root)":GO(o)),1024&e.$$.dirty[0]&&n(24,a=zq(k.parse))},[d,h,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O,M,A,E,R,s,N,r,a,i,function(){if(c("handleApply"),!d)try{n(22,N=void 0);var e=r.relativePath,t=r.content,o=[{op:"replace",path:ec(e),value:X_(t,k).json}];if(R.length>1){var i={json:oc(X_(R[R.length-2].content,k).json,o)},a=Ro(Ro({},R[R.length-2]||T),{},{content:i});n(20,R=[].concat(Bo(R.slice(0,R.length-2)),[a])),ca().then(D)}else f(o),P()}catch(e){n(22,N=String(e))}},function(){c("handleClose"),R.length>1?(n(20,R=Zw(R)),ca().then(D),n(22,N=void 0)):P()},function(e){c("handleChange",e);var t=Ro(Ro({},r),{},{content:e});n(20,R=[].concat(Bo(Zw(R)),[t]))},function(e){c("handleChangeSelection",e);var t=Ro(Ro({},r),{},{selection:e});n(20,R=[].concat(Bo(Zw(R)),[t]))},function(e){c("handleChangeMode",e);var t=Ro(Ro({},r),{},{mode:e});n(20,R=[].concat(Bo(Zw(R)),[t]))},function(e){n(22,N=e.toString()),console.error(e)},function(e){var t=e.content,r=e.path;c("handleJSONEditorModal",{content:t,path:r});var o={mode:I(t),content:t,selection:null,relativePath:r};n(20,R=[].concat(Bo(R),[o]))},l,u,f,o,function(e){na[e?"unshift":"push"]((function(){n(21,s=e)}))}]}var C6=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,S6,k6,Zo,{content:33,path:34,onPatch:35,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,onRenderContextMenu:17,onSortModal:18,onTransformModal:19},g6,[-1,-1]),n}return Eo(t,Ia),Do(t)}();function $6(e,t,n){var r=Zi("simple-modal");return[r.open,r.close]}var _6=function(e){function t(e){var n;return No(this,t),Na(Ao(n=_o(this,t)),e,$6,null,Zo,{open:0,close:1}),n}return Eo(t,Ia),Do(t,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),t}();function O6(e){mi(e,"svelte-ybuk0j",'.jse-main.svelte-ybuk0j{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);font-size:var(--jse-font-size, 16px);line-height:normal;position:relative;display:flex;flex-direction:row}')}function M6(e){var t,n,r={mode:e[1],content:e[0],selection:e[2],readOnly:e[3],indentation:e[4],tabSize:e[5],statusBar:e[8],askToFormat:e[9],mainMenuBar:e[6],navigationBar:e[7],escapeControlCharacters:e[10],escapeUnicodeCharacters:e[11],flattenColumns:e[12],parser:e[13],parseMemoizeOne:e[27],validator:e[14],validationParser:e[15],pathParser:e[16],insideModal:!1,onError:e[21],onChange:e[28],onChangeMode:e[32],onSelect:e[29],onRenderValue:e[17],onClassName:e[18],onFocus:e[30],onBlur:e[31],onRenderMenu:e[19],onRenderContextMenu:e[20],onSortModal:e[34],onTransformModal:e[33],onJSONEditorModal:e[35]};return t=new m6({props:r}),e[62](t),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};2&n[0]&&(r.mode=e[1]),1&n[0]&&(r.content=e[0]),4&n[0]&&(r.selection=e[2]),8&n[0]&&(r.readOnly=e[3]),16&n[0]&&(r.indentation=e[4]),32&n[0]&&(r.tabSize=e[5]),256&n[0]&&(r.statusBar=e[8]),512&n[0]&&(r.askToFormat=e[9]),64&n[0]&&(r.mainMenuBar=e[6]),128&n[0]&&(r.navigationBar=e[7]),1024&n[0]&&(r.escapeControlCharacters=e[10]),2048&n[0]&&(r.escapeUnicodeCharacters=e[11]),4096&n[0]&&(r.flattenColumns=e[12]),8192&n[0]&&(r.parser=e[13]),134217728&n[0]&&(r.parseMemoizeOne=e[27]),16384&n[0]&&(r.validator=e[14]),32768&n[0]&&(r.validationParser=e[15]),65536&n[0]&&(r.pathParser=e[16]),2097152&n[0]&&(r.onError=e[21]),131072&n[0]&&(r.onRenderValue=e[17]),262144&n[0]&&(r.onClassName=e[18]),524288&n[0]&&(r.onRenderMenu=e[19]),1048576&n[0]&&(r.onRenderContextMenu=e[20]),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(n){e[62](null),Ra(t,n)}}}function A6(e){var t,n,r,o,i,a=e[22];function s(t){e[61](t)}var c={};void 0!==e[25]&&(c.open=e[25]),t=new _6({props:c}),na.push((function(){return Ea(t,"open",s)}));var l=M6(e);return{c:function(){Pa(t.$$.fragment),r=$i(),o=ji("div"),l.c(),Ei(o,"class","jse-main svelte-ybuk0j"),qi(o,"jse-focus",e[23])},m:function(e,n){Ta(t,e,n),wi(e,r,n),wi(e,o,n),l.m(o,null),i=!0},p:function(e,r){var s={};!n&&33554432&r[0]&&(n=!0,s.open=e[25],ua((function(){return n=!1}))),t.$set(s),4194304&r[0]&&Zo(a,a=e[22])?(ba(),ka(l,1,1,Wo),wa(),(l=M6(e)).c(),xa(l,1),l.m(o,null)):l.p(e,r),(!i||8388608&r[0])&&qi(o,"jse-focus",e[23])},i:function(e){i||(xa(t.$$.fragment,e),xa(l),i=!0)},o:function(e){ka(t.$$.fragment,e),ka(l),i=!1},d:function(e){e&&(xi(r),xi(o)),Ra(t,e),l.d(e)}}}function E6(e){var t,n;return t=new rs({props:{closeOnEsc:!1,$$slots:{default:[A6]},$$scope:{ctx:e}}}),{c:function(){Pa(t.$$.fragment)},m:function(e,r){Ta(t,e,r),n=!0},p:function(e,n){var r={};201326591&n[0]|8&n[2]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i:function(e){n||(xa(t.$$.fragment,e),n=!0)},o:function(e){ka(t.$$.fragment,e),n=!1},d:function(e){Ra(t,e)}}}function P6(e){for(var t,n,r,o=[{show:null===(t=e[26])||void 0===t?void 0:t.component},ws,{closeOnEsc:!1}],i={$$slots:{default:[E6]},$$scope:{ctx:e}},a=0;a0)return n[0].enum}return null}(r):null}function H6(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=n.slice(1,n.length),i=n[0],a=[r],s=0,c=[r.oneOf,r.anyOf,r.allOf];s0&&b.push.apply(b,Bo(o)),H6(g,t,b,y)}throw Error("Unable to resolve reference ".concat(h))}throw Error("Unable to resolve reference ".concat(h))}var w=h.substring(2).split("/");r=e;var x,k=bo(w);try{for(k.s();!(x=k.n()).done;){var j=x.value;if(!(j in r))throw Error("Unable to resolve reference ".concat(h));r=r[j]}}catch(e){k.e(e)}finally{k.f()}}}if(void 0===i)return r;if("object"===Ho(r.properties)&&null!==r.properties&&i in r.properties)return H6(e,t,o,r=r.properties[i]);if("object"===Ho(r.patternProperties)&&null!==r.patternProperties)for(var S in r.patternProperties)if(i.match(S))return H6(e,t,o,r=r.patternProperties[S]);if("object"===Ho(r.additionalProperties))return H6(e,t,o,r=r.additionalProperties);if("object"===Ho(r.items)&&null!==r.items)return H6(e,t,o,r=r.items)}}catch(e){f.e(e)}finally{f.f()}return null}function W6(e,t,n){var r=V6(t,n,e.path);if(r){var o=e.value,i=e.path,a=e.selection,s=e.parser,c=e.readOnly,l=e.onPatch,u=r.map((function(e){return{value:e,text:e}})),f=r.includes(e.value)?u:[{value:o,text:o}].concat(u);return[{component:F6,props:{value:o,path:i,selection:a,parser:s,readOnly:c,onPatch:l,options:f}}]}return null}var U6,J6={exports:{}},K6={},G6={},Q6={},Y6={},X6={},Z6={};function e8(){return U6||(U6=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;var r=Do((function e(){No(this,e)}));n._CodeOrName=r,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var o=function(e){function t(e){var r;if(No(this,t),r=_o(this,t),!n.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");return r.str=e,r}return Eo(t,e),Do(t,[{key:"toString",value:function(){return this.str}},{key:"emptyStr",value:function(){return!1}},{key:"names",get:function(){return zo({},this.str,1)}}]),t}(r);n.Name=o;var i=function(e){function t(e){var n;return No(this,t),(n=_o(this,t))._items="string"==typeof e?[e]:e,n}return Eo(t,e),Do(t,[{key:"toString",value:function(){return this.str}},{key:"emptyStr",value:function(){if(this._items.length>1)return!1;var e=this._items[0];return""===e||'""'===e}},{key:"str",get:function(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((function(e,t){return"".concat(e).concat(t)}),"")}},{key:"names",get:function(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((function(e,t){return t instanceof o&&(e[t.str]=(e[t.str]||0)+1),e}),{})}}]),t}(r);function a(e){for(var t=[e[0]],n=0,r=arguments.length,o=new Array(r>1?r-1:0),a=1;a1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefixes,r=t.parent;No(this,e),this._names={},this._prefixes=n,this._parent=r}return Do(e,[{key:"toName",value:function(e){return e instanceof s.Name?e:this.name(e)}},{key:"name",value:function(e){return new s.Name(this._newName(e))}},{key:"_newName",value:function(e){var t=this._names[e]||this._nameGroup(e);return"".concat(e).concat(t.index++)}},{key:"_nameGroup",value:function(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error('CodeGen: prefix "'.concat(e,'" is not allowed in this scope'));return this._names[e]={prefix:e,index:0}}}]),e}();e.Scope=l;var u=function(e){function t(e,n){var r;return No(this,t),(r=_o(this,t,[n])).prefix=e,r}return Eo(t,e),Do(t,[{key:"setValue",value:function(e,t){var r=t.property,o=t.itemIndex;this.value=e,this.scopePath=(0,s._)(n||(n=mo([".","[","]"])),new s.Name(r),o)}}]),t}(s.Name);e.ValueScopeName=u;var f=(0,s._)(r||(r=mo(["\n"],["\\n"]))),d=function(n){function r(e){var t;return No(this,r),(t=_o(this,r,[e]))._values={},t._scope=e.scope,t.opts=Ro(Ro({},e),{},{_n:e.lines?f:s.nil}),t}return Eo(r,n),Do(r,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(e){return new u(e,this._newName(e))}},{key:"value",value:function(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");var r=this.toName(e),o=r.prefix,i=null!==(n=t.key)&&void 0!==n?n:t.ref,a=this._values[o];if(a){var s=a.get(i);if(s)return s}else a=this._values[o]=new Map;a.set(i,r);var c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}},{key:"getValue",value:function(e,t){var n=this._values[e];if(n)return n.get(t)}},{key:"scopeRefs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values;return this._reduceValues(t,(function(t){if(void 0===t.scopePath)throw new Error('CodeGen: name "'.concat(t,'" has no value'));return(0,s._)(o||(o=mo(["","",""])),e,t.scopePath)}))}},{key:"scopeCode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return this._reduceValues(e,(function(e){if(void 0===e.value)throw new Error('CodeGen: name "'.concat(e,'" has no value'));return e.value.code}),t,n)}},{key:"_reduceValues",value:function(n,r){var o=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0,f=s.nil,d=function(){var d=n[h];if(!d)return 1;var v=l[h]=l[h]||new Map;d.forEach((function(n){if(!v.has(n)){v.set(n,t.Started);var l=r(n);if(l){var d=o.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,s._)(i||(i=mo(["",""," "," = ",";",""])),f,d,n,l,o.opts._n)}else{if(!(l=null==u?void 0:u(n)))throw new c(n);f=(0,s._)(a||(a=mo(["","","",""])),f,l,o.opts._n)}v.set(n,t.Completed)}}))};for(var h in n)d();return f}}]),r}(l);e.ValueScope=d}(r8)),r8}function i8(){return n8||(n8=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=e8(),n=o8(),r=e8();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 o=o8();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.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 i=function(){function e(){No(this,e)}return Do(e,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(e,t){return this}}]),e}(),a=function(e){function r(e,t,n){var o;return No(this,r),(o=_o(this,r)).varKind=e,o.name=t,o.rhs=n,o}return Eo(r,e),Do(r,[{key:"render",value:function(e){var t=e.es5,r=e._n,o=t?n.varKinds.var:this.varKind,i=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(o," ").concat(this.name).concat(i,";")+r}},{key:"optimizeNames",value:function(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}},{key:"names",get:function(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}]),r}(i),h=function(e){function n(e,t,r){var o;return No(this,n),(o=_o(this,n)).lhs=e,o.rhs=t,o.sideEffects=r,o}return Eo(n,e),Do(n,[{key:"render",value:function(e){var t=e._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+t}},{key:"optimizeNames",value:function(e,n){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,n),this}},{key:"names",get:function(){return N(this.lhs instanceof t.Name?{}:Ro({},this.lhs.names),this.rhs)}}]),n}(i),v=function(e){function t(e,n,r,o){var i;return No(this,t),(i=_o(this,t,[e,r,o])).op=n,i}return Eo(t,e),Do(t,[{key:"render",value:function(e){var t=e._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+t}}]),t}(h),p=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).label=e,n.names={},n}return Eo(t,e),Do(t,[{key:"render",value:function(e){var t=e._n;return"".concat(this.label,":")+t}}]),t}(i),m=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).label=e,n.names={},n}return Eo(t,e),Do(t,[{key:"render",value:function(e){var t=e._n,n=this.label?" ".concat(this.label):"";return"break".concat(n,";")+t}}]),t}(i),g=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).error=e,n}return Eo(t,e),Do(t,[{key:"render",value:function(e){var t=e._n;return"throw ".concat(this.error,";")+t}},{key:"names",get:function(){return this.error.names}}]),t}(i),y=function(e){function n(e){var t;return No(this,n),(t=_o(this,n)).code=e,t}return Eo(n,e),Do(n,[{key:"render",value:function(e){var t=e._n;return"".concat(this.code,";")+t}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(e,t){return this.code=I(this.code,e,t),this}},{key:"names",get:function(){return this.code instanceof t._CodeOrName?this.code.names:{}}}]),n}(i),b=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return No(this,t),(e=_o(this,t)).nodes=n,e}return Eo(t,e),Do(t,[{key:"render",value:function(e){return this.nodes.reduce((function(t,n){return t+n.render(e)}),"")}},{key:"optimizeNodes",value:function(){for(var e=this.nodes,t=e.length;t--;){var n=e[t].optimizeNodes();Array.isArray(n)?e.splice.apply(e,[t,1].concat(Bo(n))):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}},{key:"optimizeNames",value:function(e,t){for(var n=this.nodes,r=n.length;r--;){var o=n[r];o.optimizeNames(e,t)||(D(e,o.names),n.splice(r,1))}return n.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce((function(e,t){return R(e,t.names)}),{})}}]),t}(i),w=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t,[{key:"render",value:function(e){return"{"+e._n+go(Mo(t.prototype),"render",this).call(this,e)+"}"+e._n}}]),t}(b),x=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t)}(b),k=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t)}(w);k.kind="else";var j=function(e){function t(e,n){var r;return No(this,t),(r=_o(this,t,[n])).condition=e,r}return Eo(t,e),Do(t,[{key:"render",value:function(e){var n="if(".concat(this.condition,")")+go(Mo(t.prototype),"render",this).call(this,e);return this.else&&(n+="else "+this.else.render(e)),n}},{key:"optimizeNodes",value:function(){go(Mo(t.prototype),"optimizeNodes",this).call(this);var e=this.condition;if(!0===e)return this.nodes;var n=this.else;if(n){var r=n.optimizeNodes();n=this.else=Array.isArray(r)?new k(r):r}return n?!1===e?n instanceof t?n:n.nodes:this.nodes.length?this:new t(z(e),n instanceof t?[n]:n.nodes):!1!==e&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(e,n){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,n),go(Mo(t.prototype),"optimizeNames",this).call(this,e,n)||this.else)return this.condition=I(this.condition,e,n),this}},{key:"names",get:function(){var e=go(Mo(t.prototype),"names",this);return N(e,this.condition),this.else&&R(e,this.else.names),e}}]),t}(w);j.kind="if";var S=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t)}(w);S.kind="for";var C=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).iteration=e,n}return Eo(t,e),Do(t,[{key:"render",value:function(e){return"for(".concat(this.iteration,")")+go(Mo(t.prototype),"render",this).call(this,e)}},{key:"optimizeNames",value:function(e,n){if(go(Mo(t.prototype),"optimizeNames",this).call(this,e,n))return this.iteration=I(this.iteration,e,n),this}},{key:"names",get:function(){return R(go(Mo(t.prototype),"names",this),this.iteration.names)}}]),t}(S),$=function(e){function t(e,n,r,o){var i;return No(this,t),(i=_o(this,t)).varKind=e,i.name=n,i.from=r,i.to=o,i}return Eo(t,e),Do(t,[{key:"render",value:function(e){var r=e.es5?n.varKinds.var:this.varKind,o=this.name,i=this.from,a=this.to;return"for(".concat(r," ").concat(o,"=").concat(i,"; ").concat(o,"<").concat(a,"; ").concat(o,"++)")+go(Mo(t.prototype),"render",this).call(this,e)}},{key:"names",get:function(){var e=N(go(Mo(t.prototype),"names",this),this.from);return N(e,this.to)}}]),t}(S),_=function(e){function t(e,n,r,o){var i;return No(this,t),(i=_o(this,t)).loop=e,i.varKind=n,i.name=r,i.iterable=o,i}return Eo(t,e),Do(t,[{key:"render",value:function(e){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+go(Mo(t.prototype),"render",this).call(this,e)}},{key:"optimizeNames",value:function(e,n){if(go(Mo(t.prototype),"optimizeNames",this).call(this,e,n))return this.iterable=I(this.iterable,e,n),this}},{key:"names",get:function(){return R(go(Mo(t.prototype),"names",this),this.iterable.names)}}]),t}(S),O=function(e){function t(e,n,r){var o;return No(this,t),(o=_o(this,t)).name=e,o.args=n,o.async=r,o}return Eo(t,e),Do(t,[{key:"render",value:function(e){var n=this.async?"async ":"";return"".concat(n,"function ").concat(this.name,"(").concat(this.args,")")+go(Mo(t.prototype),"render",this).call(this,e)}}]),t}(w);O.kind="func";var M=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t,[{key:"render",value:function(e){return"return "+go(Mo(t.prototype),"render",this).call(this,e)}}]),t}(b);M.kind="return";var A=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t,[{key:"render",value:function(e){var n="try"+go(Mo(t.prototype),"render",this).call(this,e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}},{key:"optimizeNodes",value:function(){var e,n;return go(Mo(t.prototype),"optimizeNodes",this).call(this),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(n=this.finally)||void 0===n||n.optimizeNodes(),this}},{key:"optimizeNames",value:function(e,n){var r,o;return go(Mo(t.prototype),"optimizeNames",this).call(this,e,n),null===(r=this.catch)||void 0===r||r.optimizeNames(e,n),null===(o=this.finally)||void 0===o||o.optimizeNames(e,n),this}},{key:"names",get:function(){var e=go(Mo(t.prototype),"names",this);return this.catch&&R(e,this.catch.names),this.finally&&R(e,this.finally.names),e}}]),t}(w),E=function(e){function t(e){var n;return No(this,t),(n=_o(this,t)).error=e,n}return Eo(t,e),Do(t,[{key:"render",value:function(e){return"catch(".concat(this.error,")")+go(Mo(t.prototype),"render",this).call(this,e)}}]),t}(w);E.kind="catch";var P=function(e){function t(){return No(this,t),_o(this,t,arguments)}return Eo(t,e),Do(t,[{key:"render",value:function(e){return"finally"+go(Mo(t.prototype),"render",this).call(this,e)}}]),t}(w);P.kind="finally";var T=function(){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};No(this,r),this._values={},this._blockStarts=[],this._constants={},this.opts=Ro(Ro({},t),{},{_n:t.lines?"\n":""}),this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new x]}return Do(r,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(e){return this._scope.name(e)}},{key:"scopeName",value:function(e){return this._extScope.name(e)}},{key:"scopeValue",value:function(e,t){var n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}},{key:"getScopeValue",value:function(e,t){return this._extScope.getValue(e,t)}},{key:"scopeRefs",value:function(e){return this._extScope.scopeRefs(e,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(e,t,n,r){var o=this._scope.toName(t);return void 0!==n&&r&&(this._constants[o.str]=n),this._leafNode(new a(e,o,n)),o}},{key:"const",value:function(e,t,r){return this._def(n.varKinds.const,e,t,r)}},{key:"let",value:function(e,t,r){return this._def(n.varKinds.let,e,t,r)}},{key:"var",value:function(e,t,r){return this._def(n.varKinds.var,e,t,r)}},{key:"assign",value:function(e,t,n){return this._leafNode(new h(e,t,n))}},{key:"add",value:function(t,n){return this._leafNode(new v(t,e.operators.ADD,n))}},{key:"code",value:function(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new y(e)),this}},{key:"object",value:function(){for(var e=["{"],n=arguments.length,r=new Array(n),o=0;o1&&e.push(","),e.push(c),(c!==l||this.opts.es5)&&(e.push(":"),(0,t.addCodeArg)(e,l))}return e.push("}"),new t._Code(e)}},{key:"if",value:function(e,t,n){if(this._blockNode(new j(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(e){return this._elseNode(new j(e))}},{key:"else",value:function(){return this._elseNode(new k)}},{key:"endIf",value:function(){return this._endBlockNode(j,k)}},{key:"_for",value:function(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}},{key:"for",value:function(e,t){return this._for(new C(e),t)}},{key:"forRange",value:function(e,t,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?n.varKinds.var:n.varKinds.let,a=this._scope.toName(e);return this._for(new $(i,a,t,r),(function(){return o(a)}))}},{key:"forOf",value:function(e,r,o){var i=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.varKinds.const,l=this._scope.toName(e);if(this.opts.es5){var u=r instanceof t.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,t._)(s||(s=mo(["",".length"])),u),(function(e){i.var(l,(0,t._)(c||(c=mo(["","[","]"])),u,e)),o(l)}))}return this._for(new _("of",a,l,r),(function(){return o(l)}))}},{key:"forIn",value:function(e,r,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?n.varKinds.var:n.varKinds.const;if(this.opts.ownProperties)return this.forOf(e,(0,t._)(l||(l=mo(["Object.keys(",")"])),r),o);var a=this._scope.toName(e);return this._for(new _("in",i,a,r),(function(){return o(a)}))}},{key:"endFor",value:function(){return this._endBlockNode(S)}},{key:"label",value:function(e){return this._leafNode(new p(e))}},{key:"break",value:function(e){return this._leafNode(new m(e))}},{key:"return",value:function(e){var t=new M;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}},{key:"try",value:function(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');var r=new A;if(this._blockNode(r),this.code(e),t){var o=this.name("e");this._currNode=r.catch=new E(o),t(o)}return n&&(this._currNode=r.finally=new P,this.code(n)),this._endBlockNode(E,P)}},{key:"throw",value:function(e){return this._leafNode(new g(e))}},{key:"block",value:function(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}},{key:"endBlock",value:function(e){var t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");var n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error("CodeGen: wrong number of nodes: ".concat(n," vs ").concat(e," expected"));return this._nodes.length=t,this}},{key:"func",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.nil,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;return this._blockNode(new O(e,n,r)),o&&this.code(o).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(O)}},{key:"optimize",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(e){return this._currNode.nodes.push(e),this}},{key:"_blockNode",value:function(e){this._currNode.nodes.push(e),this._nodes.push(e)}},{key:"_endBlockNode",value:function(e,t){var n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(t?"".concat(e.kind,"/").concat(t.kind):e.kind,'"'))}},{key:"_elseNode",value:function(e){var t=this._currNode;if(!(t instanceof j))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var e=this._nodes;return e[e.length-1]},set:function(e){var t=this._nodes;t[t.length-1]=e}}]),r}();function R(e,t){for(var n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function N(e,n){return n instanceof t._CodeOrName?R(e,n.names):e}function I(e,n,r){return e instanceof t.Name?i(e):(o=e)instanceof t._Code&&o._items.some((function(e){return e instanceof t.Name&&1===n[e.str]&&void 0!==r[e.str]}))?new t._Code(e._items.reduce((function(e,n){return n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push.apply(e,Bo(n._items)):e.push(n),e}),[])):e;var o;function i(e){var t=r[e.str];return void 0===t||1!==n[e.str]?e:(delete n[e.str],t)}}function D(e,t){for(var n in t)e[n]=(e[n]||0)-(t[n]||0)}function z(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,t._)(u||(u=mo(["!",""])),F(e))}e.CodeGen=T,e.not=z;var q=L(e.operators.AND);e.and=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:e.schema,n=e.opts,r=e.self;if(n.strictSchema&&"boolean"!=typeof t){var o=r.RULES.keywords;for(var i in t)o[i]||d(e,'unknown keyword: "'.concat(i,'"'))}}function o(e,t){if("boolean"==typeof e)return!e;for(var n in e)if(t[n])return!0;return!1}function i(e){return"number"==typeof e?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")}function a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function s(e){var n=e.mergeNames,r=e.mergeToName,o=e.mergeValues,i=e.resultToName;return function(e,a,s,c){var l=void 0===s?a:s instanceof t.Name?(a instanceof t.Name?n(e,a,s):r(e,a,s),s):a instanceof t.Name?(r(e,s,a),a):o(a,s);return c!==t.Name||l instanceof t.Name?l:i(e,l)}}function c(e,n){if(!0===n)return e.var("props",!0);var r=e.var("props",(0,t._)(C||(C=mo(["{}"]))));return void 0!==n&&l(e,r,n),r}function l(e,n,r){Object.keys(r).forEach((function(r){return e.assign((0,t._)($||($=mo(["","",""])),n,(0,t.getProperty)(r)),!0)}))}e.toHash=function(e){var t,n={},r=bo(e);try{for(r.s();!(t=r.n()).done;){n[t.value]=!0}}catch(e){r.e(e)}finally{r.f()}return n},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!o(t,e.self.RULES.all))},e.checkUnknownRules=r,e.schemaHasRules=o,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(var n in e)if("$ref"!==n&&t.all[n])return!0;return!1},e.schemaRefOrVal=function(e,n,r,o){var i=e.topSchemaRef,a=e.schemaPath;if(!o){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return(0,t._)(h||(h=mo(["",""])),n)}return(0,t._)(v||(v=mo(["","","",""])),i,a,(0,t.getProperty)(r))},e.unescapeFragment=function(e){return a(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(i(e))},e.escapeJsonPointer=i,e.unescapeJsonPointer=a,e.eachItem=function(e,t){if(Array.isArray(e)){var n,r=bo(e);try{for(r.s();!(n=r.n()).done;){t(n.value)}}catch(e){r.e(e)}finally{r.f()}}else t(e)},e.mergeEvaluated={props:s({mergeNames:function(e,n,r){return e.if((0,t._)(p||(p=mo([""," !== true && "," !== undefined"])),r,n),(function(){e.if((0,t._)(m||(m=mo([""," === true"])),n),(function(){return e.assign(r,!0)}),(function(){return e.assign(r,(0,t._)(g||(g=mo([""," || {}"])),r)).code((0,t._)(y||(y=mo(["Object.assign(",", ",")"])),r,n))}))}))},mergeToName:function(e,n,r){return e.if((0,t._)(b||(b=mo([""," !== true"])),r),(function(){!0===n?e.assign(r,!0):(e.assign(r,(0,t._)(w||(w=mo([""," || {}"])),r)),l(e,r,n))}))},mergeValues:function(e,t){return!0===e||Ro(Ro({},e),t)},resultToName:c}),items:s({mergeNames:function(e,n,r){return e.if((0,t._)(x||(x=mo([""," !== true && "," !== undefined"])),r,n),(function(){return e.assign(r,(0,t._)(k||(k=mo([""," === true ? true : "," > "," ? "," : ",""])),n,r,n,r,n))}))},mergeToName:function(e,n,r){return e.if((0,t._)(j||(j=mo([""," !== true"])),r),(function(){return e.assign(r,!0===n||(0,t._)(S||(S=mo([""," > "," ? "," : ",""])),r,n,r,n))}))},mergeValues:function(e,t){return!0===e||Math.max(e,t)},resultToName:function(e,t){return e.var("items",t)}})},e.evaluatedPropsToName=c,e.setEvaluated=l;var u,f={};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.opts.strictSchema;if(n){if(t="strict mode: ".concat(t),!0===n)throw new Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u=e.Type||(e.Type={})),e.getErrorPath=function(e,n,r){if(e instanceof t.Name){var o=n===u.Num;return r?o?(0,t._)(_||(_=mo(['"[" + ',' + "]"'])),e):(0,t._)(O||(O=mo(['"[\'" + ',' + "\']"'])),e):o?(0,t._)(M||(M=mo(['"/" + ',""])),e):(0,t._)(A||(A=mo(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),e)}return r?(0,t.getProperty)(e).toString():"/"+i(e)},e.checkStrictMode=d}(a8);var s8,c8,l8,u8={};function f8(){if(s8)return u8;s8=1,Object.defineProperty(u8,"__esModule",{value:!0});var e=i8(),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 u8.default=t,u8}function d8(){return c8||(c8=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=i8(),n=a8,r=f8();function o(e,n){var o=e.const("err",n);e.if((0,t._)(H||(H=mo([""," === null"])),r.default.vErrors),(function(){return e.assign(r.default.vErrors,(0,t._)(W||(W=mo(["[","]"])),o))}),(0,t._)(U||(U=mo(["",".push(",")"])),r.default.vErrors,o)),e.code((0,t._)(J||(J=mo(["","++"])),r.default.errors))}function i(e,n){var r=e.gen,o=e.validateName;e.schemaEnv.$async?r.throw((0,t._)(K||(K=mo(["new ","(",")"])),e.ValidationError,n)):(r.assign((0,t._)(G||(G=mo(["",".errors"])),o),n),r.return(!1))}e.keywordError={message:function(e){var n=e.keyword;return(0,t.str)(E||(E=mo(['must pass "','" keyword validation'])),n)}},e.keyword$DataError={message:function(e){var n=e.keyword,r=e.schemaType;return r?(0,t.str)(P||(P=mo(['"','" keyword must be '," ($data)"])),n,r):(0,t.str)(T||(T=mo(['"','" keyword is invalid ($data)'])),n)}},e.reportError=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.keywordError,a=arguments.length>2?arguments[2]:void 0,c=arguments.length>3?arguments[3]:void 0,l=n.it,u=l.gen,f=l.compositeRule,d=l.allErrors,h=s(n,r,a);(null!=c?c:f||d)?o(u,h):i(l,(0,t._)(R||(R=mo(["[","]"])),h))},e.reportExtraError=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.keywordError,a=arguments.length>2?arguments[2]:void 0,c=t.it,l=c.gen,u=c.compositeRule,f=c.allErrors;o(l,s(t,n,a)),u||f||i(c,r.default.vErrors)},e.resetErrorsCount=function(e,n){e.assign(r.default.errors,n),e.if((0,t._)(N||(N=mo([""," !== null"])),r.default.vErrors),(function(){return e.if(n,(function(){return e.assign((0,t._)(I||(I=mo(["",".length"])),r.default.vErrors),n)}),(function(){return e.assign(r.default.vErrors,null)}))}))},e.extendErrors=function(e){var n=e.gen,o=e.keyword,i=e.schemaValue,a=e.data,s=e.errsCount,c=e.it;if(void 0===s)throw new Error("ajv implementation error");var l=n.name("err");n.forRange("i",s,r.default.errors,(function(e){n.const(l,(0,t._)(D||(D=mo(["","[","]"])),r.default.vErrors,e)),n.if((0,t._)(z||(z=mo(["",".instancePath === undefined"])),l),(function(){return n.assign((0,t._)(q||(q=mo(["",".instancePath"])),l),(0,t.strConcat)(r.default.instancePath,c.errorPath))})),n.assign((0,t._)(B||(B=mo(["",".schemaPath"])),l),(0,t.str)(L||(L=mo(["","/",""])),c.errSchemaPath,o)),c.opts.verbose&&(n.assign((0,t._)(F||(F=mo(["",".schema"])),l),i),n.assign((0,t._)(V||(V=mo(["",".data"])),l),a))}))};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(e,n,o){return!1===e.it.createErrors?(0,t._)(Q||(Q=mo(["{}"]))):function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.gen,s=e.it,u=[c(s,o),l(e,o)];return function(e,n,o){var i=n.params,s=n.message,c=e.keyword,l=e.data,u=e.schemaValue,f=e.it,d=f.opts,h=f.propertyName,v=f.topSchemaRef,p=f.schemaPath;o.push([a.keyword,c],[a.params,"function"==typeof i?i(e):i||(0,t._)(ee||(ee=mo(["{}"])))]),d.messages&&o.push([a.message,"function"==typeof s?s(e):s]);d.verbose&&o.push([a.schema,u],[a.parentSchema,(0,t._)(te||(te=mo(["","",""])),v,p)],[r.default.data,l]);h&&o.push([a.propertyName,h])}(e,n,u),i.object.apply(i,u)}(e,n,o)}function c(e,o){var i=e.errorPath,a=o.instancePath,s=a?(0,t.str)(Y||(Y=mo(["","",""])),i,(0,n.getErrorPath)(a,n.Type.Str)):i;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)]}function l(e,r){var o=e.keyword,i=e.it.errSchemaPath,s=r.schemaPath,c=r.parentSchema?i:(0,t.str)(X||(X=mo(["","/",""])),i,o);return s&&(c=(0,t.str)(Z||(Z=mo(["","",""])),c,(0,n.getErrorPath)(s,n.Type.Str))),[a.schemaPath,c]}}(Y6)),Y6}var h8={},v8={};Object.defineProperty(v8,"__esModule",{value:!0}),v8.getRules=v8.isJSONType=void 0;var p8=new Set(["string","number","integer","boolean","null","object","array"]);v8.isJSONType=function(e){return"string"==typeof e&&p8.has(e)},v8.getRules=function(){var e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ro(Ro({},e),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var m8,g8={};function y8(){if(m8)return g8;function e(e,n){return n.rules.some((function(n){return t(e,n)}))}function t(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((function(t){return void 0!==e[t]})))}return m8=1,Object.defineProperty(g8,"__esModule",{value:!0}),g8.shouldUseRule=g8.shouldUseGroup=g8.schemaHasRulesForType=void 0,g8.schemaHasRulesForType=function(t,n){var r=t.schema,o=t.self.RULES.types[n];return o&&!0!==o&&e(r,o)},g8.shouldUseGroup=e,g8.shouldUseRule=t,g8}!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=v8,r=y8(),o=d8(),i=i8(),a=a8;function s(e){var t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(t=e.DataType||(e.DataType={})),e.getSchemaTypes=function(e){var t=s(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=s,e.coerceAndCheckDataType=function(e,n){var o=e.gen,a=e.data,s=e.opts,l=function(e,t){return t?e.filter((function(e){return c.has(e)||"array"===t&&"array"===e})):[]}(n,s.coerceTypes),f=n.length>0&&!(0===l.length&&1===n.length&&(0,r.schemaHasRulesForType)(e,n[0]));if(f){var h=u(n,a,s.strictNumbers,t.Wrong);o.if(h,(function(){l.length?function(e,t,n){var r=e.gen,o=e.data,a=e.opts,s=r.let("dataType",(0,i._)(re||(re=mo(["typeof ",""])),o)),l=r.let("coerced",(0,i._)(oe||(oe=mo(["undefined"]))));"array"===a.coerceTypes&&r.if((0,i._)(ie||(ie=mo([""," == 'object' && Array.isArray(",") && ",".length == 1"])),s,o,o),(function(){return r.assign(o,(0,i._)(ae||(ae=mo(["","[0]"])),o)).assign(s,(0,i._)(se||(se=mo(["typeof ",""])),o)).if(u(t,o,a.strictNumbers),(function(){return r.assign(l,o)}))}));r.if((0,i._)(ce||(ce=mo([""," !== undefined"])),l));var f,h=bo(n);try{for(h.s();!(f=h.n()).done;){var v=f.value;(c.has(v)||"array"===v&&"array"===a.coerceTypes)&&p(v)}}catch(e){h.e(e)}finally{h.f()}function p(e){switch(e){case"string":return void r.elseIf((0,i._)(ue||(ue=mo(["",' == "number" || ',' == "boolean"'])),s,s)).assign(l,(0,i._)(fe||(fe=mo(['"" + ',""])),o)).elseIf((0,i._)(de||(de=mo([""," === null"])),o)).assign(l,(0,i._)(he||(he=mo(['""']))));case"number":return void r.elseIf((0,i._)(ve||(ve=mo(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),s,o,s,o,o,o)).assign(l,(0,i._)(pe||(pe=mo(["+",""])),o));case"integer":return void r.elseIf((0,i._)(me||(me=mo(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),s,o,s,o,o,o,o)).assign(l,(0,i._)(ge||(ge=mo(["+",""])),o));case"boolean":return void r.elseIf((0,i._)(ye||(ye=mo(["",' === "false" || '," === 0 || "," === null"])),o,o,o)).assign(l,!1).elseIf((0,i._)(be||(be=mo(["",' === "true" || '," === 1"])),o,o)).assign(l,!0);case"null":return r.elseIf((0,i._)(we||(we=mo(["",' === "" || '," === 0 || "," === false"])),o,o,o)),void r.assign(l,null);case"array":r.elseIf((0,i._)(xe||(xe=mo(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),s,s,s,o)).assign(l,(0,i._)(ke||(ke=mo(["[","]"])),o))}}r.else(),d(e),r.endIf(),r.if((0,i._)(le||(le=mo([""," !== undefined"])),l),(function(){r.assign(o,l),function(e,t){var n=e.gen,r=e.parentData,o=e.parentDataProperty;n.if((0,i._)(je||(je=mo([""," !== undefined"])),r),(function(){return n.assign((0,i._)(Se||(Se=mo(["","[","]"])),r,o),t)}))}(e,l)}))}(e,n,l):d(e)}))}return f};var c=new Set(["string","number","integer","boolean","null"]);function l(e,n,r){var o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.Correct,s=a===t.Correct?i.operators.EQ:i.operators.NEQ;switch(e){case"null":return(0,i._)(Ce||(Ce=mo([""," "," null"])),n,s);case"array":o=(0,i._)($e||($e=mo(["Array.isArray(",")"])),n);break;case"object":o=(0,i._)(_e||(_e=mo([""," && typeof ",' == "object" && !Array.isArray(',")"])),n,n,n);break;case"integer":o=c((0,i._)(Oe||(Oe=mo(["!("," % 1) && !isNaN(",")"])),n,n));break;case"number":o=c();break;default:return(0,i._)(Me||(Me=mo(["typeof "," "," ",""])),n,s,e)}return a===t.Correct?o:(0,i.not)(o);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.nil;return(0,i.and)((0,i._)(Ae||(Ae=mo(["typeof ",' == "number"'])),n),e,r?(0,i._)(Ee||(Ee=mo(["isFinite(",")"])),n):i.nil)}}function u(e,t,n,r){if(1===e.length)return l(e[0],t,n,r);var o,s=(0,a.toHash)(e);if(s.array&&s.object){var c=(0,i._)(Pe||(Pe=mo(["typeof ",' != "object"'])),t);o=s.null?c:(0,i._)(Te||(Te=mo(["!"," || ",""])),t,c),delete s.null,delete s.array,delete s.object}else o=i.nil;for(var u in s.number&&delete s.integer,s)o=(0,i.and)(o,l(u,t,n,r));return o}e.checkDataType=l,e.checkDataTypes=u;var f={message:function(e){var t=e.schema;return"must be ".concat(t)},params:function(e){var t=e.schema,n=e.schemaValue;return"string"==typeof t?(0,i._)(Re||(Re=mo(["{type: ","}"])),t):(0,i._)(Ne||(Ne=mo(["{type: ","}"])),n)}};function d(e){var t=function(e){var t=e.gen,n=e.data,r=e.schema,o=(0,a.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}(e);(0,o.reportError)(t,f)}e.reportTypeError=d}(h8);var b8,w8={};var x8,k8,j8={},S8={};function C8(){if(x8)return S8;x8=1,Object.defineProperty(S8,"__esModule",{value:!0}),S8.validateUnion=S8.validateArray=S8.usePattern=S8.callValidateCode=S8.schemaProperties=S8.allSchemaProperties=S8.noPropertyInData=S8.propertyInData=S8.isOwnProperty=S8.hasPropFunc=S8.reportMissingProp=S8.checkMissingProp=S8.checkReportMissingProp=void 0;var e=i8(),t=a8,n=f8(),r=a8;function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)(Fe||(Fe=mo(["Object.prototype.hasOwnProperty"])))})}function i(t,n,r){return(0,e._)(Ve||(Ve=mo(["",".call(",", ",")"])),o(t),n,r)}function a(t,n,r,o){var a=(0,e._)(Ue||(Ue=mo(["",""," === undefined"])),n,(0,e.getProperty)(r));return o?(0,e.or)(a,(0,e.not)(i(t,n,r))):a}function s(e){return e?Object.keys(e).filter((function(e){return"__proto__"!==e})):[]}S8.checkReportMissingProp=function(t,n){var r=t.gen,o=t.data,i=t.it;r.if(a(r,o,n,i.opts.ownProperties),(function(){t.setParams({missingProperty:(0,e._)(Be||(Be=mo(["",""])),n)},!0),t.error()}))},S8.checkMissingProp=function(t,n,r){var o=t.gen,i=t.data,s=t.it.opts;return e.or.apply(void 0,Bo(n.map((function(t){return(0,e.and)(a(o,i,t,s.ownProperties),(0,e._)(Le||(Le=mo([""," = ",""])),r,t))}))))},S8.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},S8.hasPropFunc=o,S8.isOwnProperty=i,S8.propertyInData=function(t,n,r,o){var a=(0,e._)(He||(He=mo(["",""," !== undefined"])),n,(0,e.getProperty)(r));return o?(0,e._)(We||(We=mo([""," && ",""])),a,i(t,n,r)):a},S8.noPropertyInData=a,S8.allSchemaProperties=s,S8.schemaProperties=function(e,n){return s(n).filter((function(r){return!(0,t.alwaysValidSchema)(e,n[r])}))},S8.callValidateCode=function(t,r,o,i){var a=t.schemaCode,s=t.data,c=t.it,l=c.gen,u=c.topSchemaRef,f=c.schemaPath,d=c.errorPath,h=t.it,v=i?(0,e._)(Je||(Je=mo(["",", ",", ","",""])),a,s,u,f):s,p=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,d)],[n.default.parentData,h.parentData],[n.default.parentDataProperty,h.parentDataProperty],[n.default.rootData,n.default.rootData]];h.opts.dynamicRef&&p.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);var m=(0,e._)(Ke||(Ke=mo(["",", ",""])),v,l.object.apply(l,p));return o!==e.nil?(0,e._)(Ge||(Ge=mo(["",".call(",", ",")"])),r,o,m):(0,e._)(Qe||(Qe=mo(["","(",")"])),r,m)};var c=(0,e._)(Ye||(Ye=mo(["new RegExp"])));return S8.usePattern=function(t,n){var o=t.gen,i=t.it.opts,a=i.unicodeRegExp?"u":"",s=i.code.regExp,l=s(n,a);return o.scopeValue("pattern",{key:l.toString(),ref:l,code:(0,e._)(Xe||(Xe=mo(["","(",", ",")"])),"new RegExp"===s.code?c:(0,r.useFunc)(o,s),n,a)})},S8.validateArray=function(n){var r=n.gen,o=n.data,i=n.keyword,a=n.it,s=r.name("valid");if(a.allErrors){var c=r.let("valid",!0);return l((function(){return r.assign(c,!1)})),c}return r.var(s,!0),l((function(){return r.break()})),s;function l(a){var c=r.const("len",(0,e._)(Ze||(Ze=mo(["",".length"])),o));r.forRange("i",0,c,(function(o){n.subschema({keyword:i,dataProp:o,dataPropType:t.Type.Num},s),r.if((0,e.not)(s),a)}))}},S8.validateUnion=function(n){var r=n.gen,o=n.schema,i=n.keyword,a=n.it;if(!Array.isArray(o))throw new Error("ajv implementation error");if(!o.some((function(e){return(0,t.alwaysValidSchema)(a,e)}))||a.opts.unevaluated){var s=r.let("valid",!1),c=r.name("_valid");r.block((function(){return o.forEach((function(t,o){var a=n.subschema({keyword:i,schemaProp:o,compositeRule:!0},c);r.assign(s,(0,e._)(et||(et=mo([""," || ",""])),s,c)),n.mergeValidEvaluated(a,c)||r.if((0,e.not)(s))}))})),n.result(s,(function(){return n.reset()}),(function(){return n.error(!0)}))}},S8}function $8(){if(k8)return j8;k8=1,Object.defineProperty(j8,"__esModule",{value:!0}),j8.validateKeywordUsage=j8.validSchemaType=j8.funcKeywordCode=j8.macroKeywordCode=void 0;var e=i8(),t=f8(),n=C8(),r=d8();function o(t){var n=t.gen,r=t.data,o=t.it;n.if(o.parentData,(function(){return n.assign(r,(0,e._)(st||(st=mo(["","[","]"])),o.parentData,o.parentDataProperty))}))}function i(t,n,r){if(void 0===r)throw new Error('keyword "'.concat(n,'" failed to compile'));return t.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,e.stringify)(r)})}return j8.macroKeywordCode=function(t,n){var r=t.gen,o=t.keyword,a=t.schema,s=t.parentSchema,c=t.it,l=n.macro.call(c.self,a,s,c),u=i(r,o,l);!1!==c.opts.validateSchema&&c.self.validateSchema(l,!0);var f=r.name("valid");t.subschema({schema:l,schemaPath:e.nil,errSchemaPath:"".concat(c.errSchemaPath,"/").concat(o),topSchemaRef:u,compositeRule:!0},f),t.pass(f,(function(){return t.error(!0)}))},j8.funcKeywordCode=function(a,s){var c,l=a.gen,u=a.keyword,f=a.schema,d=a.parentSchema,h=a.$data,v=a.it;!function(e,t){var n=e.schemaEnv;if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}(v,s);var p=!h&&s.compile?s.compile.call(v.self,f,d,v):s.validate,m=i(l,u,p),g=l.let("valid");function y(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.async?(0,e._)(it||(it=mo(["await "]))):e.nil,o=v.opts.passContext?t.default.this:t.default.self,i=!("compile"in s&&!h||!1===s.schema);l.assign(g,(0,e._)(at||(at=mo(["","",""])),r,(0,n.callValidateCode)(a,m,o,i)),s.modifying)}function b(t){var n;l.if((0,e.not)(null!==(n=s.valid)&&void 0!==n?n:g),t)}a.block$data(g,(function(){if(!1===s.errors)y(),s.modifying&&o(a),b((function(){return a.error()}));else{var n=s.async?function(){var t=l.let("ruleErrs",null);return l.try((function(){return y((0,e._)(tt||(tt=mo(["await "]))))}),(function(n){return l.assign(g,!1).if((0,e._)(nt||(nt=mo([""," instanceof ",""])),n,v.ValidationError),(function(){return l.assign(t,(0,e._)(rt||(rt=mo(["",".errors"])),n))}),(function(){return l.throw(n)}))})),t}():(i=(0,e._)(ot||(ot=mo(["",".errors"])),m),l.assign(i,null),y(e.nil),i);s.modifying&&o(a),b((function(){return function(n,o){var i=n.gen;i.if((0,e._)(ct||(ct=mo(["Array.isArray(",")"])),o),(function(){i.assign(t.default.vErrors,(0,e._)(lt||(lt=mo([""," === null ? "," : ",".concat(",")"])),t.default.vErrors,o,t.default.vErrors,o)).assign(t.default.errors,(0,e._)(ut||(ut=mo(["",".length"])),t.default.vErrors)),(0,r.extendErrors)(n)}),(function(){return n.error()}))}(a,n)}))}var i})),a.ok(null!==(c=s.valid)&&void 0!==c?c:g)},j8.validSchemaType=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!t.length||t.some((function(t){return"array"===t?Array.isArray(e):"object"===t?e&&"object"==Ho(e)&&!Array.isArray(e):Ho(e)==t||n&&void 0===e}))},j8.validateKeywordUsage=function(e,t,n){var r=e.schema,o=e.opts,i=e.self,a=e.errSchemaPath;if(Array.isArray(t.keyword)?!t.keyword.includes(n):t.keyword!==n)throw new Error("ajv implementation error");var s=t.dependencies;if(null==s?void 0:s.some((function(e){return!Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have dependencies of ".concat(n,": ").concat(s.join(",")));if(t.validateSchema&&!t.validateSchema(r[n])){var c='keyword "'.concat(n,'" value is invalid at path "').concat(a,'": ')+i.errorsText(t.validateSchema.errors);if("log"!==o.validateSchema)throw new Error(c);i.logger.error(c)}},j8}var _8,O8={};var M8={},A8=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==Ho(t)&&"object"==Ho(n)){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))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=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},E8={exports:{}},P8=E8.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),T8(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function T8(e,t,n,r,o,i,a,s,c,l){if(r&&"object"==Ho(r)&&!Array.isArray(r)){for(var u in t(r,o,i,a,s,c,l),r){var f=r[u];if(Array.isArray(f)){if(u in P8.arrayKeywords)for(var d=0;d1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof e||(!0===t?!B8(e):!!t&&L8(e)<=t)};var q8=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function B8(e){for(var t in e){if(q8.has(t))return!0;var n=e[t];if(Array.isArray(n)&&n.some(B8))return!0;if("object"==Ho(n)&&B8(n))return!0}return!1}function L8(e){var t=0;for(var n in e){if("$ref"===n)return 1/0;if(t++,!z8.has(n)&&("object"==Ho(e[n])&&(0,N8.eachItem)(e[n],(function(e){return t+=L8(e)})),t===1/0))return 1/0}return t}function F8(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(t=W8(t));var n=e.parse(t);return V8(e,n)}function V8(e,t){return e.serialize(t).split("#")[0]+"#"}M8.getFullPath=F8,M8._getFullPath=V8;var H8=/#\/?$/;function W8(e){return e?e.replace(H8,""):""}M8.normalizeId=W8,M8.resolveUrl=function(e,t,n){return n=W8(n),e.resolve(t,n)};var U8,J8=/^[a-z_][-a-z0-9._]*$/i;function K8(){if(U8)return G6;U8=1,Object.defineProperty(G6,"__esModule",{value:!0}),G6.getData=G6.KeywordCxt=G6.validateFunctionCode=void 0;var e=function(){if(l8)return Q6;l8=1,Object.defineProperty(Q6,"__esModule",{value:!0}),Q6.boolOrEmptySchema=Q6.topBoolOrEmptySchema=void 0;var e=d8(),t=i8(),n=f8(),r={message:"boolean schema is false"};function o(t,n){var o={gen:t.gen,keyword:"false schema",data:t.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(o,r,void 0,n)}return Q6.topBoolOrEmptySchema=function(e){var r=e.gen,i=e.schema,a=e.validateName;!1===i?o(e,!1):"object"==Ho(i)&&!0===i.$async?r.return(n.default.data):(r.assign((0,t._)(ne||(ne=mo(["",".errors"])),a),null),r.return(!0))},Q6.boolOrEmptySchema=function(e,t){var n=e.gen;!1===e.schema?(n.var(t,!1),o(e)):n.var(t,!0)},Q6}(),t=h8,n=y8(),r=h8,o=function(){if(b8)return w8;b8=1,Object.defineProperty(w8,"__esModule",{value:!0}),w8.assignDefaults=void 0;var e=i8(),t=a8;function n(n,r,o){var i=n.gen,a=n.compositeRule,s=n.data,c=n.opts;if(void 0!==o){var l=(0,e._)(Ie||(Ie=mo(["","",""])),s,(0,e.getProperty)(r));if(a)(0,t.checkStrictMode)(n,"default is ignored for: ".concat(l));else{var u=(0,e._)(De||(De=mo([""," === undefined"])),l);"empty"===c.useDefaults&&(u=(0,e._)(ze||(ze=mo([""," || "," === null || ",' === ""'])),u,l,l)),i.if(u,(0,e._)(qe||(qe=mo([""," = ",""])),l,(0,e.stringify)(o)))}}}return w8.assignDefaults=function(e,t){var r=e.schema,o=r.properties,i=r.items;if("object"===t&&o)for(var a in o)n(e,a,o[a].default);else"array"===t&&Array.isArray(i)&&i.forEach((function(t,r){return n(e,r,t.default)}))},w8}(),i=$8(),a=function(){if(_8)return O8;_8=1,Object.defineProperty(O8,"__esModule",{value:!0}),O8.extendSubschemaMode=O8.extendSubschemaData=O8.getSubschema=void 0;var e=i8(),t=a8;return O8.getSubschema=function(n,r){var o=r.keyword,i=r.schemaProp,a=r.schema,s=r.schemaPath,c=r.errSchemaPath,l=r.topSchemaRef;if(void 0!==o&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==o){var u=n.schema[o];return void 0===i?{schema:u,schemaPath:(0,e._)(ft||(ft=mo(["","",""])),n.schemaPath,(0,e.getProperty)(o)),errSchemaPath:"".concat(n.errSchemaPath,"/").concat(o)}:{schema:u[i],schemaPath:(0,e._)(dt||(dt=mo(["","","",""])),n.schemaPath,(0,e.getProperty)(o),(0,e.getProperty)(i)),errSchemaPath:"".concat(n.errSchemaPath,"/").concat(o,"/").concat((0,t.escapeFragment)(i))}}if(void 0!==a){if(void 0===s||void 0===c||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:s,topSchemaRef:l,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')},O8.extendSubschemaData=function(n,r,o){var i=o.dataProp,a=o.dataPropType,s=o.data,c=o.dataTypes,l=o.propertyName;if(void 0!==s&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');var u=r.gen;if(void 0!==i){var f=r.errorPath,d=r.dataPathArr,h=r.opts;v(u.let("data",(0,e._)(ht||(ht=mo(["","",""])),r.data,(0,e.getProperty)(i)),!0)),n.errorPath=(0,e.str)(vt||(vt=mo(["","",""])),f,(0,t.getErrorPath)(i,a,h.jsPropertySyntax)),n.parentDataProperty=(0,e._)(pt||(pt=mo(["",""])),i),n.dataPathArr=[].concat(Bo(d),[n.parentDataProperty])}function v(e){n.data=e,n.dataLevel=r.dataLevel+1,n.dataTypes=[],r.definedProperties=new Set,n.parentData=r.data,n.dataNames=[].concat(Bo(r.dataNames),[e])}void 0!==s&&(v(s instanceof e.Name?s:u.let("data",s,!0)),void 0!==l&&(n.propertyName=l)),c&&(n.dataTypes=c)},O8.extendSubschemaMode=function(e,t){var n=t.jtdDiscriminator,r=t.jtdMetadata,o=t.compositeRule,i=t.createErrors,a=t.allErrors;void 0!==o&&(e.compositeRule=o),void 0!==i&&(e.createErrors=i),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=n,e.jtdMetadata=r},O8}(),s=i8(),c=f8(),l=M8,u=a8,f=d8();function d(e,t){var n=e.gen,r=e.validateName,o=e.schema,i=e.schemaEnv,a=e.opts;a.code.es5?n.func(r,(0,s._)(mt||(mt=mo(["",", ",""])),c.default.data,c.default.valCxt),i.$async,(function(){n.code((0,s._)(gt||(gt=mo(['"use strict"; ',""])),h(o,a))),function(e,t){e.if(c.default.valCxt,(function(){e.var(c.default.instancePath,(0,s._)(xt||(xt=mo(["",".",""])),c.default.valCxt,c.default.instancePath)),e.var(c.default.parentData,(0,s._)(kt||(kt=mo(["",".",""])),c.default.valCxt,c.default.parentData)),e.var(c.default.parentDataProperty,(0,s._)(jt||(jt=mo(["",".",""])),c.default.valCxt,c.default.parentDataProperty)),e.var(c.default.rootData,(0,s._)(St||(St=mo(["",".",""])),c.default.valCxt,c.default.rootData)),t.dynamicRef&&e.var(c.default.dynamicAnchors,(0,s._)(Ct||(Ct=mo(["",".",""])),c.default.valCxt,c.default.dynamicAnchors))}),(function(){e.var(c.default.instancePath,(0,s._)($t||($t=mo(['""'])))),e.var(c.default.parentData,(0,s._)(_t||(_t=mo(["undefined"])))),e.var(c.default.parentDataProperty,(0,s._)(Ot||(Ot=mo(["undefined"])))),e.var(c.default.rootData,c.default.data),t.dynamicRef&&e.var(c.default.dynamicAnchors,(0,s._)(Mt||(Mt=mo(["{}"]))))}))}(n,a),n.code(t)})):n.func(r,(0,s._)(yt||(yt=mo(["",", ",""])),c.default.data,function(e){return(0,s._)(bt||(bt=mo(["{",'="", ',", ",", ","=","","}={}"])),c.default.instancePath,c.default.parentData,c.default.parentDataProperty,c.default.rootData,c.default.data,e.dynamicRef?(0,s._)(wt||(wt=mo([", ","={}"])),c.default.dynamicAnchors):s.nil)}(a)),i.$async,(function(){return n.code(h(o,a)).code(t)}))}function h(e,t){var n="object"==Ho(e)&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,s._)(Dt||(Dt=mo(["/*# sourceURL="," */"])),n):s.nil}function v(t,n){m(t)&&(g(t),p(t))?function(e,t){var n=e.schema,r=e.gen,o=e.opts;o.$comment&&n.$comment&&b(e);(function(e){var t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);var i=r.const("_errs",c.default.errors);y(e,i),r.var(t,(0,s._)(zt||(zt=mo([""," === ",""])),i,c.default.errors))}(t,n):(0,e.boolOrEmptySchema)(t,n)}function p(e){var t=e.schema,n=e.self;if("boolean"==typeof t)return!t;for(var r in t)if(n.RULES.all[r])return!0;return!1}function m(e){return"boolean"!=typeof e.schema}function g(e){(0,u.checkUnknownRules)(e),function(e){var t=e.schema,n=e.errSchemaPath,r=e.opts,o=e.self;t.$ref&&r.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn('$ref: keywords ignored in schema at path "'.concat(n,'"'))}(e)}function y(e,n){if(e.opts.jtd)return w(e,[],!1,n);var r=(0,t.getSchemaTypes)(e.schema);w(e,r,!(0,t.coerceAndCheckDataType)(e,r),n)}function b(e){var t=e.gen,n=e.schemaEnv,r=e.schema,o=e.errSchemaPath,i=e.opts,a=r.$comment;if(!0===i.$comment)t.code((0,s._)(qt||(qt=mo(["",".logger.log(",")"])),c.default.self,a));else if("function"==typeof i.$comment){var l=(0,s.str)(Bt||(Bt=mo(["","/$comment"])),o),u=t.scopeValue("root",{ref:n.root});t.code((0,s._)(Lt||(Lt=mo(["",".opts.$comment(",", ",", ",".schema)"])),c.default.self,a,l,u))}}function w(e,t,o,i){var a=e.gen,l=e.schema,f=e.data,d=e.allErrors,h=e.opts,v=e.self.RULES;function p(u){(0,n.shouldUseGroup)(l,u)&&(u.type?(a.if((0,r.checkDataType)(u.type,f,h.strictNumbers)),x(e,u),1===t.length&&t[0]===u.type&&o&&(a.else(),(0,r.reportTypeError)(e)),a.endIf()):x(e,u),d||a.if((0,s._)(Kt||(Kt=mo([""," === ",""])),c.default.errors,i||0)))}!l.$ref||!h.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(l,v)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((function(t){j(e.dataTypes,t)||S(e,'type "'.concat(t,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))})),function(e,t){var n,r=[],o=bo(e.dataTypes);try{for(o.s();!(n=o.n()).done;){var i=n.value;j(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer")}}catch(e){o.e(e)}finally{o.f()}e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){var r=e.self.RULES.all;for(var o in r){var i=r[o];if("object"==Ho(i)&&(0,n.shouldUseRule)(e.schema,i)){var a=i.definition.type;a.length&&!a.some((function(e){return k(t,e)}))&&S(e,'missing type "'.concat(a.join(","),'" for keyword "').concat(o,'"'))}}}(e,e.dataTypes)}(e,t),a.block((function(){var e,t=bo(v.rules);try{for(t.s();!(e=t.n()).done;){p(e.value)}}catch(e){t.e(e)}finally{t.f()}p(v.post)}))):a.block((function(){return $(e,"$ref",v.all.$ref.definition)}))}function x(e,t){var r=e.gen,i=e.schema;e.opts.useDefaults&&(0,o.assignDefaults)(e,t.type),r.block((function(){var r,o=bo(t.rules);try{for(o.s();!(r=o.n()).done;){var a=r.value;(0,n.shouldUseRule)(i,a)&&$(e,a.keyword,a.definition,t.type)}}catch(e){o.e(e)}finally{o.f()}}))}function k(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function j(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){var n=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(n,'" (strictTypes)'),(0,u.checkStrictMode)(e,t,e.opts.strictTypes)}G6.validateFunctionCode=function(t){m(t)&&(g(t),p(t))?function(e){var t=e.schema,n=e.opts,r=e.gen;d(e,(function(){n.$comment&&t.$comment&&b(e),function(e){var t=e.schema,n=e.opts;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(c.default.vErrors,null),r.let(c.default.errors,0),n.unevaluated&&function(e){var t=e.gen,n=e.validateName;e.evaluated=t.const("evaluated",(0,s._)(At||(At=mo(["",".evaluated"])),n)),t.if((0,s._)(Et||(Et=mo(["",".dynamicProps"])),e.evaluated),(function(){return t.assign((0,s._)(Pt||(Pt=mo(["",".props"])),e.evaluated),(0,s._)(Tt||(Tt=mo(["undefined"]))))})),t.if((0,s._)(Rt||(Rt=mo(["",".dynamicItems"])),e.evaluated),(function(){return t.assign((0,s._)(Nt||(Nt=mo(["",".items"])),e.evaluated),(0,s._)(It||(It=mo(["undefined"]))))}))}(e),y(e),function(e){var t=e.gen,n=e.schemaEnv,r=e.validateName,o=e.ValidationError,i=e.opts;n.$async?t.if((0,s._)(Ft||(Ft=mo([""," === 0"])),c.default.errors),(function(){return t.return(c.default.data)}),(function(){return t.throw((0,s._)(Vt||(Vt=mo(["new ","(",")"])),o,c.default.vErrors))})):(t.assign((0,s._)(Ht||(Ht=mo(["",".errors"])),r),c.default.vErrors),i.unevaluated&&function(e){var t=e.gen,n=e.evaluated,r=e.props,o=e.items;r instanceof s.Name&&t.assign((0,s._)(Ut||(Ut=mo(["",".props"])),n),r);o instanceof s.Name&&t.assign((0,s._)(Jt||(Jt=mo(["",".items"])),n),o)}(e),t.return((0,s._)(Wt||(Wt=mo([""," === 0"])),c.default.errors)))}(e)}))}(t):d(t,(function(){return(0,e.topBoolOrEmptySchema)(t)}))};var C=function(){function e(t,n,r){if(No(this,e),(0,i.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",M(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error("".concat(r," value must be ").concat(JSON.stringify(n.schemaType)));("code"in n?n.trackErrors:!1!==n.errors)&&(this.errsCount=t.gen.const("_errs",c.default.errors))}return Do(e,[{key:"result",value:function(e,t,n){this.failResult((0,s.not)(e),t,n)}},{key:"failResult",value:function(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(e,t){this.failResult((0,s.not)(e),void 0,t)}},{key:"fail",value:function(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(e){if(!this.$data)return this.fail(e);var t=this.schemaCode;this.fail((0,s._)(Gt||(Gt=mo([""," !== undefined && (",")"])),t,(0,s.or)(this.invalid$data(),e)))}},{key:"error",value:function(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}},{key:"_error",value:function(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}},{key:"$dataError",value:function(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(e){this.allErrors||this.gen.if(e)}},{key:"setParams",value:function(e,t){t?Object.assign(this.params,e):this.params=e}},{key:"block$data",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.nil;this.gen.block((function(){n.check$data(e,r),t()}))}},{key:"check$data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.nil,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.nil;if(this.$data){var n=this.gen,r=this.schemaCode,o=this.schemaType,i=this.def;n.if((0,s.or)((0,s._)(Qt||(Qt=mo([""," === undefined"])),r),t)),e!==s.nil&&n.assign(e,!0),(o.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==s.nil&&n.assign(e,!1)),n.else()}}},{key:"invalid$data",value:function(){var e=this.gen,t=this.schemaCode,n=this.schemaType,o=this.def,i=this.it;return(0,s.or)(function(){if(n.length){if(!(t instanceof s.Name))throw new Error("ajv implementation error");var e=Array.isArray(n)?n:[n];return(0,s._)(Yt||(Yt=mo(["",""])),(0,r.checkDataTypes)(e,t,i.opts.strictNumbers,r.DataType.Wrong))}return s.nil}(),function(){if(o.validateSchema){var n=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,s._)(Xt||(Xt=mo(["!","(",")"])),n,t)}return s.nil}())}},{key:"subschema",value:function(e,t){var n=(0,a.getSubschema)(this.it,e);(0,a.extendSubschemaData)(n,this.it,e),(0,a.extendSubschemaMode)(n,e);var r=Ro(Ro(Ro({},this.it),n),{},{items:void 0,props:void 0});return v(r,t),r}},{key:"mergeEvaluated",value:function(e,t){var n=this.it,r=this.gen;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=u.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=u.mergeEvaluated.items(r,e.items,n.items,t)))}},{key:"mergeValidEvaluated",value:function(e,t){var n=this,r=this.it,o=this.gen;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return o.if(t,(function(){return n.mergeEvaluated(e,s.Name)})),!0}}]),e}();function $(e,t,n,r){var o=new C(e,n,t);"code"in n?n.code(o,r):o.$data&&n.validate?(0,i.funcKeywordCode)(o,n):"macro"in n?(0,i.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,i.funcKeywordCode)(o,n)}G6.KeywordCxt=C;var _=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function M(e,t){var n,r,o=t.dataLevel,i=t.dataNames,a=t.dataPathArr;if(""===e)return c.default.rootData;if("/"===e[0]){if(!_.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));n=e,r=c.default.rootData}else{var l=O.exec(e);if(!l)throw new Error("Invalid JSON-pointer: ".concat(e));var f=+l[1];if("#"===(n=l[2])){if(f>=o)throw new Error(m("property/index",f));return a[o-f]}if(f>o)throw new Error(m("data",f));if(r=i[o-f],!n)return r}var d,h=r,v=bo(n.split("/"));try{for(v.s();!(d=v.n()).done;){var p=d.value;p&&(r=(0,s._)(Zt||(Zt=mo(["","",""])),r,(0,s.getProperty)((0,u.unescapeJsonPointer)(p))),h=(0,s._)(en||(en=mo([""," && ",""])),h,r))}}catch(e){v.e(e)}finally{v.f()}return h;function m(e,t){return"Cannot access ".concat(e," ").concat(t," levels up, current level is ").concat(o)}}return G6.getData=M,G6}M8.getSchemaRefs=function(e,t){var n=this;if("boolean"==typeof e)return{};var r=this.opts,o=r.schemaId,i=r.uriResolver,a=W8(e[o]||t),s={"":a},c=F8(i,a,!1),l={},u=new Set;return D8(e,{allKeys:!0},(function(e,t,r,i){if(void 0!==i){var a=c+t,h=s[i];"string"==typeof e[o]&&(h=v.call(n,e[o])),p.call(n,e.$anchor),p.call(n,e.$dynamicAnchor),s[t]=h}function v(t){var n=this.opts.uriResolver.resolve;if(t=W8(h?n(h,t):t),u.has(t))throw d(t);u.add(t);var r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==Ho(r)?f(e,r.schema,t):t!==W8(a)&&("#"===t[0]?(f(e,l[t],t),l[t]=e):this.refs[t]=a),t}function p(e){if("string"==typeof e){if(!J8.test(e))throw new Error('invalid anchor "'.concat(e,'"'));v.call(this,"#".concat(e))}}})),l;function f(e,t,n){if(void 0!==t&&!I8(e,t))throw d(n)}function d(e){return new Error('reference "'.concat(e,'" resolves to more than one schema'))}};var G8,Q8={};function Y8(){if(G8)return Q8;G8=1,Object.defineProperty(Q8,"__esModule",{value:!0});var e=function(e){function t(e){var n;return No(this,t),(n=_o(this,t,["validation failed"])).errors=e,n.ajv=n.validation=!0,n}return Eo(t,$o(Error)),Do(t)}();return Q8.default=e,Q8}var X8,Z8={};function e5(){if(X8)return Z8;X8=1,Object.defineProperty(Z8,"__esModule",{value:!0});var e=M8,t=function(t){function n(t,r,o,i){var a;return No(this,n),(a=_o(this,n,[i||"can't resolve reference ".concat(o," from id ").concat(r)])).missingRef=(0,e.resolveUrl)(t,r,o),a.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,a.missingRef)),a}return Eo(n,$o(Error)),Do(n)}();return Z8.default=t,Z8}var t5={};Object.defineProperty(t5,"__esModule",{value:!0}),t5.resolveSchema=t5.getCompilingSchema=t5.resolveRef=t5.compileSchema=t5.SchemaEnv=void 0;var n5=i8(),r5=Y8(),o5=f8(),i5=M8,a5=a8,s5=K8(),c5=Do((function e(t){var n,r;No(this,e),this.refs={},this.dynamicAnchors={},"object"==Ho(t.schema)&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(n=t.baseId)&&void 0!==n?n:(0,i5.normalizeId)(null==r?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==r?void 0:r.$async,this.refs={}}));function l5(e){var t=f5.call(this,e);if(t)return t;var n,r=(0,i5.getFullPath)(this.opts.uriResolver,e.root.baseId),o=this.opts.code,i=o.es5,a=o.lines,s=this.opts.ownProperties,c=new n5.CodeGen(this.scope,{es5:i,lines:a,ownProperties:s});e.$async&&(n=c.scopeValue("Error",{ref:r5.default,code:(0,n5._)(tn||(tn=mo(['require("ajv/dist/runtime/validation_error").default'])))}));var l=c.scopeName("validate");e.validateName=l;var u,f={gen:c,allErrors:this.opts.allErrors,data:o5.default.data,parentData:o5.default.parentData,parentDataProperty:o5.default.parentDataProperty,dataNames:[o5.default.data],dataPathArr:[n5.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n5.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:n,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n5.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,n5._)(nn||(nn=mo(['""']))),opts:this.opts,self:this};try{this._compilations.add(e),(0,s5.validateFunctionCode)(f),c.optimize(this.opts.code.optimize);var d=c.toString();u="".concat(c.scopeRefs(o5.default.scope),"return ").concat(d),this.opts.code.process&&(u=this.opts.code.process(u,e));var h=new Function("".concat(o5.default.self),"".concat(o5.default.scope),u)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),!0===this.opts.code.source&&(h.source={validateName:l,validateCode:d,scopeValues:c._values}),this.opts.unevaluated){var v=f.props,p=f.items;h.evaluated={props:v instanceof n5.Name?void 0:v,items:p instanceof n5.Name?void 0:p,dynamicProps:v instanceof n5.Name,dynamicItems:p instanceof n5.Name},h.source&&(h.source.evaluated=(0,n5.stringify)(h.evaluated))}return e.validate=h,e}catch(t){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),t}finally{this._compilations.delete(e)}}function u5(e){return(0,i5.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l5.call(this,e)}function f5(e){var t,n,r,o=bo(this._compilations);try{for(o.s();!(t=o.n()).done;){var i=t.value;if(r=e,(n=i).schema===r.schema&&n.root===r.root&&n.baseId===r.baseId)return i}}catch(e){o.e(e)}finally{o.f()}}function d5(e,t){for(var n;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||h5.call(this,e,t)}function h5(e,t){var n=this.opts.uriResolver.parse(t),r=(0,i5._getFullPath)(this.opts.uriResolver,n),o=(0,i5.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===o)return p5.call(this,n,e);var i=(0,i5.normalizeId)(r),a=this.refs[i]||this.schemas[i];if("string"==typeof a){var s=h5.call(this,e,a);if("object"!==Ho(null==s?void 0:s.schema))return;return p5.call(this,n,s)}if("object"===Ho(null==a?void 0:a.schema)){if(a.validate||l5.call(this,a),i===(0,i5.normalizeId)(t)){var c=a.schema,l=this.opts.schemaId,u=c[l];return u&&(o=(0,i5.resolveUrl)(this.opts.uriResolver,o,u)),new c5({schema:c,schemaId:l,root:e,baseId:o})}return p5.call(this,n,a)}}t5.SchemaEnv=c5,t5.compileSchema=l5,t5.resolveRef=function(e,t,n){var r;n=(0,i5.resolveUrl)(this.opts.uriResolver,t,n);var o=e.refs[n];if(o)return o;var i=d5.call(this,e,n);if(void 0===i){var a=null===(r=e.localRefs)||void 0===r?void 0:r[n],s=this.opts.schemaId;a&&(i=new c5({schema:a,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[n]=u5.call(this,i):void 0},t5.getCompilingSchema=f5,t5.resolveSchema=h5;var v5=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function p5(e,t){var n,r=t.baseId,o=t.schema,i=t.root;if("/"===(null===(n=e.fragment)||void 0===n?void 0:n[0])){var a,s,c=bo(e.fragment.slice(1).split("/"));try{for(c.s();!(a=c.n()).done;){var l=a.value;if("boolean"==typeof o)return;var u=o[(0,a5.unescapeFragment)(l)];if(void 0===u)return;var f="object"===Ho(o=u)&&o[this.opts.schemaId];!v5.has(l)&&f&&(r=(0,i5.resolveUrl)(this.opts.uriResolver,r,f))}}catch(e){c.e(e)}finally{c.f()}if("boolean"!=typeof o&&o.$ref&&!(0,a5.schemaHasRulesButRef)(o,this.RULES)){var d=(0,i5.resolveUrl)(this.opts.uriResolver,r,o.$ref);s=h5.call(this,i,d)}var h=this.opts.schemaId;return(s=s||new c5({schema:o,schemaId:h,root:i,baseId:r})).schema!==s.root.schema?s:void 0}}var m5={$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},g5={},y5={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,o=1;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=h-v,$=Math.floor,_=String.fromCharCode;function O(e){throw new RangeError(S[e])}function M(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function A(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+M((e=e.replace(j,".")).split("."),t).join(".")}function E(e){for(var t=[],n=0,r=e.length;n=55296&&o<=56319&&n>1,e+=$(e/t);e>C*p>>1;r+=h)e=$(e/C);return $(r+(C+1)*e/(e+m))},I=function(e){var t=[],n=e.length,r=0,o=b,i=y,a=e.lastIndexOf(w);a<0&&(a=0);for(var s=0;s=128&&O("not-basic"),t.push(e.charCodeAt(s));for(var c=a>0?a+1:0;c=n&&O("invalid-input");var m=T(e.charCodeAt(c++));(m>=h||m>$((d-r)/u))&&O("overflow"),r+=m*u;var g=f<=i?v:f>=i+p?p:f-i;if(m$(d/x)&&O("overflow"),u*=x}var k=t.length+1;i=N(r-l,k,0==l),$(r/k)>d-o&&O("overflow"),o+=$(r/k),r%=k,t.splice(r++,0,o)}return String.fromCodePoint.apply(String,t)},D=function(e){var t=[],n=(e=E(e)).length,r=b,o=0,i=y,a=!0,s=!1,c=void 0;try{for(var l,u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var f=l.value;f<128&&t.push(_(f))}}catch(e){s=!0,c=e}finally{try{!a&&u.return&&u.return()}finally{if(s)throw c}}var m=t.length,g=m;for(m&&t.push(w);g=r&&A$((d-o)/P)&&O("overflow"),o+=(x-r)*P,r=x;var T=!0,I=!1,D=void 0;try{for(var z,q=e[Symbol.iterator]();!(T=(z=q.next()).done);T=!0){var B=z.value;if(Bd&&O("overflow"),B==r){for(var L=o,F=h;;F+=h){var V=F<=i?v:F>=i+p?p:F-i;if(L>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function V(e){for(var t="",n=0,r=e.length;n=194&&o<224){if(r-n>=6){var i=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&o)<<6|63&i)}else t+=e.substr(n,6);n+=6}else if(o>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function H(e,t){function n(e){var n=V(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,F).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,F).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,F).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,F).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,F).replace(t.PCT_ENCODED,o)),e}function W(e){return e.replace(/^0*(.*)/,"$1")||"0"}function U(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(W).join("."):e}function J(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),o=r[1],i=r[2];if(o){for(var a=o.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(W):[],d=c.split(":").map(W),h=t.IPV4ADDRESS.test(d[d.length-1]),v=h?7:8,p=d.length-v,m=Array(v),g=0;g1){var w=m.slice(0,y.index),x=m.slice(y.index+y.length);b=w.join(":")+"::"+x.join(":")}else b=m.join(":");return i&&(b+="%"+i),b}return e}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G=void 0==="".match(/(){0}/)[1];function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?l:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(K);if(o){G?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||void 0,n.userinfo=-1!==e.indexOf("@")?o[3]:void 0,n.host=-1!==e.indexOf("//")?o[4]:void 0,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:void 0,n.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),n.host&&(n.host=J(U(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var i=L[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||i&&i.unicodeSupport)H(n,r);else{if(n.host&&(t.domainHost||i&&i.domainHost))try{n.host=B.toASCII(n.host.replace(r.PCT_ENCODED,V).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}H(n,c)}i&&i.parse&&i.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function Y(e,t){var n=!1!==t.iri?l:c,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(J(U(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}var X=/^\.\.?\//,Z=/^\/\.(\/|$)/,ee=/^\/\.\.(\/|$)/,te=/^\/?(?:.|\n)*?(?=\/|$)/;function ne(e){for(var t=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(ee))e=e.replace(ee,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(te);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?l:c,r=[],o=L[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,V).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}H(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var i=Y(e,t);if(void 0!==i&&("suffix"!==t.reference&&r.push("//"),r.push(i),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||o&&o.absolutePath||(a=ne(a)),void 0===i&&(a=a.replace(/^\/\//,"/%2F")),r.push(a)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function oe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=Q(re(e,n),n),t=Q(re(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ne(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=ne(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=ne(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function ie(e,t,n){var r=a({scheme:"null"},n);return re(oe(Q(e,r),Q(t,r),r,!0),r)}function ae(e,t){return"string"==typeof e?e=re(Q(e,t),t):"object"===r(e)&&(e=Q(re(e,t),t)),e}function se(e,t,n){return"string"==typeof e?e=re(Q(e,n),n):"object"===r(e)&&(e=re(e,n)),"string"==typeof t?t=re(Q(t,n),n):"object"===r(t)&&(t=re(t,n)),e===t}function ce(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:c.ESCAPE,F)}function le(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:c.PCT_ENCODED,V)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},fe={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function de(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=de(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(de(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),o=r[0],i=r[1];e.path=o&&"/"!==o?o:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}},ve={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},pe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ye=n(n("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+n("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+n("%"+ge+ge)),be="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",we=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),xe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ke=new RegExp(me,"g"),je=new RegExp(ye,"g"),Se=new RegExp(t("[^]",be,"[\\.]",'[\\"]',we),"g"),Ce=new RegExp(t("[^]",me,xe),"g"),$e=Ce;function _e(e){var t=V(e);return t.match(ke)?t:e}var Oe={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var o=!1,i={},a=n.query.split("&"),s=0,c=a.length;s 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.'};var y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};No(this,e),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts=Ro(Ro({},t),function(e){var t,n,r,o,i,a,s,c,l,u,f,v,p,m,g,y,b,w,x,k,j,S,C,$,_,O=e.strict,M=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===M||void 0===M?1:M||0,E=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:h,P=null!==(o=e.uriResolver)&&void 0!==o?o:d.default;return{strictSchema:null===(a=null!==(i=e.strictSchema)&&void 0!==i?i:O)||void 0===a||a,strictNumbers:null===(c=null!==(s=e.strictNumbers)&&void 0!==s?s:O)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:O)&&void 0!==u?u:"log",strictTuples:null!==(v=null!==(f=e.strictTuples)&&void 0!==f?f:O)&&void 0!==v?v:"log",strictRequired:null!==(m=null!==(p=e.strictRequired)&&void 0!==p?p:O)&&void 0!==m&&m,code:e.code?Ro(Ro({},e.code),{},{optimize:A,regExp:E}):{optimize:A,regExp:E},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(y=e.loopEnum)&&void 0!==y?y:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(x=e.inlineRefs)||void 0===x||x,schemaId:null!==(k=e.schemaId)&&void 0!==k?k:"$id",addUsedSchema:null===(j=e.addUsedSchema)||void 0===j||j,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(C=e.validateFormats)||void 0===C||C,unicodeRegExp:null===($=e.unicodeRegExp)||void 0===$||$,int32range:null===(_=e.int32range)||void 0===_||_,uriResolver:P}}(t));var n=this.opts.code,r=n.es5,o=n.lines;this.scope=new s.ValueScope({scope:{},prefixes:p,es5:r,lines:o}),this.logger=function(e){if(!1===e)return C;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(t.logger);var a=t.validateFormats;t.validateFormats=!1,this.RULES=(0,i.getRules)(),b.call(this,m,t,"NOT SUPPORTED"),b.call(this,g,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&j.call(this,t.keywords),"object"==Ho(t.meta)&&this.addMetaSchema(t.meta),x.call(this),t.validateFormats=a}return Do(e,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var e=this.opts,t=e.$data,n=e.meta,r=e.schemaId,o=f;"id"===r&&((o=Ro({},f)).id=o.$id,delete o.$id),n&&t&&this.addMetaSchema(o,o[r],!1)}},{key:"defaultMeta",value:function(){var e=this.opts,t=e.meta,n=e.schemaId;return this.opts.defaultMeta="object"==Ho(t)?t[n]||t:void 0}},{key:"validate",value:function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'.concat(e,'"'))}else n=this.compile(e);var r=n(t);return"$async"in n||(this.errors=n.errors),r}},{key:"compile",value:function(e,t){var n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}},{key:"compileAsync",value:function(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var n=this.opts.loadSchema;return r.call(this,e,t);function r(e,t){return i.apply(this,arguments)}function i(){return(i=ko(wo().mark((function e(t,n){var r;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.call(this,t.$schema);case 2:return r=this._addSchema(t,n),e.abrupt("return",r.validate||c.call(this,r));case 4:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function a(e){return s.apply(this,arguments)}function s(){return(s=ko(wo().mark((function e(t){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t||this.getSchema(t)){e.next=3;break}return e.next=3,r.call(this,{$ref:t},!0);case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function c(e){return l.apply(this,arguments)}function l(){return(l=ko(wo().mark((function e(t){return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.abrupt("return",this._compileSchemaEnv(t));case 4:if(e.prev=4,e.t0=e.catch(0),e.t0 instanceof o.default){e.next=8;break}throw e.t0;case 8:return u.call(this,e.t0),e.next=11,f.call(this,e.t0.missingSchema);case 11:return e.abrupt("return",c.call(this,t));case 12:case"end":return e.stop()}}),e,this,[[0,4]])})))).apply(this,arguments)}function u(e){var t=e.missingSchema,n=e.missingRef;if(this.refs[t])throw new Error("AnySchema ".concat(t," is loaded but ").concat(n," cannot be resolved"))}function f(e){return d.apply(this,arguments)}function d(){return d=ko(wo().mark((function e(n){var r;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.call(this,n);case 2:if(r=e.sent,this.refs[n]){e.next=6;break}return e.next=6,a.call(this,r.$schema);case 6:this.refs[n]||this.addSchema(r,n,t);case 7:case"end":return e.stop()}}),e,this)}))),d.apply(this,arguments)}function h(e){return v.apply(this,arguments)}function v(){return v=ko(wo().mark((function e(t){var r;return wo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this._loading[t])){e.next=3;break}return e.abrupt("return",r);case 3:return e.prev=3,e.next=6,this._loading[t]=n(t);case 6:return e.abrupt("return",e.sent);case 7:return e.prev=7,delete this._loading[t],e.finish(7);case 10:case"end":return e.stop()}}),e,this,[[3,,7,10]])}))),v.apply(this,arguments)}}},{key:"addSchema",value:function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(e)){var i,a=bo(e);try{for(a.s();!(i=a.n()).done;){var s=i.value;this.addSchema(s,void 0,n,o)}}catch(e){a.e(e)}finally{a.f()}return this}if("object"===Ho(e)){var l=this.opts.schemaId;if(void 0!==(r=e[l])&&"string"!=typeof r)throw new Error("schema ".concat(l," must be string"))}return t=(0,c.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,o,!0),this}},{key:"addMetaSchema",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema;return this.addSchema(e,t,!0,n),this}},{key:"validateSchema",value:function(e,t){if("boolean"==typeof e)return!0;var n;if(void 0!==(n=e.$schema)&&"string"!=typeof n)throw new Error("$schema must be a string");if(!(n=n||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var r=this.validate(n,e);if(!r&&t){var o="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(o);this.logger.error(o)}return r}},{key:"getSchema",value:function(e){for(var t;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){var n=this.opts.schemaId,r=new a.SchemaEnv({schema:{},schemaId:n});if(!(t=a.resolveSchema.call(this,r,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}},{key:"removeSchema",value:function(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(Ho(e)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var t=w.call(this,e);return"object"==Ho(t)&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this;case"object":var n=e;this._cache.delete(n);var r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(e){var t,n=bo(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.addKeyword(r)}}catch(e){n.e(e)}finally{n.f()}return this}},{key:"addKeyword",value:function(e,t){var n,r=this;if("string"==typeof e)n=e,"object"==Ho(t)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=Ho(e)||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(_.call(this,n,t),!t)return(0,u.eachItem)(n,(function(e){return O.call(r,e)})),this;A.call(this,t);var o=Ro(Ro({},t),{},{type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)});return(0,u.eachItem)(n,0===o.type.length?function(e){return O.call(r,e,o)}:function(e){return o.type.forEach((function(t){return O.call(r,e,o,t)}))}),this}},{key:"getKeyword",value:function(e){var t=this.RULES.all[e];return"object"==Ho(t)?t.definition:!!t}},{key:"removeKeyword",value:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e];var n,r=bo(t.rules);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=o.rules.findIndex((function(t){return t.keyword===e}));i>=0&&o.rules.splice(i,1)}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"addFormat",value:function(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}},{key:"errorsText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.separator,r=void 0===n?", ":n,o=t.dataVar,i=void 0===o?"data":o;return e&&0!==e.length?e.map((function(e){return"".concat(i).concat(e.instancePath," ").concat(e.message)})).reduce((function(e,t){return e+r+t})):"No errors"}},{key:"$dataMetaSchema",value:function(e,t){var n=this.RULES.all;e=JSON.parse(JSON.stringify(e));var r,o=bo(t);try{for(o.s();!(r=o.n()).done;){var i,a=r.value.split("/").slice(1),s=e,c=bo(a);try{for(c.s();!(i=c.n()).done;){s=s[i.value]}}catch(e){c.e(e)}finally{c.f()}for(var l in n){var u=n[l];if("object"==Ho(u)){var f=u.definition.$data,d=s[l];f&&d&&(s[l]=P(d))}}}}catch(e){o.e(e)}finally{o.f()}return e}},{key:"_removeAllSchemas",value:function(e,t){for(var n in e){var r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}},{key:"_addSchema",value:function(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,s=this.opts.schemaId;if("object"==Ho(e))r=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}var l=this._cache.get(e);if(void 0!==l)return l;n=(0,c.normalizeId)(r||n);var u=c.getSchemaRefs.call(this,e,n);return l=new a.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),o&&this.validateSchema(e,!0),l}},{key:"_checkUnique",value:function(e){if(this.schemas[e]||this.refs[e])throw new Error('schema with key or id "'.concat(e,'" already exists'))}},{key:"_compileSchemaEnv",value:function(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}},{key:"_compileMetaSchema",value:function(e){var t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}}]),e}();function b(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var o in e){var i=o;i in t&&this.logger[r]("".concat(n,": option ").concat(o,". ").concat(e[i]))}}function w(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){var e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(var t in e)this.addSchema(e[t],t)}function k(){for(var e in this.opts.formats){var t=this.opts.formats[e];t&&this.addFormat(e,t)}}function j(e){if(Array.isArray(e))this.addVocabulary(e);else for(var t in this.logger.warn("keywords option as map is deprecated, pass array"),e){var n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function S(){var e,t=Ro({},this.opts),n=bo(v);try{for(n.s();!(e=n.n()).done;){delete t[e.value]}}catch(e){n.e(e)}finally{n.f()}return t}e.default=y,y.ValidationError=r.default,y.MissingRefError=o.default;var C={log:function(){},warn:function(){},error:function(){}};var $=/^[a-z_$][a-z0-9_$:-]*$/i;function _(e,t){var n=this.RULES;if((0,u.eachItem)(e,(function(e){if(n.keywords[e])throw new Error("Keyword ".concat(e," is already defined"));if(!$.test(e))throw new Error("Keyword ".concat(e," has invalid name"))})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function O(e,t,n){var r,o=this,i=null==t?void 0:t.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');var a=this.RULES,s=i?a.post:a.rules.find((function(e){return e.type===n}));if(s||(s={type:n,rules:[]},a.rules.push(s)),a.keywords[e]=!0,t){var c={keyword:e,definition:Ro(Ro({},t),{},{type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)})};t.before?M.call(this,s,c,t.before):s.rules.push(c),a.all[e]=c,null===(r=t.implements)||void 0===r||r.forEach((function(e){return o.addKeyword(e)}))}}function M(e,t,n){var r=e.rules.findIndex((function(e){return e.keyword===n}));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn("rule ".concat(n," is not defined")))}function A(e){var t=e.metaSchema;void 0!==t&&(e.$data&&this.opts.$data&&(t=P(t)),e.validateSchema=this.compile(t,!0))}var E={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function P(e){return{anyOf:[e,E]}}}(K6);var x5={},k5={},j5={};Object.defineProperty(j5,"__esModule",{value:!0});var S5={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};j5.default=S5;var C5={};Object.defineProperty(C5,"__esModule",{value:!0}),C5.callRef=C5.getValidate=void 0;var $5=e5(),_5=C8(),O5=i8(),M5=f8(),A5=t5,E5=a8,P5={keyword:"$ref",schemaType:"string",code:function(e){var t=e.gen,n=e.schema,r=e.it,o=r.baseId,i=r.schemaEnv,a=r.validateName,s=r.opts,c=r.self,l=i.root;if(("#"===n||"#/"===n)&&o===l.baseId)return function(){if(i===l)return R5(e,a,i,i.$async);var n=t.scopeValue("root",{ref:l});return R5(e,(0,O5._)(rn||(rn=mo(["",".validate"])),n),l,l.$async)}();var u,f,d=A5.resolveRef.call(c,l,o,n);if(void 0===d)throw new $5.default(r.opts.uriResolver,o,n);return d instanceof A5.SchemaEnv?(f=T5(e,u=d),void R5(e,f,u,u.$async)):function(r){var o=t.scopeValue("schema",!0===s.code.source?{ref:r,code:(0,O5.stringify)(r)}:{ref:r}),i=t.name("valid"),a=e.subschema({schema:r,dataTypes:[],schemaPath:O5.nil,topSchemaRef:o,errSchemaPath:n},i);e.mergeEvaluated(a),e.ok(i)}(d)}};function T5(e,t){var n=e.gen;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,O5._)(on||(on=mo(["",".validate"])),n.scopeValue("wrapper",{ref:t}))}function R5(e,t,n,r){var o=e.gen,i=e.it,a=i.allErrors,s=i.schemaEnv,c=i.opts.passContext?M5.default.this:O5.nil;function l(e){var t=(0,O5._)(cn||(cn=mo(["",".errors"])),e);o.assign(M5.default.vErrors,(0,O5._)(ln||(ln=mo([""," === null ? "," : ",".concat(",")"])),M5.default.vErrors,t,M5.default.vErrors,t)),o.assign(M5.default.errors,(0,O5._)(un||(un=mo(["",".length"])),M5.default.vErrors))}function u(e){var t;if(i.opts.unevaluated){var r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==i.props)if(r&&!r.dynamicProps)void 0!==r.props&&(i.props=E5.mergeEvaluated.props(o,r.props,i.props));else{var a=o.var("props",(0,O5._)(fn||(fn=mo(["",".evaluated.props"])),e));i.props=E5.mergeEvaluated.props(o,a,i.props,O5.Name)}if(!0!==i.items)if(r&&!r.dynamicItems)void 0!==r.items&&(i.items=E5.mergeEvaluated.items(o,r.items,i.items));else{var s=o.var("items",(0,O5._)(dn||(dn=mo(["",".evaluated.items"])),e));i.items=E5.mergeEvaluated.items(o,s,i.items,O5.Name)}}}r?function(){if(!s.$async)throw new Error("async schema referenced by sync schema");var n=o.let("valid");o.try((function(){o.code((0,O5._)(an||(an=mo(["await ",""])),(0,_5.callValidateCode)(e,t,c))),u(t),a||o.assign(n,!0)}),(function(e){o.if((0,O5._)(sn||(sn=mo(["!("," instanceof ",")"])),e,i.ValidationError),(function(){return o.throw(e)})),l(e),a||o.assign(n,!1)})),e.ok(n)}():e.result((0,_5.callValidateCode)(e,t,c),(function(){return u(t)}),(function(){return l(t)}))}C5.getValidate=T5,C5.callRef=R5,C5.default=P5,Object.defineProperty(k5,"__esModule",{value:!0});var N5=C5,I5=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",j5.default,N5.default];k5.default=I5;var D5={},z5={};Object.defineProperty(z5,"__esModule",{value:!0});var q5=i8(),B5=q5.operators,L5={maximum:{okStr:"<=",ok:B5.LTE,fail:B5.GT},minimum:{okStr:">=",ok:B5.GTE,fail:B5.LT},exclusiveMaximum:{okStr:"<",ok:B5.LT,fail:B5.GTE},exclusiveMinimum:{okStr:">",ok:B5.GT,fail:B5.LTE}},F5={message:function(e){var t=e.keyword,n=e.schemaCode;return(0,q5.str)(hn||(hn=mo(["must be "," ",""])),L5[t].okStr,n)},params:function(e){var t=e.keyword,n=e.schemaCode;return(0,q5._)(vn||(vn=mo(["{comparison: ",", limit: ","}"])),L5[t].okStr,n)}},V5={keyword:Object.keys(L5),type:"number",schemaType:"number",$data:!0,error:F5,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode;e.fail$data((0,q5._)(pn||(pn=mo([""," "," "," || isNaN(",")"])),n,L5[t].fail,r,n))}};z5.default=V5;var H5={};Object.defineProperty(H5,"__esModule",{value:!0});var W5=i8(),U5={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,W5.str)(mn||(mn=mo(["must be multiple of ",""])),t)},params:function(e){var t=e.schemaCode;return(0,W5._)(gn||(gn=mo(["{multipleOf: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.schemaCode,o=e.it.opts.multipleOfPrecision,i=t.let("res"),a=o?(0,W5._)(yn||(yn=mo(["Math.abs(Math.round(",") - ",") > 1e-",""])),i,i,o):(0,W5._)(bn||(bn=mo([""," !== parseInt(",")"])),i,i);e.fail$data((0,W5._)(wn||(wn=mo(["("," === 0 || ("," = ","/",", ","))"])),r,i,n,r,a))}};H5.default=U5;var J5={},K5={};function G5(e){for(var t,n=e.length,r=0,o=0;o=55296&&t<=56319&&o=s.loopRequired;if(a.allErrors?function(){if(c||i)e.block$data(f7.nil,m);else{var t,r=bo(n);try{for(r.s();!(t=r.n()).done;){var o=t.value;(0,u7.checkReportMissingProp)(e,o)}}catch(e){r.e(e)}finally{r.f()}}}():function(){var a=t.let("missing");if(c||i){var l=t.let("valid",!0);e.block$data(l,(function(){return function(n,i){e.setParams({missingProperty:n}),t.forOf(n,r,(function(){t.assign(i,(0,u7.propertyInData)(t,o,n,s.ownProperties)),t.if((0,f7.not)(i),(function(){e.error(),t.break()}))}),f7.nil)}(a,l)})),e.ok(l)}else t.if((0,u7.checkMissingProp)(e,n,a)),(0,u7.reportMissingProp)(e,a),t.else()}(),s.strictRequired){var l,u=e.parentSchema.properties,f=e.it.definedProperties,d=bo(n);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(void 0===(null==u?void 0:u[h])&&!f.has(h)){var v=a.schemaEnv.baseId+a.errSchemaPath,p='required property "'.concat(h,'" is not defined at "').concat(v,'" (strictRequired)');(0,d7.checkStrictMode)(a,p,a.opts.strictRequired)}}}catch(e){d.e(e)}finally{d.f()}}}function m(){t.forOf("prop",r,(function(n){e.setParams({missingProperty:n}),t.if((0,u7.noPropertyInData)(t,o,n,s.ownProperties),(function(){return e.error()}))}))}}};l7.default=h7;var v7={};Object.defineProperty(v7,"__esModule",{value:!0});var p7=i8(),m7={message:function(e){var t=e.keyword,n=e.schemaCode,r="maxItems"===t?"more":"fewer";return(0,p7.str)(Nn||(Nn=mo(["must NOT have "," than "," items"])),r,n)},params:function(e){var t=e.schemaCode;return(0,p7._)(In||(In=mo(["{limit: ","}"])),t)}},g7={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:m7,code:function(e){var t=e.keyword,n=e.data,r=e.schemaCode,o="maxItems"===t?p7.operators.GT:p7.operators.LT;e.fail$data((0,p7._)(Dn||(Dn=mo(["",".length "," ",""])),n,o,r))}};v7.default=g7;var y7={},b7={};Object.defineProperty(b7,"__esModule",{value:!0});var w7=A8;w7.code='require("ajv/dist/runtime/equal").default',b7.default=w7,Object.defineProperty(y7,"__esModule",{value:!0});var x7=h8,k7=i8(),j7=a8,S7=b7,C7={message:function(e){var t=e.params,n=t.i,r=t.j;return(0,k7.str)(zn||(zn=mo(["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,k7._)(qn||(qn=mo(["{i: ",", j: ","}"])),n,r)}},$7={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:C7,code:function(e){var t=e.gen,n=e.data,r=e.$data,o=e.schema,i=e.parentSchema,a=e.schemaCode,s=e.it;if(r||o){var c=t.let("valid"),l=i.items?(0,x7.getSchemaTypes)(i.items):[];e.block$data(c,(function(){var r=t.let("i",(0,k7._)(Ln||(Ln=mo(["",".length"])),n)),o=t.let("j");e.setParams({i:r,j:o}),t.assign(c,!0),t.if((0,k7._)(Fn||(Fn=mo([""," > 1"])),r),(function(){return(l.length>0&&!l.some((function(e){return"object"===e||"array"===e}))?u:f)(r,o)}))}),(0,k7._)(Bn||(Bn=mo([""," === false"])),a)),e.ok(c)}function u(r,o){var i=t.name("item"),a=(0,x7.checkDataTypes)(l,i,s.opts.strictNumbers,x7.DataType.Wrong),u=t.const("indices",(0,k7._)(Vn||(Vn=mo(["{}"]))));t.for((0,k7._)(Hn||(Hn=mo([";","--;"])),r),(function(){t.let(i,(0,k7._)(Wn||(Wn=mo(["","[","]"])),n,r)),t.if(a,(0,k7._)(Un||(Un=mo(["continue"])))),l.length>1&&t.if((0,k7._)(Jn||(Jn=mo(["typeof ",' == "string"'])),i),(0,k7._)(Kn||(Kn=mo(["",' += "_"'])),i)),t.if((0,k7._)(Gn||(Gn=mo(["typeof ","[",'] == "number"'])),u,i),(function(){t.assign(o,(0,k7._)(Qn||(Qn=mo(["","[","]"])),u,i)),e.error(),t.assign(c,!1).break()})).code((0,k7._)(Yn||(Yn=mo(["","[","] = ",""])),u,i,r))}))}function f(r,o){var i=(0,j7.useFunc)(t,S7.default),a=t.name("outer");t.label(a).for((0,k7._)(Xn||(Xn=mo([";","--;"])),r),(function(){return t.for((0,k7._)(Zn||(Zn=mo([""," = ","; ","--;"])),o,r,o),(function(){return t.if((0,k7._)(er||(er=mo(["","(","[","], ","[","])"])),i,n,r,n,o),(function(){e.error(),t.assign(c,!1).break(a)}))}))}))}}};y7.default=$7;var _7={};Object.defineProperty(_7,"__esModule",{value:!0});var O7=i8(),M7=a8,A7=b7,E7={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(e){var t=e.schemaCode;return(0,O7._)(tr||(tr=mo(["{allowedValue: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.$data,o=e.schemaCode,i=e.schema;r||i&&"object"==Ho(i)?e.fail$data((0,O7._)(nr||(nr=mo(["!","(",", ",")"])),(0,M7.useFunc)(t,A7.default),n,o)):e.fail((0,O7._)(rr||(rr=mo([""," !== ",""])),i,n))}};_7.default=E7;var P7={};Object.defineProperty(P7,"__esModule",{value:!0});var T7=i8(),R7=a8,N7=b7,I7={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,T7._)(or||(or=mo(["{allowedValues: ","}"])),t)}},code:function(e){var t=e.gen,n=e.data,r=e.$data,o=e.schema,i=e.schemaCode,a=e.it;if(!r&&0===o.length)throw new Error("enum must have non-empty array");var s,c,l=o.length>=a.opts.loopEnum,u=function(){return null!=s?s:s=(0,R7.useFunc)(t,N7.default)};if(l||r)c=t.let("valid"),e.block$data(c,(function(){t.assign(c,!1),t.forOf("v",i,(function(e){return t.if((0,T7._)(ir||(ir=mo(["","(",", ",")"])),u(),n,e),(function(){return t.assign(c,!0).break()}))}))}));else{if(!Array.isArray(o))throw new Error("ajv implementation error");var f=t.const("vSchema",i);c=T7.or.apply(void 0,Bo(o.map((function(e,t){return function(e,t){var r=o[t];return"object"===Ho(r)&&null!==r?(0,T7._)(ar||(ar=mo(["","(",", ","[","])"])),u(),n,e,t):(0,T7._)(sr||(sr=mo([""," === ",""])),n,r)}(f,t)}))))}e.pass(c)}};P7.default=I7,Object.defineProperty(D5,"__esModule",{value:!0});var D7=H5,z7=J5,q7=t7,B7=i7,L7=l7,F7=v7,V7=y7,H7=_7,W7=P7,U7=[z5.default,D7.default,z7.default,q7.default,B7.default,L7.default,F7.default,V7.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},H7.default,W7.default];D5.default=U7;var J7={},K7={};Object.defineProperty(K7,"__esModule",{value:!0}),K7.validateAdditionalItems=void 0;var G7=i8(),Q7=a8,Y7={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(e){var t=e.params.len;return(0,G7.str)(cr||(cr=mo(["must NOT have more than "," items"])),t)},params:function(e){var t=e.params.len;return(0,G7._)(lr||(lr=mo(["{limit: ","}"])),t)}},code:function(e){var t=e.parentSchema,n=e.it,r=t.items;Array.isArray(r)?X7(e,r):(0,Q7.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function X7(e,t){var n=e.gen,r=e.schema,o=e.data,i=e.keyword,a=e.it;a.items=!0;var s=n.const("len",(0,G7._)(ur||(ur=mo(["",".length"])),o));if(!1===r)e.setParams({len:t.length}),e.pass((0,G7._)(fr||(fr=mo([""," <= ",""])),s,t.length));else if("object"==Ho(r)&&!(0,Q7.alwaysValidSchema)(a,r)){var c=n.var("valid",(0,G7._)(dr||(dr=mo([""," <= ",""])),s,t.length));n.if((0,G7.not)(c),(function(){return function(r){n.forRange("i",t.length,s,(function(t){e.subschema({keyword:i,dataProp:t,dataPropType:Q7.Type.Num},r),a.allErrors||n.if((0,G7.not)(r),(function(){return n.break()}))}))}(c)})),e.ok(c)}}K7.validateAdditionalItems=X7,K7.default=Y7;var Z7={},e9={};Object.defineProperty(e9,"__esModule",{value:!0}),e9.validateTuple=void 0;var t9=i8(),n9=a8,r9=C8(),o9={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 i9(e,"additionalItems",t);n.items=!0,(0,n9.alwaysValidSchema)(n,t)||e.ok((0,r9.validateArray)(e))}};function i9(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.schema,r=e.gen,o=e.parentSchema,i=e.data,a=e.keyword,s=e.it;!function(e){var r=s.opts,o=s.errSchemaPath,i=n.length,c=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(r.strictTuples&&!c){var l='"'.concat(a,'" is ').concat(i,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(o,'"');(0,n9.checkStrictMode)(s,l,r.strictTuples)}}(o),s.opts.unevaluated&&n.length&&!0!==s.items&&(s.items=n9.mergeEvaluated.items(r,n.length,s.items));var c=r.name("valid"),l=r.const("len",(0,t9._)(hr||(hr=mo(["",".length"])),i));n.forEach((function(t,n){(0,n9.alwaysValidSchema)(s,t)||(r.if((0,t9._)(vr||(vr=mo([""," > ",""])),l,n),(function(){return e.subschema({keyword:a,schemaProp:n,dataProp:n},c)})),e.ok(c))}))}e9.validateTuple=i9,e9.default=o9,Object.defineProperty(Z7,"__esModule",{value:!0});var a9=e9,s9={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(e){return(0,a9.validateTuple)(e,"items")}};Z7.default=s9;var c9={};Object.defineProperty(c9,"__esModule",{value:!0});var l9=i8(),u9=a8,f9=C8(),d9=K7,h9={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(e){var t=e.params.len;return(0,l9.str)(pr||(pr=mo(["must NOT have more than "," items"])),t)},params:function(e){var t=e.params.len;return(0,l9._)(mr||(mr=mo(["{limit: ","}"])),t)}},code:function(e){var t=e.schema,n=e.parentSchema,r=e.it,o=n.prefixItems;r.items=!0,(0,u9.alwaysValidSchema)(r,t)||(o?(0,d9.validateAdditionalItems)(e,o):e.ok((0,f9.validateArray)(e)))}};c9.default=h9;var v9={};Object.defineProperty(v9,"__esModule",{value:!0});var p9=i8(),m9=a8,g9={message:function(e){var t=e.params,n=t.min,r=t.max;return void 0===r?(0,p9.str)(gr||(gr=mo(["must contain at least "," valid item(s)"])),n):(0,p9.str)(yr||(yr=mo(["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 void 0===r?(0,p9._)(br||(br=mo(["{minContains: ","}"])),n):(0,p9._)(wr||(wr=mo(["{minContains: ",", maxContains: ","}"])),n,r)}},y9={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:g9,code:function(e){var t,n,r=e.gen,o=e.schema,i=e.parentSchema,a=e.data,s=e.it,c=i.minContains,l=i.maxContains;s.opts.next?(t=void 0===c?1:c,n=l):t=1;var u=r.const("len",(0,p9._)(xr||(xr=mo(["",".length"])),a));if(e.setParams({min:t,max:n}),void 0!==n||0!==t){if(void 0!==n&&t>n)return(0,m9.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,m9.alwaysValidSchema)(s,o)){var f=(0,p9._)(kr||(kr=mo([""," >= ",""])),u,t);return void 0!==n&&(f=(0,p9._)(jr||(jr=mo([""," && "," <= ",""])),f,u,n)),void e.pass(f)}s.items=!0;var d=r.name("valid");void 0===n&&1===t?v(d,(function(){return r.if(d,(function(){return r.break()}))})):0===t?(r.let(d,!0),void 0!==n&&r.if((0,p9._)(Sr||(Sr=mo(["",".length > 0"])),a),h)):(r.let(d,!1),h()),e.result(d,(function(){return e.reset()}))}else(0,m9.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function h(){var e=r.name("_valid"),o=r.let("count",0);v(e,(function(){return r.if(e,(function(){return function(e){r.code((0,p9._)(Cr||(Cr=mo(["","++"])),e)),void 0===n?r.if((0,p9._)($r||($r=mo([""," >= ",""])),e,t),(function(){return r.assign(d,!0).break()})):(r.if((0,p9._)(_r||(_r=mo([""," > ",""])),e,n),(function(){return r.assign(d,!1).break()})),1===t?r.assign(d,!0):r.if((0,p9._)(Or||(Or=mo([""," >= ",""])),e,t),(function(){return r.assign(d,!0)})))}(o)}))}))}function v(t,n){r.forRange("i",0,u,(function(r){e.subschema({keyword:"contains",dataProp:r,dataPropType:m9.Type.Num,compositeRule:!0},t),n()}))}}};v9.default=y9;var b9={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=i8(),n=a8,r=C8();e.error={message:function(e){var n=e.params,r=n.property,o=n.depsCount,i=n.deps,a=1===o?"property":"properties";return(0,t.str)(Mr||(Mr=mo(["must have "," "," when property "," is present"])),a,i,r)},params:function(e){var n=e.params,r=n.property,o=n.depsCount,i=n.deps,a=n.missingProperty;return(0,t._)(Ar||(Ar=mo(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),r,a,o,i)}};var o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code:function(e){var t=jo(function(e){var t=e.schema,n={},r={};for(var o in t){if("__proto__"!==o)(Array.isArray(t[o])?n:r)[o]=t[o]}return[n,r]}(e),2),n=t[0],r=t[1];i(e,n),a(e,r)}};function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema,o=e.gen,i=e.data,a=e.it;if(0!==Object.keys(n).length){var s=o.let("missing"),c=function(){var c=n[l];if(0===c.length)return 1;var u=(0,r.propertyInData)(o,i,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?o.if(u,(function(){var t,n=bo(c);try{for(n.s();!(t=n.n()).done;){var o=t.value;(0,r.checkReportMissingProp)(e,o)}}catch(e){n.e(e)}finally{n.f()}})):(o.if((0,t._)(Er||(Er=mo([""," && (",")"])),u,(0,r.checkMissingProp)(e,c,s))),(0,r.reportMissingProp)(e,s),o.else())};for(var l in n)c()}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema,o=e.gen,i=e.data,a=e.keyword,s=e.it,c=o.name("valid"),l=function(l){if((0,n.alwaysValidSchema)(s,t[l]))return 1;o.if((0,r.propertyInData)(o,i,l,s.opts.ownProperties),(function(){var t=e.subschema({keyword:a,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(function(){return o.var(c,!0)})),e.ok(c)};for(var u in t)l(u)}e.validatePropertyDeps=i,e.validateSchemaDeps=a,e.default=o}(b9);var w9={};Object.defineProperty(w9,"__esModule",{value:!0});var x9=i8(),k9=a8,j9={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(e){var t=e.params;return(0,x9._)(Pr||(Pr=mo(["{propertyName: ","}"])),t.propertyName)}},code:function(e){var t=e.gen,n=e.schema,r=e.data,o=e.it;if(!(0,k9.alwaysValidSchema)(o,n)){var i=t.name("valid");t.forIn("key",r,(function(n){e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},i),t.if((0,x9.not)(i),(function(){e.error(!0),o.allErrors||t.break()}))})),e.ok(i)}}};w9.default=j9;var S9={};Object.defineProperty(S9,"__esModule",{value:!0});var C9=C8(),$9=i8(),_9=f8(),O9=a8,M9={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,$9._)(Tr||(Tr=mo(["{additionalProperty: ","}"])),t.additionalProperty)}},code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,o=e.data,i=e.errsCount,a=e.it;if(!i)throw new Error("ajv implementation error");var s=a.allErrors,c=a.opts;if(a.props=!0,"all"===c.removeAdditional||!(0,O9.alwaysValidSchema)(a,n)){var l=(0,C9.allSchemaProperties)(r.properties),u=(0,C9.allSchemaProperties)(r.patternProperties);t.forIn("key",o,(function(n){l.length||u.length?t.if(function(n){var o;if(l.length>8){var i=(0,O9.schemaRefOrVal)(a,r.properties,"properties");o=(0,C9.isOwnProperty)(t,i,n)}else o=l.length?$9.or.apply(void 0,Bo(l.map((function(e){return(0,$9._)(Nr||(Nr=mo([""," === ",""])),n,e)})))):$9.nil;return u.length&&(o=$9.or.apply(void 0,[o].concat(Bo(u.map((function(t){return(0,$9._)(Ir||(Ir=mo(["",".test(",")"])),(0,C9.usePattern)(e,t),n)})))))),(0,$9.not)(o)}(n),(function(){return d(n)})):d(n)})),e.ok((0,$9._)(Rr||(Rr=mo([""," === ",""])),i,_9.default.errors))}function f(e){t.code((0,$9._)(Dr||(Dr=mo(["delete ","[","]"])),o,e))}function d(r){if("all"===c.removeAdditional||c.removeAdditional&&!1===n)f(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(s||t.break());if("object"==Ho(n)&&!(0,O9.alwaysValidSchema)(a,n)){var o=t.name("valid");"failing"===c.removeAdditional?(h(r,o,!1),t.if((0,$9.not)(o),(function(){e.reset(),f(r)}))):(h(r,o),s||t.if((0,$9.not)(o),(function(){return t.break()})))}}}function h(t,n,r){var o={keyword:"additionalProperties",dataProp:t,dataPropType:O9.Type.Str};!1===r&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,n)}}};S9.default=M9;var A9={};Object.defineProperty(A9,"__esModule",{value:!0});var E9=K8(),P9=C8(),T9=a8,R9=S9,N9={keyword:"properties",type:"object",schemaType:"object",code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,o=e.data,i=e.it;"all"===i.opts.removeAdditional&&void 0===r.additionalProperties&&R9.default.code(new E9.KeywordCxt(i,R9.default,"additionalProperties"));var a,s=(0,P9.allSchemaProperties)(n),c=bo(s);try{for(c.s();!(a=c.n()).done;){var l=a.value;i.definedProperties.add(l)}}catch(e){c.e(e)}finally{c.f()}i.opts.unevaluated&&s.length&&!0!==i.props&&(i.props=T9.mergeEvaluated.props(t,(0,T9.toHash)(s),i.props));var u=s.filter((function(e){return!(0,T9.alwaysValidSchema)(i,n[e])}));if(0!==u.length){var f,d=t.name("valid"),h=bo(u);try{for(h.s();!(f=h.n()).done;){var v=f.value;p(v)?m(v):(t.if((0,P9.propertyInData)(t,o,v,i.opts.ownProperties)),m(v),i.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(v),e.ok(d)}}catch(e){h.e(e)}finally{h.f()}}function p(e){return i.opts.useDefaults&&!i.compositeRule&&void 0!==n[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};A9.default=N9;var I9={};Object.defineProperty(I9,"__esModule",{value:!0});var D9=C8(),z9=i8(),q9=a8,B9=a8,L9={keyword:"patternProperties",type:"object",schemaType:"object",code:function(e){var t=e.gen,n=e.schema,r=e.data,o=e.parentSchema,i=e.it,a=i.opts,s=(0,D9.allSchemaProperties)(n),c=s.filter((function(e){return(0,q9.alwaysValidSchema)(i,n[e])}));if(0!==s.length&&(c.length!==s.length||i.opts.unevaluated&&!0!==i.props)){var l=a.strictSchema&&!a.allowMatchingProperties&&o.properties,u=t.name("valid");!0===i.props||i.props instanceof z9.Name||(i.props=(0,B9.evaluatedPropsToName)(t,i.props));var f=i.props;!function(){var e,n=bo(s);try{for(n.s();!(e=n.n()).done;){var r=e.value;l&&d(r),i.allErrors?h(r):(t.var(u,!0),h(r),t.if(u))}}catch(e){n.e(e)}finally{n.f()}}()}function d(e){for(var t in l)new RegExp(e).test(t)&&(0,q9.checkStrictMode)(i,"property ".concat(t," matches pattern ").concat(e," (use allowMatchingProperties)"))}function h(n){t.forIn("key",r,(function(r){t.if((0,z9._)(zr||(zr=mo(["",".test(",")"])),(0,D9.usePattern)(e,n),r),(function(){var o=c.includes(n);o||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:r,dataPropType:B9.Type.Str},u),i.opts.unevaluated&&!0!==f?t.assign((0,z9._)(qr||(qr=mo(["","[","]"])),f,r),!0):o||i.allErrors||t.if((0,z9.not)(u),(function(){return t.break()}))}))}))}}};I9.default=L9;var F9={};Object.defineProperty(F9,"__esModule",{value:!0});var V9=a8,H9={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(e){var t=e.gen,n=e.schema,r=e.it;if((0,V9.alwaysValidSchema)(r,n))e.fail();else{var o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(function(){return e.reset()}),(function(){return e.error()}))}},error:{message:"must NOT be valid"}};F9.default=H9;var W9={};Object.defineProperty(W9,"__esModule",{value:!0});var U9={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:C8().validateUnion,error:{message:"must match a schema in anyOf"}};W9.default=U9;var J9={};Object.defineProperty(J9,"__esModule",{value:!0});var K9=i8(),G9=a8,Q9={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(e){var t=e.params;return(0,K9._)(Br||(Br=mo(["{passingSchemas: ","}"])),t.passing)}},code:function(e){var t=e.gen,n=e.schema,r=e.parentSchema,o=e.it;if(!Array.isArray(n))throw new Error("ajv implementation error");if(!o.opts.discriminator||!r.discriminator){var i=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block((function(){i.forEach((function(n,r){var i;(0,G9.alwaysValidSchema)(o,n)?t.var(c,!0):i=e.subschema({keyword:"oneOf",schemaProp:r,compositeRule:!0},c),r>0&&t.if((0,K9._)(Lr||(Lr=mo([""," && ",""])),c,a)).assign(a,!1).assign(s,(0,K9._)(Fr||(Fr=mo(["[",", ","]"])),s,r)).else(),t.if(c,(function(){t.assign(a,!0),t.assign(s,r),i&&e.mergeEvaluated(i,K9.Name)}))}))})),e.result(a,(function(){return e.reset()}),(function(){return e.error(!0)}))}}};J9.default=Q9;var Y9={};Object.defineProperty(Y9,"__esModule",{value:!0});var X9=a8,Z9={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 o=t.name("valid");n.forEach((function(t,n){if(!(0,X9.alwaysValidSchema)(r,t)){var i=e.subschema({keyword:"allOf",schemaProp:n},o);e.ok(o),e.mergeEvaluated(i)}}))}};Y9.default=Z9;var eee={};Object.defineProperty(eee,"__esModule",{value:!0});var tee=i8(),nee=a8,ree={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(e){var t=e.params;return(0,tee.str)(Vr||(Vr=mo(['must match "','" schema'])),t.ifClause)},params:function(e){var t=e.params;return(0,tee._)(Hr||(Hr=mo(["{failingKeyword: ","}"])),t.ifClause)}},code:function(e){var t=e.gen,n=e.parentSchema,r=e.it;void 0===n.then&&void 0===n.else&&(0,nee.checkStrictMode)(r,'"if" without "then" and "else" is ignored');var o=oee(r,"then"),i=oee(r,"else");if(o||i){var a,s=t.let("valid",!0),c=t.name("_valid");if(a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c),e.mergeEvaluated(a),e.reset(),o&&i){var l=t.let("ifClause");e.setParams({ifClause:l}),t.if(c,u("then",l),u("else",l))}else o?t.if(c,u("then")):t.if((0,tee.not)(c),u("else"));e.pass(s,(function(){return e.error(!0)}))}function u(n,r){return function(){var o=e.subschema({keyword:n},c);t.assign(s,c),e.mergeValidEvaluated(o,s),r?t.assign(r,(0,tee._)(Wr||(Wr=mo(["",""])),n)):e.setParams({ifClause:n})}}}};function oee(e,t){var n=e.schema[t];return void 0!==n&&!(0,nee.alwaysValidSchema)(e,n)}eee.default=ree;var iee={};Object.defineProperty(iee,"__esModule",{value:!0});var aee=a8,see={keyword:["then","else"],schemaType:["object","boolean"],code:function(e){var t=e.keyword,n=e.parentSchema,r=e.it;void 0===n.if&&(0,aee.checkStrictMode)(r,'"'.concat(t,'" without "if" is ignored'))}};iee.default=see,Object.defineProperty(J7,"__esModule",{value:!0});var cee=K7,lee=Z7,uee=e9,fee=c9,dee=v9,hee=b9,vee=w9,pee=S9,mee=A9,gee=I9,yee=F9,bee=W9,wee=J9,xee=Y9,kee=eee,jee=iee;J7.default=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[yee.default,bee.default,wee.default,xee.default,kee.default,jee.default,vee.default,pee.default,hee.default,mee.default,gee.default];return e?t.push(lee.default,fee.default):t.push(cee.default,uee.default),t.push(dee.default),t};var See={},Cee={};Object.defineProperty(Cee,"__esModule",{value:!0});var $ee=i8(),_ee={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(e){var t=e.schemaCode;return(0,$ee.str)(Ur||(Ur=mo(['must match format "','"'])),t)},params:function(e){var t=e.schemaCode;return(0,$ee._)(Jr||(Jr=mo(["{format: ","}"])),t)}},code:function(e,t){var n=e.gen,r=e.data,o=e.$data,i=e.schema,a=e.schemaCode,s=e.it,c=s.opts,l=s.errSchemaPath,u=s.schemaEnv,f=s.self;c.validateFormats&&(o?function(){var o=n.scopeValue("formats",{ref:f.formats,code:c.code.formats}),i=n.const("fDef",(0,$ee._)(Kr||(Kr=mo(["","[","]"])),o,a)),s=n.let("fType"),l=n.let("format");n.if((0,$ee._)(Gr||(Gr=mo(["typeof ",' == "object" && !('," instanceof RegExp)"])),i,i),(function(){return n.assign(s,(0,$ee._)(Qr||(Qr=mo(["",'.type || "string"'])),i)).assign(l,(0,$ee._)(Yr||(Yr=mo(["",".validate"])),i))}),(function(){return n.assign(s,(0,$ee._)(Xr||(Xr=mo(['"string"'])))).assign(l,i)})),e.fail$data((0,$ee.or)(!1===c.strictSchema?$ee.nil:(0,$ee._)(Zr||(Zr=mo([""," && !",""])),a,l),(d=u.$async?(0,$ee._)(eo||(eo=mo(["(",".async ? await ","(",") : ","(","))"])),i,l,r,l,r):(0,$ee._)(to||(to=mo(["","(",")"])),l,r),h=(0,$ee._)(no||(no=mo(["(typeof ",' == "function" ? '," : ",".test(","))"])),l,d,l,r),(0,$ee._)(ro||(ro=mo([""," && "," !== true && "," === "," && !",""])),l,l,s,t,h))));var d,h}():function(){var o=f.formats[i];if(!o)return void function(){if(!1===c.strictSchema)return void f.logger.warn(e());throw new Error(e());function e(){return'unknown format "'.concat(i,'" ignored in schema at path "').concat(l,'"')}}();if(!0===o)return;var a=jo(function(e){var t=e instanceof RegExp?(0,$ee.regexpCode)(e):c.code.formats?(0,$ee._)(oo||(oo=mo(["","",""])),c.code.formats,(0,$ee.getProperty)(i)):void 0,r=n.scopeValue("formats",{key:i,ref:e,code:t});if("object"==Ho(e)&&!(e instanceof RegExp))return[e.type||"string",e.validate,(0,$ee._)(io||(io=mo(["",".validate"])),r)];return["string",e,r]}(o),3),s=a[0],d=a[1],h=a[2];s===t&&e.pass(function(){if("object"==Ho(o)&&!(o instanceof RegExp)&&o.async){if(!u.$async)throw new Error("async format in sync schema");return(0,$ee._)(ao||(ao=mo(["await ","(",")"])),h,r)}return"function"==typeof d?(0,$ee._)(so||(so=mo(["","(",")"])),h,r):(0,$ee._)(co||(co=mo(["",".test(",")"])),h,r)}())}())}};Cee.default=_ee,Object.defineProperty(See,"__esModule",{value:!0});var Oee=[Cee.default];See.default=Oee;var Mee={};Object.defineProperty(Mee,"__esModule",{value:!0}),Mee.contentVocabulary=Mee.metadataVocabulary=void 0,Mee.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Mee.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(x5,"__esModule",{value:!0});var Aee=D5,Eee=J7,Pee=See,Tee=Mee,Ree=[k5.default,Aee.default,(0,Eee.default)(),Pee.default,Tee.metadataVocabulary,Tee.contentVocabulary];x5.default=Ree;var Nee={},Iee={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(Iee),Object.defineProperty(Nee,"__esModule",{value:!0});var Dee=i8(),zee=Iee,qee=t5,Bee=a8,Lee={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(e){var t=e.params,n=t.discrError,r=t.tagName;return n===zee.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,o=t.tagName;return(0,Dee._)(lo||(lo=mo(["{error: ",", tag: ",", tagValue: ","}"])),n,o,r)}},code:function(e){var t=e.gen,n=e.data,r=e.schema,o=e.parentSchema,i=e.it,a=o.oneOf;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");var s=r.propertyName;if("string"!=typeof s)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 c=t.let("valid",!1),l=t.const("tag",(0,Dee._)(uo||(uo=mo(["","",""])),n,(0,Dee.getProperty)(s)));function u(n){var r=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:n},r);return e.mergeEvaluated(o,Dee.Name),r}t.if((0,Dee._)(fo||(fo=mo(["typeof ",' == "string"'])),l),(function(){return function(){var n=function(){for(var e,t={},n=f(o),r=!0,c=0;c5){var n=["("+(t.length-5)+" more...)"];(t=t.slice(0,5)).push(n)}e.message="should be equal to one of: "+t.join(", ")}}return"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}var Uee={id:"lodash",name:"Lodash",description:'\n

\n Enter a JavaScript function to filter, sort, or transform the data.\n You can use Lodash\n functions like _.map, _.filter,\n _.orderBy, _.sortBy, _.groupBy,\n _.pick, _.uniq, _.get, etcetera.\n

\n',createQuery:function(e,t){var n=t.filter,r=t.sort,o=t.projection,i=[" return _.chain(data)\n"];if(n&&n.path&&n.relation&&n.value){var a="item => item".concat(ZO(n.path)),s=oM(n.value),c="string"==typeof s?"'".concat(n.value,"'"):iu(n.value)&&!Number.isSafeInteger(s)?"".concat(n.value,"n"):n.value;i.push(" .filter(".concat(a," ").concat(n.relation," ").concat(c,")\n"))}r&&r.path&&r.direction&&i.push(" .orderBy([".concat(function(e){return 0===e.length?"":e.every((function(e){return tM.test(e)||eM.test(e)}))?"'"+e.map(XO).join("").replace(/^\./,"")+"'":JSON.stringify(e)}(r.path),"], ['").concat(r.direction,"'])\n"));if(o&&o.paths)if(o.paths.length>1){var l=o.paths.map((function(e){var t=gb(e)||"item";return" ".concat(JSON.stringify(t),": item").concat(ZO(e))}));i.push(" .map(item => ({\n".concat(l.join(",\n"),"\n }))\n"))}else{var u=o.paths[0];i.push(" .map(item => item".concat(ZO(u),")\n"))}return i.push(" .value()\n"),"function query (data) {\n".concat(i.join(""),"}")},executeQuery:function(e,t){!function(e){var t,n,r=null===(t=e.match(/_\.chain\(/g))||void 0===t?void 0:t.length,o=null===(n=e.match(/\.value\(\)/g))||void 0===n?void 0:n.length;if(r!==o)throw new Error("Cannot execute query: Lodash _.chain(...) must end with .value()")}(t);var n=new Function("_",'"use strict";\n\n'+t+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')(P_)(e);return void 0!==n?n:null}};var Jee={};!function(e){function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,o){if(e===o)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(o))return!1;if(!0===t(e)){if(e.length!==o.length)return!1;for(var i=0;i",9:"Array"},p="EOF",m="UnquotedIdentifier",g="QuotedIdentifier",y="Rbracket",b="Rparen",w="Comma",x="Colon",k="Rbrace",j="Number",S="Current",C="Expref",$="Pipe",_="Or",O="And",M="EQ",A="GT",E="LT",P="GTE",T="LTE",R="NE",N="Flatten",I="Star",D="Filter",z="Dot",q="Not",B="Lbrace",L="Lbracket",F="Lparen",V="Literal",H={".":z,"*":I,",":w,":":x,"{":B,"}":k,"]":y,"(":F,")":b,"@":S},W={"<":!0,">":!0,"=":!0,"!":!0},U={" ":!0,"\t":!0,"\n":!0};function J(e){return e>="0"&&e<="9"||"-"===e}function K(){}K.prototype={tokenize:function(e){var t,n,r,o,i=[];for(this._current=0;this._current="a"&&o<="z"||o>="A"&&o<="Z"||"_"===o)t=this._current,n=this._consumeUnquotedIdentifier(e),i.push({type:m,value:n,start:t});else if(void 0!==H[e[this._current]])i.push({type:H[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(J(e[this._current]))r=this._consumeNumber(e),i.push(r);else if("["===e[this._current])r=this._consumeLBracket(e),i.push(r);else if('"'===e[this._current])t=this._current,n=this._consumeQuotedIdentifier(e),i.push({type:g,value:n,start:t});else if("'"===e[this._current])t=this._current,n=this._consumeRawStringLiteral(e),i.push({type:V,value:n,start:t});else if("`"===e[this._current]){t=this._current;var a=this._consumeLiteral(e);i.push({type:V,value:a,start:t})}else if(void 0!==W[e[this._current]])i.push(this._consumeOperator(e));else if(void 0!==U[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,i.push({type:O,value:"&&",start:t})):i.push({type:C,value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,i.push({type:_,value:"||",start:t})):i.push({type:$,value:"|",start:t})}return i},_consumeUnquotedIdentifier:function(e){var t,n=this._current;for(this._current++;this._current="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(n,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var n=e.length;'"'!==e[this._current]&&this._current"===n?"="===e[this._current]?(this._current++,{type:P,value:">=",start:t}):{type:A,value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:M,value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,r=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var G={};function Q(){}function Y(e){this.runtime=e}function X(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[a]}]},avg:{_func:this._functionAvg,_signature:[{types:[d]}]},ceil:{_func:this._functionCeil,_signature:[{types:[a]}]},contains:{_func:this._functionContains,_signature:[{types:[c,l]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[c]},{types:[c]}]},floor:{_func:this._functionFloor,_signature:[{types:[a]}]},length:{_func:this._functionLength,_signature:[{types:[c,l,u]}]},map:{_func:this._functionMap,_signature:[{types:[f]},{types:[l]}]},max:{_func:this._functionMax,_signature:[{types:[d,h]}]},merge:{_func:this._functionMerge,_signature:[{types:[u],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[l]},{types:[f]}]},sum:{_func:this._functionSum,_signature:[{types:[d]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[c]},{types:[c]}]},min:{_func:this._functionMin,_signature:[{types:[d,h]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[l]},{types:[f]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[u]}]},values:{_func:this._functionValues,_signature:[{types:[u]}]},sort:{_func:this._functionSort,_signature:[{types:[h,d]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[l]},{types:[f]}]},join:{_func:this._functionJoin,_signature:[{types:[c]},{types:[h]}]},reverse:{_func:this._functionReverse,_signature:[{types:[c,l]}]},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}]}}}G[p]=0,G[m]=0,G[g]=0,G[y]=0,G[b]=0,G[w]=0,G[k]=0,G[j]=0,G[S]=0,G[C]=0,G[$]=1,G[_]=2,G[O]=3,G[M]=5,G[A]=5,G[E]=5,G[P]=5,G[T]=5,G[R]=5,G[N]=9,G[I]=20,G[D]=21,G[z]=40,G[q]=45,G[B]=50,G[L]=55,G[F]=60,Q.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if(this._lookahead(0)!==p){var n=this._lookaheadToken(0),r=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw r.name="ParserError",r}return t},_loadTokens:function(e){var t=(new K).tokenize(e);t.push({type:p,value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var n=this.nud(t),r=this._lookahead(0);e=0?this.expression(e):t===L?(this._match(L),this._parseMultiselectList()):t===B?(this._match(B),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(G[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===L)t=this.expression(e);else if(this._lookahead(0)===D)t=this.expression(e);else{if(this._lookahead(0)!==z){var n=this._lookaheadToken(0),r=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw r.name="ParserError",r}this._match(z),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==y;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===w&&(this._match(w),this._lookahead(0)===y))throw new Error("Unexpected token Rbracket")}return this._match(y),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n,r=[],o=[m,g];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(x),n={type:"KeyValuePair",name:t,value:this.expression(0)},r.push(n),this._lookahead(0)===w)this._match(w);else if(this._lookahead(0)===k){this._match(k);break}}return{type:"MultiSelectHash",children:r}}},Y.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,i){var a,s,c,l,u,f,d,h,v;switch(e.type){case"Field":return null!==i&&n(i)?void 0===(f=i[e.name])?null:f:null;case"Subexpression":for(c=this.visit(e.children[0],i),v=1;v0)for(v=y;vb;v+=w)c.push(i[v]);return c;case"Projection":var x=this.visit(e.children[0],i);if(!t(x))return null;for(h=[],v=0;vu;break;case P:c=l>=u;break;case E:c=l=e&&(t=n<0?e-1:e),t}},X.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var r,o,i,a;if(n[n.length-1].variadic){if(t.length=0;r--)n+=t[r];return n}var o=e[0].slice(0);return o.reverse(),o},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],r=0;r=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return n(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,r=e[0],o=e[1],i=0;i0){if(this._getTypeName(e[0][0])===a)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r0){if(this._getTypeName(e[0][0])===a)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;rs?1:as&&(s=n,t=o[l]);return t},_functionMinBy:function(e){for(var t,n,r=e[1],o=e[0],i=this.createKeyFunction(r,[a,c]),s=1/0,l=0;l\n Enter a JMESPath query \n to filter, sort, or transform the JSON data.\n To learn JMESPath, go to the interactive tutorial.\n

\n',createQuery:function(e,t){var n=t.sort,r=t.filter,o=t.projection,i="";if(r&&r.path&&r.relation&&r.value){var a=Us(e,["0"].concat(r.path)),s=oM(r.value),c="string"==typeof a&&null!=s?'"'.concat(r.value,'"'):s;i+="[? "+Qee(r.path)+" "+r.relation+" `"+c+"`]"}else i+=Array.isArray(e)?"[*]":"@";n&&n.path&&n.direction&&("desc"===n.direction?i+=" | reverse(sort_by(@, &"+Qee(n.path)+"))":i+=" | sort_by(@, &"+Qee(n.path)+")");if(o&&o.paths)if("]"!==i[i.length-1]&&(i+=" | [*]"),1===o.paths.length){var l=o.paths[0];i+=0===l.length?"":"."+Qee(l)}else o.paths.length>1&&(i+=".{"+o.paths.map((function(e){return Yee(e[e.length-1])+": "+Qee(e)})).join(", ")+"}");return i},executeQuery:function(e,t,n){var r=iO(n,JSON)?e:function(e){var t=n.stringify(e);return void 0!==t?JSON.parse(t):void 0}(e);return Kee.search(r,t)}};function Qee(e){if(0===e.length)return"@";var t=e.map((function(e){return"number"==typeof e?"["+e+"]":"."+Yee(String(e))})).join("");return"."===t[0]?t.slice(1):t}function Yee(e){return e.match(/^[A-Za-z\d_$]+$/)?e:JSON.stringify(e)} +/*! + * vanilla-picker v2.12.2 + * https://vanilla-picker.js.org + * + * Copyright 2017-2023 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate) + * Released under the ISC license. + */var Xee=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Zee=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var rte=function(){function e(t,n,r,o){Xee(this,e);var i=this;if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===r){var a=t&&""+t;a&&function(t){if(t.startsWith("hsl")){var n=t.match(/([\-\d\.e]+)/g).map(Number),r=ete(n,4),o=r[0],a=r[1],s=r[2],c=r[3];void 0===c&&(c=1),o/=360,a/=100,s/=100,i.hsla=[o,a,s,c]}else if(t.startsWith("rgb")){var l=t.match(/([\-\d\.e]+)/g).map(Number),u=ete(l,4),f=u[0],d=u[1],h=u[2],v=u[3];void 0===v&&(v=1),i.rgba=[f,d,h,v]}else t.startsWith("#")?i.rgba=e.hexToRgb(t):i.rgba=e.nameToRgb(t)||e.hexToRgb(t)}(a.toLowerCase())}else this.rgba=[t,n,r,void 0===o?1:o]}return Zee(e,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return nte(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],n=["","%","%",""],r=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,r){return nte(e*t[r],3===r?3:1)+n[r]}));return e?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=e.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=e.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var e=this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)}));return"#"+e.map((function(e){return e.padStart(2,"0")})).join("")},set:function(t){this.rgba=e.hexToRgb(t)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var n=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return n[3]=n[3]/255,n}},{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=tte[n];return void 0===r?r:e.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=ete(e,4),n=t[0],r=t[1],o=t[2],i=t[3];n/=255,r/=255,o/=255;var a=Math.max(n,r,o),s=Math.min(n,r,o),c=void 0,l=void 0,u=(a+s)/2;if(a===s)c=l=0;else{var f=a-s;switch(l=u>.5?f/(2-a-s):f/(a+s),a){case n:c=(r-o)/f+(r1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},u=o<.5?o*(1+r):o+r-o*r,f=2*o-u;a=l(f,u,n+1/3),s=l(f,u,n),c=l(f,u,n-1/3)}var d=[255*a,255*s,255*c].map(Math.round);return d[3]=i,d}}]),e}(),ote=function(){function e(){Xee(this,e),this._events=[]}return Zee(e,[{key:"add",value:function(e,t,n){e.addEventListener(t,n,!1),this._events.push({target:e,type:t,handler:n})}},{key:"remove",value:function(t,n,r){this._events=this._events.filter((function(o){var i=!0;return t&&t!==o.target&&(i=!1),n&&n!==o.type&&(i=!1),r&&r!==o.handler&&(i=!1),i&&e._doRemove(o.target,o.type,o.handler),!i}))}},{key:"destroy",value:function(){this._events.forEach((function(t){return e._doRemove(t.target,t.type,t.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,n){e.removeEventListener(t,n,!1)}}]),e}();function ite(e,t,n){var r=!1;function o(e,t,n){return Math.max(t,Math.min(e,n))}function i(e,i,a){if(a&&(r=!0),r){e.preventDefault();var s=t.getBoundingClientRect(),c=s.width,l=s.height,u=i.clientX,f=i.clientY,d=o(u-s.left,0,c),h=o(f-s.top,0,l);n(d/c,h/l)}}function a(e,t){1===(void 0===e.buttons?e.which:e.buttons)?i(e,e,t):r=!1}function s(e,t){1===e.touches.length?i(e,e.touches[0],t):r=!1}e.add(t,"mousedown",(function(e){a(e,!0)})),e.add(t,"touchstart",(function(e){s(e,!0)})),e.add(window,"mousemove",a),e.add(t,"touchmove",s),e.add(window,"mouseup",(function(e){r=!1})),e.add(t,"touchend",(function(e){r=!1})),e.add(t,"touchcancel",(function(e){r=!1}))}var ate="keydown",ste="mousedown",cte="focusin";function lte(e,t){return(t||document).querySelector(e)}function ute(e){e.preventDefault(),e.stopPropagation()}function fte(e,t,n,r,o){e.add(t,ate,(function(e){n.indexOf(e.key)>=0&&(o&&ute(e),r(e))}))}var dte=function(){function e(t){Xee(this,e),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new ote,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return Zee(e,[{key:"setOptions",value:function(e){var t=this;if(e){var n=this.settings;if(e instanceof HTMLElement)n.parent=e;else{n.parent&&e.parent&&n.parent!==e.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(e,t,n){for(var r in e)n&&n.indexOf(r)>=0||(t[r]=e[r])}(e,n),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var r=e.color||e.colour;r&&this._setColor(r)}var o=n.parent;if(o&&n.popup&&!this._popupInited){var i=function(e){return t.openHandler(e)};this._events.add(o,"click",i),fte(this._events,o,[" ","Spacebar","Enter"],i),this._popupInited=!0}else e.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===ate?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,n=!1;if(e)if(t===ste||t===cte){var r=(this.__containedEvent||0)+100;e.timeStamp>r&&(n=!0)}else ute(e),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==ste&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function(e,t){if("string"==typeof e&&(e=e.trim()),e){t=t||{};var n=void 0;try{n=new rte(e)}catch(e){if(t.failSilently)return;throw e}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,t)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t,n,r=this.settings.template||'
',o=(t=r,(n=document.createElement("div")).innerHTML=t,n.firstElementChild);return this.domElement=o,this._domH=lte(".picker_hue",o),this._domSL=lte(".picker_sl",o),this._domA=lte(".picker_alpha",o),this._domEdit=lte(".picker_editor input",o),this._domSample=lte(".picker_sample",o),this._domOkay=lte(".picker_done button",o),this._domCancel=lte(".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 e=this,t=this,n=this.domElement,r=this._events;function o(e,t,n){r.add(e,t,n)}o(n,"click",(function(e){return e.preventDefault()})),ite(r,this._domH,(function(e,n){return t._setHSLA(e)})),ite(r,this._domSL,(function(e,n){return t._setHSLA(null,e,1-n)})),this.settings.alpha&&ite(r,this._domA,(function(e,n){return t._setHSLA(null,null,null,1-n)}));var i=this._domEdit;o(i,"input",(function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),o(i,"focus",(function(e){var t=this;t.selectionStart===t.selectionEnd&&t.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};o(window,ste,t),o(window,cte,t),fte(r,n,["Esc","Escape"],t);var i=function(t){e.__containedEvent=t.timeStamp};o(n,ste,i),o(n,cte,i),o(e._domCancel,"click",t)}));var a=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};o(this._domOkay,"click",a),fte(r,n,["Enter"],a)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(n){"static"===getComputedStyle(e).position&&(e.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===r?t.classList.add(e):t.classList.remove(e)})),t.classList.add(r)}))}},{key:"_setHSLA",value:function(e,t,n,r,o){o=o||{};var i=this.colour,a=i.hsla;[e,t,n,r].forEach((function(e,t){(e||0===e)&&(a[t]=e)})),i.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(i)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,n=t.hsla,r="hsl("+360*n[0]+", 100%, 50%)",o=t.hslString,i=t.hslaString,a=this._domH,s=this._domSL,c=this._domA,l=lte(".picker_selector",a),u=lte(".picker_selector",s),f=lte(".picker_selector",c);y(0,l,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,y(0,u,n[1]),b(0,u,1-n[2]),s.style.color=o,b(0,f,1-n[3]);var d=o,h=d.replace("hsl","hsla").replace(")",", 0)"),v="linear-gradient("+[d,h]+")";if(this._domA.style.background=v+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!e.fromEditor){var p=this.settings.editorFormat,m=this.settings.alpha,g=void 0;switch(p){case"rgb":g=t.printRGB(m);break;case"hsl":g=t.printHSL(m);break;default:g=t.printHex(m)}this._domEdit.value=g}this._domSample.style.color=i}function y(e,t,n){t.style.left=100*n+"%"}function b(e,t,n){t.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var n=e?"":"none",r=t.style.display!==n;return r&&(t.style.display=n),r}}]),e}(),hte=document.createElement("style");hte.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(hte),dte.StyleElement=hte;var vte=Object.freeze({__proto__:null,default:dte});export{MM as BooleanToggle,Xa as CaretType,DM as ColorPicker,iE as EditableValue,F6 as EnumValue,N6 as JSONEditor,Qa as Mode,FE as ReadonlyValue,es as SearchField,Ya as SelectionType,ts as SortDirection,YE as TimestampTag,ns as UpdateSelectionAfterChange,Za as ValidationSeverity,zA as createAfterSelection,Hee as createAjvValidator,DA as createInsideSelection,NA as createKeySelection,qA as createMultiSelection,IA as createValueSelection,tO as estimateSerializedSize,vA as isAfterSelection,K_ as isContent,pI as isContentParseError,mI as isContentValidationErrors,vI as isContextMenuColumn,hI as isContextMenuRow,LA as isEditingSelection,iO as isEqualParser,pA as isInsideSelection,Q_ as isJSONContent,mA as isKeySelection,eO as isLargeContent,fI as isMenuButton,dI as isMenuDropDownButton,uI as isMenuLabel,lI as isMenuSeparator,cI as isMenuSpace,yA as isMultiSelection,yI as isNestedValidationError,wI as isSvelteActionRenderer,bI as isSvelteComponentRenderer,G_ as isTextContent,gI as isValidationError,gA as isValueSelection,iM as javascriptQueryLanguage,Gee as jmespathQueryLanguage,Uee as lodashQueryLanguage,JI as onEscape,QO as parseJSONPath,W6 as renderJSONSchemaEnum,XE as renderValue,w4 as resizeObserver,GO as stringifyJSONPath,X_ as toJSONContent,Y_ as toTextContent}; +//# sourceMappingURL=standalone.js.map diff --git a/webinterface/templates/configuration_edit.html b/webinterface/templates/configuration_edit.html index 879f2dae..d59051ea 100755 --- a/webinterface/templates/configuration_edit.html +++ b/webinterface/templates/configuration_edit.html @@ -7,21 +7,21 @@

Configuration

- +
-
-
- + spellcheck="false">
+ {% if is_admin %}
@@ -39,15 +39,54 @@

Configuration

+ + + + {% endblock %} \ No newline at end of file